DbUp is a .NET library that helps you to deploy changes to SQL Server databases. It tracks which SQL scripts have been run already, and runs the change scripts that are needed to get your database up to date.
dotnet --version
Just wanted to confirm what "out of the box" support there is for subfolders? I notice that the "improving.DbUp" project on github "adds support to DbUp for SeedData, FirstRun, Always Run and Migrations folders" which sound sensible, has anyone used that project?
Going further, I think it makes sense to keep individual scripts small and light, e.g. multiple scripts for each table, rather than one long file. So, Within FirstRun I might have folders for 1. Tables, 2. StoredProcs, 3. Functions, 4. Users, 5. Indexes, and 6.Constraints. This would keep things tidy and easy to work with, IMO. Would I need to supply my own EmbeddedScriptProvider to find the scripts in these sub folders?
I can't find where I saw it now, sadly. I'll try this structure tonight and see how I get on.
Do you think it's sensible to keep the constraints separate to the table creation as I've suggested? That way it ensures all the necessary tables are in place before foreign keys are added.
I found all the issues related to that... DbUp/DbUp#142 & DbUp/DbUp#346
I'm using 4.3.1. with EnsureDatabase.For.SqlDatabase(connectionString); Then I run a script that does a bunch of alter statements.