Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Auto generate rollback scripts #9

Open
jpoehls opened this issue Aug 21, 2010 · 3 comments
Open

Auto generate rollback scripts #9

jpoehls opened this issue Aug 21, 2010 · 3 comments
Labels

Comments

@jpoehls
Copy link
Owner

jpoehls commented Aug 21, 2010

No description provided.

@kieranbenton
Copy link
Contributor

Is that possible/feasible? We're having trouble sensibly creating rollback scripts for SP changes (which our suite of applications relies on heavily). Any advice for that?

@jpoehls
Copy link
Owner Author

jpoehls commented Jul 19, 2011

Not sure if it is feasible or not, but it would be very slick!

I prefer to keep my Stored Procs in separate files, 1 file per sproc - just as if they were code classes.

A newish plugin in dotnetmigrations-contrib is PersistentMigrations (pmigrate command) that supports the concept of running certain script files during every migrate. So I end up having a /migrate folder for my schema migration scripts and a /sprocs folder for my stored procedure scripts. I've configured it such that my /sprocs scripts are run every time.

If needed I will also create a /views, /functions etc folder for other objects that I don't feel should be put in migration scripts.

@kieranbenton
Copy link
Contributor

I think that we should leave exactly how people want to use migrations up to them. I'm not certain that the "persistent" scenario would work well for some projects I've worked on for instance (1000s of SPs for better or for worse) - and just make people manage rollbacks for SPs by hand (its very rare).

I don't think other migration frameworks (my favourite being Flyway on Java) handle anything specially for SPs?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants