Re: [web2py] Re: FOREIGN KEY constraint failed

2017-07-18 Thread Santiago Cartasegna
Glad that my idea helped! 2017-07-18 6:20 GMT-03:00 mostwanted : > I was able o solve the problem, when i was creating the tables i copied > and pasted a code for the '*governmetFormPages' *table but to correct the > error i had to delete the table and type its code word for word, that > solved m

[web2py] Re: FOREIGN KEY constraint failed

2017-07-18 Thread mostwanted
I was able o solve the problem, when i was creating the tables i copied and pasted a code for the '*governmetFormPages' *table but to correct the error i had to delete the table and type its code word for word, that solved my problem. thanks for the input guys. Santiago Cartasegna was right. O

[web2py] Re: FOREIGN KEY constraint failed

2017-07-11 Thread Dave S
On Tuesday, July 11, 2017 at 2:39:46 PM UTC-7, Scheme Lab wrote: > > I think the filename ends with .sqlite doesnt it? > That's the actual database (if you're using sqlite3). The dot-table files are part of pydal, with schema information used by the driver, etc, and are present for any databa

[web2py] Re: FOREIGN KEY constraint failed

2017-07-11 Thread Scheme Lab
I think the filename ends with .sqlite doesnt it? On Wednesday, July 5, 2017 at 3:07:46 AM UTC-4, Dave S wrote: > > > > On Tuesday, July 4, 2017 at 11:34:11 PM UTC-7, mostwanted wrote: >> >> Hey Santi, how do i go about doing that, deleting all the tables in the >> database backup folder? >> > >

Re: [web2py] Re: FOREIGN KEY constraint failed

2017-07-05 Thread Santiago Cartasegna
That would do the trick. The backup means thtat before deleteng the files, you backup the folder! 2017-07-05 4:07 GMT-03:00 Dave S : > > > On Tuesday, July 4, 2017 at 11:34:11 PM UTC-7, mostwanted wrote: >> >> Hey Santi, how do i go about doing that, deleting all the tables in the >> database ba

[web2py] Re: FOREIGN KEY constraint failed

2017-07-05 Thread Dave S
On Tuesday, July 4, 2017 at 11:34:11 PM UTC-7, mostwanted wrote: > > Hey Santi, how do i go about doing that, deleting all the tables in the > database backup folder? > The easiest way is to use a command line, and delete the .table files. In a linux system, and picking the application name f

[web2py] Re: FOREIGN KEY constraint failed

2017-07-04 Thread mostwanted
Hey Santi, how do i go about doing that, deleting all the tables in the database backup folder? On Tuesday, July 4, 2017 at 12:08:44 AM UTC+2, Santiago Cartasegna wrote: > > Go to the database folder backup and delete all the .tables. Perhaps a > change was not reflected on the creation of the t

[web2py] Re: FOREIGN KEY constraint failed

2017-07-03 Thread Santiago Cartasegna
Go to the database folder backup and delete all the .tables. Perhaps a change was not reflected on the creation of the table. A similar error ocurred to me and it was on the creation of the id's references on the forange. But your code looks ok El lunes, 3 de julio de 2017, 15:50:45 (UTC-3), mo

[web2py] Re: FOREIGN KEY constraint failed

