Skip to content

Instantly share code, notes, and snippets.

@DamianMac
Last active November 22, 2021 14:02
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DamianMac/28953ebc60157d43f197 to your computer and use it in GitHub Desktop.
Save DamianMac/28953ebc60157d43f197 to your computer and use it in GitHub Desktop.
DbUp Config to exec all stored procedure scripts from a directory
var upgrader =
DeployChanges.To
.SqlDatabase(connectionString)
.JournalTo(new NullJournal()) //means the execution won't get logged, so each script is run each time
.WithScriptsFromFileSystem("D:\\mystoredprocs\\")
.LogToConsole()
.Build();
var result = upgrader.PerformUpgrade();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment