I use git; I think the situation you describe is why version control 
systems exist. git is nice for lots of reasons; one of them is that you 
don't need any git 'server' software if your development is on the same 
machine, and if you do need servers, there are great internet options which 
you just synchronise with. You can use gitignore to make sure that 
databases and other dynamic files are not "synchronised"; the necessary 
.gitignore file comes with web2py. Apart from synchronisation, you get 
multiple-branch development, easy reversions in case something breaks, 
bisect for finding the cause of bugs etc etc. You can easily do development 
of a new feature and then almost instantly swap back your development app 
to the stable "branch" to fix bugs in the production version (although 
web2py itself is not yet an example of this :) )
As for migration, there are a few production-ready tips in the web2py book. 
Personally I don't use migration except for sqlite. 

I would never suggest rsync when vastly better tools exist. 

On Tuesday, 11 February 2014 02:12:13 UTC+11, Cliff Kachinske wrote:
>
> I have used rsync to update models, controllers, views, modules and so on.
>
> For database updates I create a separate script and test, test, test it. I 
> don't use the DAL. Sometimes I write SQL, sometimes python using the 
> database driver. Going forward it will probably just be SQL.
>
> On a production box you have migration set to false for all models, yes? 
>
> So the process for migrating the database is:
> 1. Shut down the app.
> 2. Run your migration script.
> 3. Set fake_migrate = True 
> 4. Restart the app and force fake migration on all changed tables. You can 
> do this by opening the tables in the appadmin application or though the 
> user interface. All you need to do is ensure you can select records out of 
> the tables.
> 5. Turn all migration off
>
> Don't know if this qualifies as a best practice, but it's what I do.
>
> Also on my development box I run the same DB backend as on production. 
> This helps eliminate surprises.
> On Monday, February 10, 2014 6:54:10 AM UTC-5, Robin Manoli wrote:
>>
>> Hey,
>> I'm working on developing projects that will have live releases. In other 
>> words, I want to be able to develop my app calmly on a dev version, and 
>> once I'm done with that I want to synchronize it with the live version 
>> which is open to the public. I'm using two separate mysql databases for 
>> this, because I don't want to fill the live one up with garbage.
>>
>> The easiest way I've found is to have two different applications (one 
>> live and one dev), and to synchronize them by using rsync on linux. It is 
>> quite scary though when it comes to alter the db tables. It has happened 
>> that the live app completely breaks because of a very simple change (a 
>> change of name of a table column).
>>
>> I wonder how you guys encounter this situation. Do you recommend using 
>> git? Is it even possible to use git, since web2py so easily gets confused 
>> with how the database looks?
>>
>> It would be nice with some tutorial on this, because I have not yet 
>> learnt git or similar things.
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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.

Reply via email to