On 10 May 2011 05:04, pbreit <pbreitenb...@gmail.com> wrote: > I can't seem to get any of my model changes to migrate to Postgres. I've > tried various combinations of turning migrate and fake_migrate on and off. > Deleting and re-adding Fields(). I'm not sure what else to try or where to > look. I still have no idea what the .table or sql.log files do. Should I > just plan on making all of my Postgres DB changes manually? All I'm doing is > simple column adds.
You should not have problems when you add or delete fields in the models. What does not work with Postgresql is when you change the type of a field. What I normally do in such a case is * comment out the field in the model and reload it. * drop the field in pgadminIII * change the field definition, uncomment it in the model and reload it. In some cases when I have to much trouble with this, I just do a csv-dump of the old table, drop it using the web2py shell and if necessary use executesql with (drop <table> cascade;) and then let web2py create it again, delete the data for the field in the csv-file and import the csv-file. I have also dropped the table using postgresql directly, and then deleted the files in the application' s databases-directory which refers to the deleted table and then let Web2py create the table again. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a