[web2py] Foreign key error after adding new table instance

2019-06-16 Thread Steve
Hi All, Busy with my platform, just added some tables. I have defined extra fields for the Auth table. In 1 of the aded fields i use a different table to get some info. 2 days ago i added 3 row's which are available for me to select. When i add a new user i am able te select one of those rows an

[web2py] Foreign key constraint is incorrectly formed

2017-07-11 Thread Scheme Lab
Hello, I used the wizard for web2py to create an application. Initially web2py deployed to SQLite because of a bug in web2py where it uses AppConfig() to access the database instead of Storage . But after pointing web2py to my MySQL da

[web2py] FOREIGN KEY constraint failed

2017-07-02 Thread mostwanted
Hi guys, i need help, i'm pulling my hairs out over here, i have a website where when i'm trying to record an entry i get an error: FOREIGN KEY constraint failed I have been able to create 2 forms but other attempts to create more forms fail!! These are my tables; db.define_table('governme

[web2py] Foreign key constraint failed

2017-01-10 Thread pilzsuppe
Good day, I was following the video tutorial of Massimo, just as other users here. But when I want to submit a post I get the error >IntegrityError: foreign key constraint failed< ---My db.py:--- db.define_table('category', Field('name',requires=IS_IN_SET(['suess','sauer','fros

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

2016-01-24 Thread Yi Liu
Dear fellow w2p users, First, thank you so much for providing this great app Web2Py for *free*. Recently I updated my app to allow user to delete account themselves. auth.settings.allow_delete_accounts= True Today, I received feedback from user that that function is broken on my site. Then I

[web2py] foreign key constraint failed occurring custom table insertion, or foreign key is set to "None"

2015-09-01 Thread Rodrigo Palacios
First off, I want to say thank you to the contributors of this group and of the codebase, web2py is a godsend! Now to my problem. Like the title implies, I'm getting two separate issues depending on how I set up my controller logic. This first one produces an IntegrityError. My controller: @

[web2py] Foreign key constraint failed (and other woes) in table with two different table references.

2015-09-01 Thread Rodrigo Palacios
Hi friends, first off, thanks to every contributor here - the web2py project is a godsend. So basically, I'm getting two different problems in two separate table insertions, which occurs in the controller. When I manually insert into the db (sqlite atm), I get an IntegrityError. - My cont

[web2py] foreign key constraint failed

2015-03-20 Thread António Ramos
hello i have this table db.define_table('pedidos', Field('amostra',db.amostras), Field('destino'), Field('estante','integer'), Field('x','integer'), Field('y','integer'), Field('estante1',compute =lambda r:"_E_"+str(r['estante'])+str(r['x'])+str(r['y'])), Field('created

[web2py] (foreign key constraint failed)

2015-02-18 Thread Smruti Prakash Mohanty
Hi I am using the web2py default auth table for user registration. I am having an additional table defined as such: db.define_table('nsksystem', Field('email_id', db.auth_user,length=512, label = 'Email ID'), Field('nskname', length=128, default='', label = 'Mach

[web2py] (foreign key constraint failed) with onupdate=auth.archive

2015-02-05 Thread François Delpierre
Hi, I get an Integrity Error everytime I modify a record in the t_route, and I don't understand what's wrong. The t_route contains only 1 record, the t_route_archive is empty. What should I do? The controller: @auth.requires_login() def route_manage(): form = SQLFORM.smartgrid(db.t_route,

Re: [web2py] foreign key constraint failed

2014-09-24 Thread Fabiano Almeida
If your table definitions are right, try delete database and run your app again... 2014-09-22 18:01 GMT-03:00 Anna Kostikova : > Hi everyone, > > I am having an issue when editing content of one of the tables in my > database. When I try to edit a record in the table I have an error message > " f

[web2py] foreign key constraint failed

2014-09-24 Thread Anna Kostikova
Hi everyone, I am having an issue when editing content of one of the tables in my database. When I try to edit a record in the table I have an error message " foreign key constraint failed". The bizarre thing is that it doesn't matter which column I am trying to edit (via appadmin control pane

[web2py] Foreign key

2014-04-30 Thread Beat Kohler
I am on the way to develop a small purchase requisition application. The main idea is: the user select from a list of materials a material number and enter the quantity. Finally he will confirm his requisition and send it to a external system. To create the purchase requisitions I use a simp

[web2py] Foreign Key Constraint Failed in dbadmin

2014-03-04 Thread brahama von
Hi guys! Been looking for this in the mail list but i can't understand why this is happening. Here is the model. Very simple, just learning and practicing. Its a version with a few changes of the image blog :) db.define_table('uploads', Field('up_name','string',requires=IS_NOT_EMPTY()),

[web2py] foreign key constraint failed

2014-03-04 Thread Капылов Данил
Pass lessons web2py - DePaul IPD359 Week 2 - Web development with Python and web2py Time on video 2 hours 05 minutes There is an error in the code foreign key constraint failed function: def create_post(): category = get_category_post() db.post.category.default = category.id form

[web2py] foreign key mismatch

2013-12-24 Thread Gael Princivalle
Hi all. I'm going mad on this problem. Probably my lambda function for the represent products.brand is not correct but I don't know where. Like that ny application works, but I cannot add some products rows, web2py says:" foreign key mismatch" db.define_table('brands', Field('id_

[web2py] foreign key constraint failed ???

2013-12-08 Thread Ivan Gazzola
I can't resolve this ticket in mhy app. I try to insert from appadmin but i've always this error: " foreign key constraint failed " This is my model: db.define_table('Nominativi', Field('nome',notnull=True, represent=lambda nome:nome.title()), Field('categoria',db.Categorie_Nominativi,d

[web2py] "Foreign Key Constraint"

2013-10-15 Thread Auden RovelleQuartz
when I run this function, *def truncate_db_tables(the_db):* * for table_name in the_db.tables():* * the_db[table_name].truncate()* * the_db.commit()* * return()* I get the following error (traceback provided below) - does anyone understand what this means? Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9

[web2py] Foreign Key not showing up in form (One table only)

2012-08-31 Thread Kevin C
We're having a strange issue here. We have defined around 20 tables already with foreign keys everywhere and working fine. Today we created two additional tables but the foreign key dropdown isn't working for one of them. (This is just using the database manager through appadmin) Tables are: d

[web2py] foreign key reference and "not null" mutually exclusive. by design, or a bug?

2011-12-08 Thread nick name
I want to have a non-null foreign key reference, e.g. owner = db.define_table('owner'', Field('name')) package = db.define_table('package', Field('owner_id', owner, notnull=True), Field('name')) SQLite for example has no problem with this: sqlite> create table owner(id int primary key, name tex

[web2py] Foreign key name getting other value, images app

2011-10-21 Thread Paul
When I use appadmin to display the COMMENT table, the comment.image_id field displays the title field from the image table. Looking in sql.log, I see that comment.image_id is an integer referencing image.id. image_id INTEGER REFERENCES image(id) ON DELETE CASCADE, I was expecting to see th

[web2py] Foreign Key Constraints with SQLite

2011-01-06 Thread Tony Young
Hi web2py, Currently, web2py doesn't handle foreign key constraints on SQLite but, looking at the SQLite website, it should: http://www.sqlite.org/foreignkeys.html Could this be as simple as setting PRAGMA foreign_keys = ON and updating the SQLite library? Thanks, Tony

Re: [web2py] Foreign Key

2010-11-25 Thread Richard Vézina
For postgres you need also to specify the sequence name : sequence_name='tablename_newidname_seq' On Thu, Nov 25, 2010 at 10:47 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Do you mean that you have a recursive sql request? > > Or you want to rename the default id field name for PK

Re: [web2py] Foreign Key

2010-11-25 Thread Richard Vézina
Do you mean that you have a recursive sql request? Or you want to rename the default id field name for PK? In the second case : Field('ouid','id') does the tricks... Richard On Thu, Nov 25, 2010 at 9:16 AM, Johann Spies wrote: > I want to use a foreign key which does not refer to the id-fiel

Re: [web2py] Foreign Key

2010-11-25 Thread Richard Vézina
I just point out the doc I think could help you... I have not work with multiple PK and FK. There is also UUID, but not sure it serve for your needs Richard On Thu, Nov 25, 2010 at 9:51 AM, Johann Spies wrote: > Hallo Richard, > > > On 25 November 2010 16:26, Richard Vézina wrote: > >> I think

Re: [web2py] Foreign Key

2010-11-25 Thread Johann Spies
Hallo Richard, On 25 November 2010 16:26, Richard Vézina wrote: > I think it cover in as keyed table in the book > > I am not sure how that will solve my problem. It creates new problems: signature = db.Table(db, 'signature', Field('created_on', 'datetime', default=reque

Re: [web2py] Foreign Key

2010-11-25 Thread Richard Vézina
I think it cover in as keyed table in the book Richard On Thu, Nov 25, 2010 at 9:16 AM, Johann Spies wrote: > I want to use a foreign key which does not refer to the id-field of another > record > > eg. > > > > db.define_table('journal', > Field('ouid','integer'), >

[web2py] Foreign Key

2010-11-25 Thread Johann Spies
I want to use a foreign key which does not refer to the id-field of another record eg. db.define_table('journal', Field('ouid','integer'), Field('journal',unique=True), Field('issn', length=10), Field('notes', type='text'),