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