Conditionals control flow should flow with migrations
See original GitHub issueDescribe the bug The check {if index exists} working in reverted way.
To Reproduce The following statement:
if (Schema.Table("core_users").Index("ix_core_users_discriminator").Exists())
Delete.Index("ix_core_users_discriminator").OnTable("core_users").OnColumn("discriminator");
throws an error: ORA-01418: specified index does not exist
Sql: DROP INDEX ix_core_users_discriminator
Expected behavior It should not attempt to delete the index
Information (please complete the following information):
- OS: Windows 10
- Platform .NET Core 3.1.x
- FluentMigrator version 3.2.6
- FluentMigrator runner
- Database Management System: Oracle
- Database Management System Version: “Oracle 18xe”
Additional context If I revert the statement to:
if (!Schema.Table("core_users").Index("ix_core_users_discriminator").Exists())
Delete.Index("ix_core_users_discriminator").OnTable("core_users").OnColumn("discriminator");
Then it works with no issue. See the “!”.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Best Practices for Migration to Flows
Migrate to Flow Learning Map · Migrate Processes and Workflows to Flow ... Performance: Can you use Entry Conditions or other optimizations to...
Read more >MinimumVersion X & --MaximumVersion Y --Task (Migrate ...
Is there a reason for the need to specify the whole migrate up and migrate ... Conditionals control flow should flow with migrations...
Read more >How to analyze, plan and prioritize your Flow migrations
How to analyze, plan and prioritize your Flow migrations. A lot has been written in blogs about how to build Flows and exploit...
Read more >Automate This! — Migrate Workflow Rules and Processes ...
Analyze existing flows to see if there are corresponding elements that you can update or incorporate new actions in an existing flow (this...
Read more >Control Flow - SQL Server Integration Services (SSIS)
It specifies the order in which tasks and containers are executed at run time and the conditions under which tasks and containers run....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I did create a batch actions ticket recently to make some of this easier to use: #1221
Separately, I had a separate idea for allowing monadic-like F#-like computation expressions in FluentMigrator. See: #987 The idea is that one could use something like LINQ IEnumerable interface and the LINQ syntax to define a monadic-like computation that builds up a list of side effects (aka migrations) and then executes them. While you might not think of an existence check as being a side effect, it does require querying the “outside world” and then taking a destructive action, so it is a side effect. But, in my judgment, there are higher priority features and I don’t know if most users would understand or like the idea vs. just fixing bugs and adding more common features like tablespaces/partitions and other things.
Thanks. I probably won’t look any further today but I have a checklist of things to investigate. Ideally I’d like to include a fix (or respond with correct usage syntax) before 3.2.7 is published, which I have a hard cut-off goal of Sunday night for 3.2.7 fixes.