Questions tagged [dbup]

DbUp is the little script runner which helps you to deploy changes to databases. It is an open source .NET library. It tracks which SQL scripts have been run already, and runs the change scripts that are needed to get your database up to date.

DbUp uses a builder to configure your database deployments. This library's entry point is DeployChanges.To followed by extension methods for all of the supported databases. You can find the source code on GitHub.

Here is the sample code to configure DbUp in your console application.

var runner = DeployChanges.To
    .SqlDatabase(connectionString)
    .WithScriptsEmbeddedInAssembly(Assembly.GetExecutingAssembly())
    .LogToConsole()
    .Build();
49 questions
0
votes
0 answers

Running migrations on already existing database fails if column that is used by stored procedure renamed

Some time ago I created a database. For simplicity lets assume that I created single table and stored procedure in that db. To create database, table and procedures I use DbUp. SQL scripts that I have written: 001_CREATE_TABLE_dbo.TestTable.sql IF…
Leemellaret
  • 197
  • 1
  • 9
0
votes
2 answers

Problem Generating Html Report Using DbUp during Octopus Deployment

Using Octopus Deploy to deploy a simple API. The first step of our deployment process is to generate an HTML report with the delta of the scripts run vs the scripts required to run. I used this tutorial to create the step. The relevant code in my…
onefootswill
  • 3,707
  • 6
  • 47
  • 101
0
votes
1 answer

dbup AzureDatabaseEdition

i am getting an error in dbup on: EnsureDatabase.For.SqlDatabase(connectionString, 300, AzureDatabaseEdition.Basic); Error is: System.Data.SqlClient.SqlException: 'Incorrect syntax near 'basic'.' thanks for any help
0
votes
1 answer

DbUp wants to run previously run scripts

IConfiguration config = new ConfigurationBuilder() .AddJsonFile("appsettings.json") .AddJsonFile("appsettings.Development.json", true) .AddEnvironmentVariables() // Overwrite with any…
Richard Barraclough
  • 2,625
  • 3
  • 36
  • 54
0
votes
1 answer

Database deployment in Azure DevOps

We are using DbUp migration task (https://marketplace.visualstudio.com/items?itemName=johanclasson.UpdateDatabaseWithDbUp) for deploying the SQL scripts to Microsoft SQL server in Azure DevOps and this works perfectly fine when I need to deploy to a…
0
votes
1 answer

SQL multiple if's not running on DbUp

The following is my code IF NOT EXISTS (SELECT 1 FROM sys.objects o INNER JOIN sys.columns c ON o.object_id = c.object_id WHERE o.name = 'portfolioAttributeCodes' AND c.name = 'isDisplayed' ) BEGIN ALTER TABLE …
LeBlues
  • 305
  • 2
  • 5
  • 20
0
votes
1 answer

Azure CICD for SQL Server database deployment using DbUp library

I am trying to deploy the database changes through Azure CICD using the DbUp library. But I don't really understand what are the steps to be followed are, and how to start off initially. Can somebody share how we can deploy the SQL Server database…
0
votes
1 answer

Deploying SQL Server database with dbup on Docker

At our company we use a couple methods of updating database models. we use sqlproj and dacpacs as well as we have a .net core app using DbUp. I have successfully containerized using dacpac based of this article…
greektreat
  • 2,329
  • 3
  • 30
  • 53
0
votes
0 answers

DbUp - Loop script for different variable values

I'm trying to loop on a list of ID's in order to execute the same query with its different values. I was thinking about using IScript to create this loop using C#, but I don't have access to the variables that are passed when using…
Pedro Faustino
  • 227
  • 3
  • 14
0
votes
2 answers

What does "Resetting the connection" mean? System.Data.SqlClient.SqlException (0x80131904)

I know this is a bit vague, but I'm not being able to pinpoint the issue. When I run the a bit of code against a local database it runs fine. When I use a remote database I get an error. It occurs midway of the program execution. The DBup upgrade…
pitermarx
  • 908
  • 1
  • 9
  • 22
0
votes
1 answer

dbup does not create schemaversions table automatically

I installed the latest DbUp version 4.4.0 from nuget and followed the steps described in the docs https://dbup.readthedocs.io/en/latest/ I'm using a MySQL database and created a new .NET Core console project. There is no database present yet. I…
Question3r
  • 2,166
  • 19
  • 100
  • 200
0
votes
2 answers

DbUp SqlConnection AAD outh?

Due to security reason SQL authentication is disabled, only through Azure SPN can I login. From below link, in C#, we are able to…
0
votes
0 answers

Dbup custom script provider - need to prepend value to journal script names

I am creating a custom ScriptProvider implementing the IScriptProvider interface in dbup, and I am able to get a list of scripts using the GetScripts() method, and return a SqlScript object. I would like to compile the object first, and then prior…
hyphen
  • 2,368
  • 5
  • 28
  • 59
0
votes
0 answers

DbUp - Is it Possible to Deploy using Manifest File

We currently use Dbup for SQL deployment. I would like to configure Dbup to allow for the use of a manifest file for deployment. I envision a directory with a manifest file for each release, the manifest file containing the file name (or perhaps…
hyphen
  • 2,368
  • 5
  • 28
  • 59
0
votes
0 answers

dbup for Azure sql datawarehouse?

Does Dbup support the azure datawarehouse DB? When i tried to run the c# console project, even for select statement, i am getting the below error, any advice appreciated? is there any alternative sql automation version like dbup, apart from dacpac.…
baba
  • 31
  • 2