[web2py] Re: DAL IntegrityError on MSSQL after upgrade to 2.3.2

2013-02-05 Thread Tim Richardson
It seems that the newer version of web2py deemed there were some differences between how the table is defined in the web2py model file and how it i Did the DAL migrate functionality change significantly between version 1.93.2 and 2.3.2? Can anyone advise? many thanks, Andrew. I

Re: [web2py] Re: DAL IntegrityError on MSSQL after upgrade to 2.3.2

2013-02-05 Thread Andrew Buchan
Tim, I had tried with various permutations of migrate and fake_migrate on the tables and in the top level db definition, but it kept timing out/freezing. I now managed to get it to work using only migrate_enabled=False at the db definition. The thing is, I want migration enabled. That's one of

Re: [web2py] Re: DAL IntegrityError on MSSQL after upgrade to 2.3.2

2013-02-05 Thread Niphlod
I guess simply disabling migration on auth will work, e.g. auth.define_table(migrate=False) PS: if migrations are fired it means that the .table files are out of sync with your current model. PS2: if you're totally sure that your current model is in sync with the database (hence the only

Re: [web2py] Re: DAL IntegrityError on MSSQL after upgrade to 2.3.2

2013-02-05 Thread Andrew Buchan
Niphlod, Thanks for all that information. I was getting issues with more than just auth tables so had to take a different approach. I carried out roughly the steps which I described above, and am happy to report it is all working perfectly! Regarding PS3, I thought migration only happened when

Re: [web2py] Re: DAL IntegrityError on MSSQL after upgrade to 2.3.2

2013-02-05 Thread Niphlod
On Tuesday, February 5, 2013 6:33:07 PM UTC+1, Andrew Buchan wrote: Niphlod, Thanks for all that information. I was getting issues with more than just auth tables so had to take a different approach. I carried out roughly the steps which I described above, and am happy to report it is

Re: [web2py] Re: DAL IntegrityError on MSSQL after upgrade to 2.3.2

2013-02-04 Thread Andrew Buchan
Update: It seems the piece which generates the problematic statement is in the method migrate_table in dal.py and it currently looks like this: 'ALTER TABLE %s ADD %s__tmp %s;' % (t, key, tt), 'UPDATE %s SET %s__tmp=%s;' % (t, key, key), 'ALTER TABLE %s DROP %s;' % (t, key), 'ALTER TABLE %s

[web2py] Re: DAL IntegrityError on MSSQL after upgrade to 2.3.2

2013-01-30 Thread Massimo Di Pierro
Can you send me your .table file for auth_user. Before the migration. On Wednesday, 30 January 2013 07:17:11 UTC-6, Andrew Buchan wrote: Hello, I'm running web2py on a Windows server with MS SQL, it's running from source, as a service. I tried upgrading from version 1.93.2 to the latest

Re: [web2py] Re: DAL IntegrityError on MSSQL after upgrade to 2.3.2

2013-01-30 Thread Andrew Buchan
Massimo, thanks for looking into this. These are the contents of file the auth_user.table file: (dp1 S'first_name' p2 S'VARCHAR(128)' p3 sS'last_name' p4 S'VARCHAR(128)' p5 sS'is_department_manager' p6 S'BIT' p7 sS'email' p8 S'VARCHAR(128) UNIQUE' p9 sS'reset_password_key' p10 S'VARCHAR(512)'