fluent-migrator Questions

3

Solved

Let's say I have two independent tables in the same database, tables Book and Cup. I create both with just primary keys (int), called Id. Then, to keep things tidy, I separate them into different p...
Tropophilous asked 11/8, 2014 at 9:28

4

Solved

I must be missing something pretty basic. I'm working on a legacy project, and I'm trying to bring FluentMigrator into the mix cause I've got some interesting database changes and data migrations ...
Fibrinolysis asked 16/11, 2010 at 16:33

1

Solved

I have an application in .Net Core 3.1 using a SQL Server DB, where I have this SQL expression that I want to "convert" to a fluent migrator expression, but I'm not sure about how to do i...
Volans asked 9/2, 2021 at 15:7

5

Solved

Using FluentMigrator, the default creation of a Column using .AsString() results in an nvarchar(255). Is there a simple way (before I modify the FluentMigrator code) to create a column of type nvar...
Daina asked 23/3, 2010 at 0:20

2

I have several databases currently using FluentMigrator and am curious to know how Entity Framework Migrations compare. Can EF Migrations seed data in migrations and selectively run migration scri...
Stickinthemud asked 23/8, 2013 at 15:12

1

Solved

The project currently I'm working on, it has been changed to fluent migrator from EF migrations. What are the benefits of fluent migrator over ef migrations? Is it really worth using over EF migrat...
Bud asked 28/2, 2018 at 6:23

1

I'm trying to set a default value NewGuid() to a UUID/GUID column in MySQL 5.7 (with FluentMigrator in .Net Core). Create.Table("table") .WithColumn("auto_guid").AsGuid().NotNullable().WithDefault...
Duclos asked 16/9, 2019 at 17:17

1

Solved

I am using FluentMigrator to migrate one database schema to another. I have a case in which I want to check if some data (specifically a row) exists before adding a new one. if (!Schema.Table("MyT...
Stanwinn asked 19/8, 2019 at 21:0

3

When and why to use FluentMigrator as Entity Framework Code-First Migration does the same job. The two appear to be very similar, what problem or flaw does FluentMigrator solve when EF already prov...
Grating asked 17/6, 2017 at 10:0

1

Solved

I'm using this code for creating foreign key: Create.ForeignKey("FK_Table1_Table2") .FromTable("Table1").ForeignColumn("Table1_ID") .ToTable("Table2").PrimaryColumn("Table2_ID"); And as a resu...
Ghost asked 22/4, 2019 at 8:19

2

Solved

I am using FluentMigrator to migrate one database schema to another. I have a case in which I want to check if a foreign key exists before deleting it. Previously, I just delete the foreign key b...
Rudder asked 19/9, 2018 at 14:57

2

Solved

I created a new public class M203_InsertPercent that will just insert data into the database base on the SQL statement. When I run the Migrate.exe using the connection string and the assembly Fluen...
Megan asked 1/8, 2018 at 15:56

2

How can I force a 3 month old migration to re-run when I've got 60 or 70 migrations in between and I don't want to/can't do a full rollback? Apparently supplying the --version parameter of the val...
Command asked 4/12, 2013 at 17:34

2

Solved

I have inherited a project that uses FluentMigrator to manage migrations. Originally the project was executing the migrations in-process when the application started up but I.T. has cracked down on...
Sterol asked 27/8, 2014 at 18:10

1

Solved

I'm using FluentMigrator for database migrations on a SQL Server 2014 database. If I use the Rename builder to rename a table as such: Rename.Table("Old Name").To("NewName"); Do I then need to d...
Kassandra asked 19/12, 2016 at 16:27

1

Solved

I am using .Net4.5 and C#, I am working on one of database migrations using FluentMigrator. I am able to alter tables and add columns by using Alter.Table("Items").InSchema("Pricing") .AddColumn...
Rosemarierosemary asked 7/7, 2016 at 10:59

1

Solved

I'm looking for a way to write a extension method for fluent migrator check before create table, something like this Schema.TableIfNotExist("table").InSchema("dbo").WithColumn("Id").AsInt32().Not...
Burlingame asked 2/3, 2016 at 12:29

2

Solved

How can I alter column in fluent migration with default date time value that is current date time? So I need smth like this: ALTER TABLE database ADD column DATETIME DEFAULT GETDATE() NOT NULL; ...
Crass asked 5/1, 2013 at 12:57

3

Solved

Given the following Migration: [Migration(1)] public class Mig001 : Migration { public override void Up() { Alter.Table("foo").AlterColumn("bar").AsInt32().Nullable(); } public override void...
Gq asked 10/6, 2013 at 18:34

1

Solved

Im a classic programmer that is newbie at generics and this is an asp.net MVC5 sample application for learning purposes of integrating authorization (users/roles) using fluent migrator lib. I wantt...

2

I am using FluentMigrator to create a new table in DB. After I created, i realized that I need to add a constraint like the following in T-Sql: Assume I already have a table tableA Alter Table t...
Tatiania asked 19/6, 2014 at 15:10

1

Solved

I'm looking for a migrations framework that will work with an existing project that uses .NetTiers, an older ORM that requires CodeSmith to generate the data access code. We have some experience o...
Ashia asked 6/3, 2014 at 12:17

2

I need to rename the primary key of an existing table through FluentMigrator so an automapper can automatically detect the column. For most columns, it's a simple 1) delete any foreign key constr...
Cheep asked 27/11, 2013 at 22:23

1

Solved

Using FluentMigrator, is there way to find out if the MigrateUp() function will indeed migrate something or whether it's already up to date?
Countershading asked 27/2, 2014 at 18:6

1

Solved

I have an extension method that is used by several tables: public static ICreateTableColumnOptionOrWithColumnSyntax WithUser(this ICreateTableWithColumnSyntax tableWithColumnSyntax) { return tabl...
Garfield asked 28/8, 2013 at 0:32

© 2022 - 2024 — McMap. All rights reserved.