I don't do this with web2py, but generally, i have a 'table_version' table, 
which for each table has a version number. If the version number is older, 
there is an 'upgrade_scripts' table which stores the scripts to upgrade 
each individual table to each version...

On Monday, August 26, 2013 4:49:26 AM UTC-7, Andrew Buchan wrote:
>
>  A lot of our developments have SQL views and stored procedures. These 
> currently have to be manually copied between the various development and 
> production servers, and I'm looking for an intelligent way to go about this.
> I'm thinking along the lines of including the sql definition in files in 
> the model folder, and having a function in the last exectuded model file do 
> something like:
> ...
> if enabled: # Maybe use db migration...?
>  read view name from file #will have to distinguish between views and 
> sprocs?
> if view name exists in database:
>  execute drop #or alter, not sure if it's worth checking for changes?
>  execute create(from definition in file)
>  ...
>
>  This way all sprocs and views will be source controlled and replicated in 
> each database. 
>  
> I just though I'd check if web2py, or someone using it, had already found 
> a solution to this problem.
>

-- 

--- 
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