J'essaie d'utiliser migratordotnet pour la base de données existante. Ma base de données compte environ 100 tables et j'essaie de générer une migration initiale.Migratordotnet créant la migration initiale
J'ai essayé d'utiliser
C:\migrations>Migrator.Console.exe SqlServer "Data Source=.\sqlexpress;Initial Catalog=my_database;Integrated Security = True;" MigracijeBaze.dll -dump InitialMigration.cs
Unfortinutely, la migration a généré chaque colonne avec typeof (string). Les colonnes Int, DateTime, Decimal sont converties en chaîne. Par exemple, pour la table Godine
CREATE TABLE [dbo].[Godine](
[ID] [int] IDENTITY(1,1) NOT NULL,
[FirmaID] [nvarchar](2) NOT NULL,
[Godina] [int] NOT NULL,
[BazaSifri] [nvarchar](50) NOT NULL,
[BazaPodataka] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_Godine] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
est généré la migration
Database.AddTable("Godine",
new Column("ID", typeof(String)),
new Column("FirmaID", typeof(String)),
new Column("Godina", typeof(String)),
new Column("BazaSifri", typeof(String)),
new Column("BazaPodataka", typeof(String)),
);
Est-ce que je fais quelque chose de mal? Quelles sont les meilleures pratiques pour effectuer des migrations initiales?