Thanks for your reply, Richard. I dropped the table, and when I went to reload and got this traceback (same one I got before I dropped the table). db_wizard.py is where the table is defined.
Traceback (most recent call last): File "/home/www-data/web2py/gluon/restricted.py", line 192, in restricted exec ccode in environment File "/home/www-data/web2py/applications/baristacode/models/ db_wizard.py", line 59, in <module> migrate=settings.migrate) File "/home/www-data/web2py/gluon/dal.py", line 4311, in define_table polymodel=polymodel) File "/home/www-data/web2py/gluon/dal.py", line 555, in create_table precision, scale = map(int,field.type[8:-1].split(',')) ValueError: invalid literal for int() with base 10: '' On Sep 8, 1:45 pm, Richard Vézina <ml.richard.vez...@gmail.com> wrote: > Drop the table... and recreate it... Use pgAdmin or erase your db model > reload your app... paste your model reload... > > Don't need fake migrate just migrate true... > > Richard > > > > > > > > On Thu, Sep 8, 2011 at 1:36 PM, Eric <hu5...@gmail.com> wrote: > > I'm running web2py on PostGreSQL. I accidentally created a model that > > specified a table with column type "double" when I needed "decimal". > > Now I'm trying to change it from double to decimal, with no luck. I > > deleted all the records, and have used > > 'migrate=True,fake_migrate=True', and all the variations thereof. > > Will I need to re-create the app to change the database field type? > > > Changing models (adding or modifying columns) is a problem I've > > encountered consistently with web2py, and it's the one problem that > > (so far) I've been unable to trace back to my own mistake or > > oversight. Working with the DAL is not easy, even when using > > PostGreSQL. > > > Thanks in advance for your help.