Hello,
I'm using PostgreSQL. Changing db.py from
db.define_table('position',
Field("day", 'date', unique = True),
Field("quantity", "double"),
)
to
db.define_table('position',
Field("date", 'date', unique = True),
Field("quantity", "double"),
)
causes:
Traceback (most recent call last):
File "D:\Home\web\web2py\gluon\restricted.py", line 173, in
restricted
exec ccode in environment
File "applications\invest\models/db.py", line 95, in <module>
Field("quantity", "double"),
File "D:\Home\web\web2py\gluon\sql.py", line 1247, in define_table
t._create(migrate=migrate, fake_migrate=fake_migrate)
File "D:\Home\web\web2py\gluon\sql.py", line 1703, in _create
fake_migrate=fake_migrate)
File "D:\Home\web\web2py\gluon\sql.py", line 1757, in _migrate
self._db._execute(sub_query)
File "D:\Home\web\web2py\gluon\sql.py", line 950, in <lambda>
self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
ProgrammingError: column "date" does not exist
LINE 1: UPDATE position SET date__tmp=date;
^
I expected those changes to be migrated automatically. What is wrong?
How to fix?
Regards, Andreas
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.