by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jojo Aquino
    @jfaquinojr
    @andrewdj awesome! I am not using stored procedures so, I guess there's no reason for me not to use dbup then
    Matthijs ter Woord
    @mterwoord
    Hi All! Is this chat still active?
    I'm wondering if its possible to have multiple sets of dbup scripts (and versions) inside 1 database/app?
    Matthijs ter Woord
    @mterwoord
    Got it. can do it on mssql with different schema's. works for me!
    Don Waldo
    @dgwaldo
    Any ideas on Invalid object name 'dbo.SchemaVersions'.??

    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.

    Don Waldo
    @dgwaldo
    nuget package version only goes back to 4.0.0
    Matthijs ter Woord
    @mterwoord
    that message is an error i guess it uses to see if it exists. does it give you an issue?
    Don Waldo
    @dgwaldo
    yah, the table never gets a journal entry, the table dbo.SchemaVersions does exist in the db when it's created.
    Don Waldo
    @dgwaldo
    Ok I think I found this issue
    this was at the end of my update script
    --USE [master]
    --GO
    --ALTER DATABASE [Test_CompanyDb] SET READ_WRITE
    --GO
    Ryan Paredes
    @RyanP741_gitlab
    Hello everyone. Got a quick question that I couldn't find any info on if it's possible or any possible workarounds. Basically, I'm running DbUp from PowerShell and have it working from the given example in the Usage section of the docs, but I'm wondering if there's a way to simulate the "NullJournal" functionality from PowerShell. Is it possible?
    Jeffry S. Rubaya
    @angelumDei19
    Hi everyone, can you confirm if DbUp has feature wherein it will check if the script in the current directory is modified, for example, a stored procedures, then rerun the said script even it is already available in the dbo.SchemaVersions ?
    Adrian Clark
    @AdrianJSClark
    Not by default. I have written a script provider in the past which appended the hash of the script content to the name of the script returned to DbUp for comparison. If the script names differ then the script is executed, so in that case the contents would change so the hash would change and you have your script run again.
    Another common thing is to have stored procedures written in idempotent scripts then use the "NullJournal" so that they execute every time. You just need to set up a separate upgrader for that (because you can only have a single journaller per upgrader).
    Davi Rodrigues
    @davirod
    Hi all, how are we today?! Got a, probably for you, simple question...I am using dbup-mysql for dotnet core and the Journal table is not being created. Is there any sample script where I can instantiate properly a MySqlTableJournal?

    I was trying to do something like this:

    var upgradeEngine = DeployChanges.To .MySqlDatabase(Helpers.Utils.GetRDSConnectionString(ConfigurationService)) .WithScriptsEmbeddedInAssembly(Assembly.GetExecutingAssembly()) .LogToConsole() .WithTransaction() .JournalTo(new MySqlTableJournal(() => new MySqlConnectionManager(Helpers.Utils.GetRDSConnectionString(ConfigurationService)), () => new CaptureLogsLogger(), "meta", "schemaversions")) .Build();

    but it doesn't seem to work
    yuanfei
    @yuanfei_gitlab
    anyone tried cloud storage provider?
    everfor
    @everfor007_twitter
    Does dbup support the Azure SQL Datawarehouse DB?

    [error]Script block number: -1; Message: Enforced unique constraints are not supported in Azure SQL Data Warehouse. To create an unenforced unique constraint you must include the NOT ENFORCED syntax as part of your statement.

    [error]System.Data.SqlClient.SqlException (0x80131904): Enforced unique constraints are not supported in Azure SQL Data Warehouse. To create an unenforced unique constraint you must include the NOT ENFORCED syntax as part of your statement.
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
    program.cs
    using DbUp; using System;
    using System.Configuration;
    using System.Reflection;

    namespace MIReport.Warehouse
    {
    class Program
    {
    static int Main(string[] args)
    {
    var connectionString = @"Server=tcp:" + args[0] + ",1433;Initial Catalog=" + args[1] + ";Persist Security Info=False;User ID=" + args[2] + ";Password=" + args[3] + ";MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Authentication='Active Directory Password';";

            var upgrader = DeployChanges.To
                .SqlDatabase(connectionString)
                .WithScriptsEmbeddedInAssembly(Assembly.GetExecutingAssembly())
                .LogToConsole()
                .LogScriptOutput()
                .Build();
    
            var result = upgrader.PerformUpgrade();
    
            if (!result.Successful)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(result.Error);
                Console.ResetColor();
                return -1;
            }
    
            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("Success!");
            Console.ResetColor();
            return 0;
        }
    }

    }
    i tried the above code, it's thrown out the sql exception for any command

    Harsh Manvar
    @harshmanvar
    Just looking forward there any docker image avilable for Db UP and or can i create own docker image ?
    Harsh Manvar
    @harsh4870
    Just looking forward there any docker image avilable for Db UP and or can i create own docker image ?
    Matthijs ter Woord
    @mterwoord
    docker image?
    Harsh Manvar
    @harshmanvar
    i am looking forward to deploy db up on kubernetes for deploying mysql scripts
    Harsh Manvar
    @harsh4870
    how to take snapshot or backup of whole database using dbup MySQl?
    kwml
    @kwml

    Does DbUp for PostgreSQL work with NodaTime? It's generating a patch script but when I try to execute it I get the following error: System.NotSupportedException: The CLR type System.DateTime isn't natively supported by Npgsql or your PostgreSQL. To use it with a PostgreSQL composite you need to specify DataTypeName or to map it, please refer to the documentation.

    I set: NpgsqlConnection.GlobalTypeMapper.UseNodaTime() before creating the upgrader as specified here: https://www.npgsql.org/doc/types/nodatime.html

    Matthew Edwards
    @_MattEdwards__twitter
    Does anyone know why when upgrading to the 4.3.0 nuget (in my case from 4.2.0) why System.Drawing and System.Windows.Forms are being added to the project? Is this because of Microsoft Azure or IdentityModel?
    Matthew Edwards
    @_MattEdwards__twitter
    NM. Answered my own question. It's MS IdentityModel.
    Natha
    @nzolotar
    I need to extend DbUp connection manager to use Azure TenantId, ClientId, ClientSecret.. to get connection to azure sql db. any thoughts?
    Marnee Dearman (KG7SIO)
    @MarneeDear
    You can pass them as parameters to your console app if you are using one