Korm performs migrations that default searches in the main assembly in the Sql scripts directory. The script file name must match pattern {migrationId}_{MigrationName}.sql.
MigrationId is increasing number over time.
For example: 20190301001_AddPeopleTable.sql
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].People(
[Id] [int] NOT NULL,
[Name] [nvarchar](255)
CONSTRAINT [PK_People] 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]
GO
This PR adding migration capability for Asp.net core apps.
For simple database migration, you must call:
The previous code requires the
KormMigration
section in the configurations:Korm performs migrations that default searches in the main assembly in the
Sql scripts
directory. The script file name must match pattern{migrationId}_{MigrationName}.sql
.MigrationId
is increasing number over time.For example:
20190301001_AddPeopleTable.sql
For more information read
README
file.