2017-07-03 Thread mostwanted
this is the actual code Santi: db.define_table('government', Field('govName', requires=IS_NOT_EMPTY()), Field('tel', requires=IS_NOT_EMPTY()), Field('email', requires=IS_NOT_EMPTY()), format='%(govName)s', migrate=False,fake_migrate=

[web2py] Re: FOREIGN KEY constraint failed

2017-07-03 Thread Santiago Cartasegna
Hello, You should reference the table with the same name that is created so the table sould be like: db.define_table('governmetFormPages', Field('formImage', 'upload'), Field('formTitle',requires=IS_NOT_EMPTY()), Field('formName', 'reference gover

[web2py] Re: FOREIGN KEY constraint failed

2017-07-03 Thread mostwanted
It is the actually code Tony, i just changed it after posting it. The table name was initially *govmntForm* as it is referenced in the *governmetFormPages* table. On Sunday, July 2, 2017 at 7:48:43 PM UTC+2, Anthony wrote: > > Not sure if you're showing your actual code, but the table name is sp

[web2py] Re: FOREIGN KEY constraint failed

2017-07-02 Thread Anthony
Not sure if you're showing your actual code, but the table name is spelled "governmenttForm" (note the extra "t"), and for the field type, you have "reference govmntForm". Anthony On Sunday, July 2, 2017 at 4:37:22 AM UTC-4, mostwanted wrote: > > Hi guys, i need help, i'm pulling my hairs out o

[web2py] Re: Foreign key constraint failed

2017-01-11 Thread pilzsuppe
Hello Anthony, my eintrag_erstellen is a html view: -- {{extend 'layout.html'}} {{block header}} {{end}} Erstelle einen neuen Beitrag über das Thema {{=category.name.title()}} {{=form}} -- I gain access

[web2py] Re: Foreign key constraint failed

2017-01-10 Thread Anthony
How are you generating the URL to access eintrag_erstellen, and are you sure the integer you are using in the URL is in fact the record ID of one of the records in db.category? Anthony On Tuesday, January 10, 2017 at 6:07:17 PM UTC-5, pilzsu...@emailn.de wrote: > > Good day, > > I was following

[web2py] Re: FOREIGN KEY constraint failed error when "Click to delete" user account

2016-01-26 Thread Yi Liu
I read more about "Foreign Key constraint" in sqlite docs (Should have done this in the begining). The error cause is there is a reference key to the auth.user in another table. So sqlite cannot delete the user without "ON DELETE CASCADE". Is there any place I can config "on delete cascade" or

[web2py] Re: FOREIGN KEY constraint failed error when "Click to delete" user account

2016-01-25 Thread Yi Liu
Thank you for your suggestion, Massimo. I deleted the logic. The only thing under def user() is now: return dict(form=auth()) I also modified the logic in user.html by ''' '''. {{ ''' if request.args(0)=='profile': =H2('Your Filters:') =XML('Note: Filters are logically OR-gates (except fo

[web2py] Re: FOREIGN KEY constraint failed error when "Click to delete" user account

2016-01-25 Thread Massimo Di Pierro
Do you still get the ticket if you remove the logic for the additional form on the profile page? On Sunday, 24 January 2016 21:11:33 UTC-6, Yi Liu wrote: > > Dear fellow w2p users, > > First, thank you so much for providing this great app Web2Py for *free*. > > Recently I updated my app to allow

Re: [web2py] Re: foreign key constraint failed

2015-03-20 Thread António Ramos
yep. you are right. I was using amostra.n but should be amostra.id Thank u for your time as usual Leonel. Regards 2015-03-20 16:50 GMT+00:00 Leonel Câmara : > In that case amostra.n is not pointing to a valid amostra. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documen

[web2py] Re: foreign key constraint failed

2015-03-20 Thread Leonel Câmara
In that case amostra.n is not pointing to a valid amostra. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subsc

Re: [web2py] Re: foreign key constraint failed

2015-03-20 Thread António Ramos
Nop, i´m user number 6. 2015-03-20 13:06 GMT+00:00 Leonel Câmara : > I'm guessing there's no user with the id 6 > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list

[web2py] Re: foreign key constraint failed

2015-03-20 Thread Leonel Câmara
I'm guessing there's no user with the id 6 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Goo

[web2py] Re: (foreign key constraint failed)

2015-02-18 Thread Anthony
Did this solve your problem? On Wednesday, February 18, 2015 at 5:07:02 AM UTC-5, Smruti Prakash Mohanty wrote: > > Hi > > I am using the web2py default auth table for user registration. > > I am having an additional table defined as such: > > db.define

[web2py] Re: (foreign key constraint failed)

2015-02-18 Thread Niphlod
a little bit of wording around "unfortunately I can't turn off" it's not that having constraints in place is limiting your app. It's because something REAALLY wrong with your application that that error pops up (and it'll pop up with any other backend). I'd be more inclined to say "thanks a

[web2py] Re: foreign key constraint failed

2014-09-26 Thread Cliff Kachinske
This post on StackOverflow may help http://stackoverflow.com/questions/9636053/is-there-a-way-to-get-the-constraints-of-a-table-in-sqlite There is a code snippet you might try. On Monday, September 22, 2014 5:01:11 PM UTC-4, Anna Kostikova wrote: > > Hi everyone, > > I am having an issue when ed

[web2py] Re: foreign key constraint failed

2014-09-24 Thread Leonel Câmara
Seems like a botched migration to me. Can you tell me what changes you made to your model, and a sample of the data you had there before? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/

[web2py] Re: foreign key constraint failed ???

2013-12-09 Thread Niphlod
foreign_keys = True keeps your data safe. Ignoring it means that your data doesn't respect referential integrity (meaning, it's faulty). Every "major" db engine forces it by default, SQLite instead needs an explicit declaration to enable it. You'd really need to check if all of your data is cons

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread Alan Etkin
> > If possible I prefer to keep foreign_keys=True for db integrity. > Another similar thread https://groups.google.com/d/msg/web2py/klspqXpha4E/mCwQ6HC5IhAJ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://co

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread Ivan Gazzola
If possible I prefer to keep foreign_keys=True for db integrity. Thx Ivan Il giorno domenica 8 dicembre 2013 15:41:03 UTC+1, Ivo ha scritto: > > though it may not be the preferred solution I resolved it by adding: > adapter_args=dict(foreign_keys=False) to db = > DAL('sqlite://storage.sqlite')

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread Ivan Gazzola
I changed all fields in 'referece field' format but nothing changes :( For the validatos IS_IN_DB(db,db.table.field,format) is mistaken and return errors, indeed the correct form is IS_IN_DB(db,table.field,format) ... Regards Ivan Il giorno domenica 8 dicembre 2013 17:20:15 UTC+1, 黄祥 ha scritto

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread 黄祥
had you already try using : 'reference Nominativi' instead of db.Nominativi and requires is set to db.Nominativi.id instead of 'Nominativi.id'? e.g. db.define_table('Relazioni', Field('nominativo', 'reference Nominativi', required=True,requires=[IS_IN_DB(db, db.Nominativi.id)]), Field(

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread Ivo
though it may not be the preferred solution I resolved it by adding: adapter_args=dict(foreign_keys=False) to db = DAL('sqlite://storage.sqlite') in db.py On Sunday, December 8, 2013 3:16:36 PM UTC+1, Ivan Gazzola wrote: > > I can't resolve this ticket in my app. I try to insert in > Pazienti_C