Re: [web2py] Re: migrating database and updating it

2017-10-25 Thread Yebach
So this is the whole procedure I did at the end and it seems to do the trick 1. create a folder for your new app (WoShiTest) 2. copy production version there 3. delete content of sessions, error and DATABASE folders 4. in 0.py set db connection string 5. set migrate = True and

Re: [web2py] Re: migrating database and updating it

2017-10-24 Thread Alex Glaros
I'm a beginner but seems like you should create your new version to first be exact duplicate of the original, pg_restore db to the new version, make sure it's working like old one, THEN change DAL tables, then run migrate = True. (I haven't needed to run fake_migrate in these situations)

Re: [web2py] Re: migrating database and updating it

2017-10-23 Thread Anthony
It's not quite clear exactly what you have copied and/or changed, so hard to say what you need to do. But in general, if you want to update your code and have the production database migrated to match the new code, you should copy everything *except* the contents of the /databases directory

Re: [web2py] Re: migrating database and updating it

2017-10-23 Thread Vid Ogris
Hello So as said I copied the whole app directory to my new server, also restored my database on postgres. First my settings for migrate and false_migrate are set to False and immediately I get an error: relation of table auth_user already exists. I set the migrate for this table

Re: [web2py] Re: migrating database and updating it

2017-10-18 Thread Anthony
On Wednesday, October 18, 2017 at 10:37:17 AM UTC-4, Yebach wrote: > > I am trying to keep my production db with all its data but update the > structure with the new web2py db code > Yes, then as noted below, just update the web2py code, make sure migrations are on, and do *not* touch the

Re: [web2py] Re: migrating database and updating it

2017-10-18 Thread Vid Ogris
I am trying to keep my production db with all its data but update the structure with the new web2py db code On Oct 18, 2017 16:26, "Anthony" wrote: > Are you trying to keep the production database and just run migrations on > it, or just create a whole new production

[web2py] Re: migrating database and updating it

2017-10-18 Thread Anthony
Are you trying to keep the production database and just run migrations on it, or just create a whole new production database from scratch to match the new code? If the former, don't touch the /databases folder on production -- just update the code and leave migrations on, and the DAL will run