open an issue so it doesn't get lost....sounds definitevely like a bug
On Wednesday, June 19, 2013 6:28:48 PM UTC+2, Alexei Vinidiktov wrote:
>
> Hello,
>
> I'm using Firebird with my web2py powered app.
>
> I've come across what I think to be a bug in migrations, namely dropping
> columns migrations.
>
> If I create a table definition, for example, like this:
>
> db.define_table('card',
> Field('question', 'text', notnull=True),
> Field('answer','text', notnull=True)
> )
>
> The table gets created, everything works fine.
>
> But if I remove a Field definition (drop a column), like so:
>
> db.define_table('card',
> Field('answer','text', notnull=True)
> )
>
> The column gets dropped from the database, but I keep getting this error
> message:
>
> <class 'fdb.fbcore.DatabaseError'> ('Error while executing SQL
> statement:\n- SQLCODE: -607\n- unsuccessful metadata update\n- column
> QUESTION does not exist in table/view CARD', -607, 335544351)
>
> And the sql.log shows that every time I load a page web2py tries to drop
> the column that has been deleted thus causing this error.
>
> timestamp: 2013-06-19T23:11:40.214366
> ALTER TABLE card DROP question;
> timestamp: 2013-06-19T23:11:58.635448
> ALTER TABLE card DROP question;
>
>
> My setup is like this: Mac OS X 10.8.4, Python 2.7.4, web2py 2.5.1,
> Firebird 2.5 with the latest fdb driver. But I've come across the same bug
> on Windows too.
>
> To reproduce the bug define any table with a couple of columns, get web2py
> to create it. Then remove a column definition from from the table
> definition.
>
> I've tried fake_migrate but it doesn't solve the problem. Once I remove
> fake_migrate the error is back.
>
> --
> Alexei Vinidiktov
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.