[web2py] Re: Can't modify SQL table schema with db.define_table?

2011-12-20 Thread Yarin
Deleting the .table files solved the issue- thanks! Perhaps this should be made clearer in the docs with respect to SQLite. Something like: "Dropping/renaming tables or columns, and changing column types in SQLite is problematic because... Solution is to: - Drop table in SQLiteManager or outsi

[web2py] Re: Can't modify SQL table schema with db.define_table?

2011-12-20 Thread Yarin
Deleting the .table files solved the issue- thanks! Perhaps this should be made clearer in the docs with respect to SQLite. Something like: "Dropping/renaming tables or columns, and changing column types in SQLite is problematic because... Solution is to: - Drop table in SQLiteManager or outside pr

[web2py] Re: Can't modify SQL table schema with db.define_table?

2011-12-19 Thread Massimo Di Pierro
Indeed 2 does not help. If you delete or rename a sqlite table and if you are not doing it using web2py (db.table.drop()) then you should tell web2py the table no loger exists. You do this by deleting the databases/ *_tablename.table files On Dec 19, 4:50 pm, Yarin wrote: > OK I understand the S

[web2py] Re: Can't modify SQL table schema with db.define_table?

2011-12-19 Thread Yarin
OK I understand the SQLite issue, but not the options I have. 1) SQLite does support renaming tables. I renamed the table in question in SQLiteManager, hoping that web2py would then create a new table under the old name. But now web2py simply complains that the old table doesn't exist. Why wouldn'

[web2py] Re: Can't modify SQL table schema with db.define_table?

2011-12-19 Thread Yarin
OK I understand the SQLite issue, but not the options I have. 1) SQLite does support renaming tables. I renamed the table in question in SQLiteManager, hoping that web2py would then create a new table under the old name. But now web2py simply complains that the old question doesn't exist. Why woul

[web2py] Re: Can't modify SQL table schema with db.define_table?

2011-12-19 Thread Massimo Di Pierro
correct. Because SQLite does not support ALTER TABLE DROP therefore it cannot drop a column from an existing table not even to replace it. It works with the other databases. There is special logic in dal.py to skip this type of migrations in sqlite. Massimo On Dec 19, 2:03 pm, Yarin wrote: > Wh

[web2py] Re: Can't modify SQL table schema with db.define_table?

2011-12-19 Thread Anthony
See http://web2py.com/books/default/chapter/29/6#Fixing-broken-migrations for specific issues with SQLite. Anthony