How to determine exactly what migration that fails during migration? #1582
Replies: 3 comments 1 reply
-
I don't run into this problem... usually the output looks something like this (emphasis mine to indicate the prelude to running a specific migration): 2021021610: Issue8193_AlterTableFooAddColumns_Quantity_Price migratingBeginning Transaction !!! +- ALTER TABLE only allows columns to be added that can contain nulls, or have a DEFAULT definition specified, or the column being added is an identity or timestamp column, or alternatively if none of the previous conditions are satisfied the table must be empty to allow addition of this column. Column 'Quantity' cannot be added to non-empty table 'Foo' because it does not satisfy these conditions. |
Beta Was this translation helpful? Give feedback.
-
Are you using your own runner? I dont have this problem with FluentMigrator.Dotnet.Cli or with FluentMigrator.MSBuild.dll |
Beta Was this translation helpful? Give feedback.
-
We have the same issue. |
Beta Was this translation helpful? Give feedback.
-
Describe the question
I'm calling
IMigrationRunner.MigrateUp()
and a migration that usesExecute.Sql(string)
fails during execution because it has invalid sql (not important atm). The exception returned is:How can I get the name and/or version of the migration?
Expected benefit
Would be much easier to find exactly what migration that fails of instead of searching migrations for a specific string.
Information (please complete the following information):
Beta Was this translation helpful? Give feedback.
All reactions