fixed upgrade logic
This commit is contained in:
@ -6,15 +6,16 @@ IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.SchemaVersion
|
||||
(
|
||||
MigrationId nvarchar(150) NOT NULL CONSTRAINT PK___EFMigrationsHistory PRIMARY KEY,
|
||||
ProductVersion nvarchar(32) NOT NULL,
|
||||
AppliedVersion nvarchar(10) NOT NULL,
|
||||
AppliedDate datetime DEFAULT GETDATE()
|
||||
AppliedDate datetime2(7) NOT NULL,
|
||||
AppliedVersion nvarchar(10) NULL
|
||||
)
|
||||
END
|
||||
INSERT INTO __EFMigrationsHistory(MigrationId, ProductVersion, AppliedVersion)
|
||||
VALUES ('Master.01.00.00.00', '5.0.0', '{{Version}}')
|
||||
INSERT INTO __EFMigrationsHistory(MigrationId, ProductVersion, AppliedVersion)
|
||||
INSERT INTO __EFMigrationsHistory(MigrationId, ProductVersion, AppliedDate, AppliedVersion)
|
||||
VALUES ('Master.01.00.00.00', '5.0.0', SYSDATETIME(), '{{Version}}')
|
||||
INSERT INTO __EFMigrationsHistory(MigrationId, ProductVersion, AppliedDate, AppliedVersion)
|
||||
SELECT REPLACE(REPLACE(ScriptName, 'Oqtane.Scripts.', ''), '.sql', '') As MigrationId,
|
||||
ProductVersion = '5.0.0',
|
||||
AppliedDate = CONVERT(datetime2(7), Applied),
|
||||
AppliedVersion = '{{Version}}'
|
||||
FROM SchemaVersions
|
||||
WHERE ScriptName LIKE 'Oqtane.Scripts.Master.01%'
|
||||
|
@ -6,19 +6,20 @@ IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.SchemaVersion
|
||||
(
|
||||
MigrationId nvarchar(150) NOT NULL CONSTRAINT PK___EFMigrationsHistory PRIMARY KEY,
|
||||
ProductVersion nvarchar(32) NOT NULL,
|
||||
AppliedVersion nvarchar(10) NOT NULL,
|
||||
AppliedDate datetime DEFAULT GETDATE()
|
||||
AppliedDate datetime2(7) NOT NULL,
|
||||
AppliedVersion nvarchar(10) NULL
|
||||
)
|
||||
END
|
||||
INSERT INTO __EFMigrationsHistory(MigrationId, ProductVersion, AppliedVersion)
|
||||
VALUES ('Tenant.01.00.00.00', '5.0.0', '{{Version}}')
|
||||
INSERT INTO __EFMigrationsHistory(MigrationId, ProductVersion, AppliedVersion)
|
||||
INSERT INTO __EFMigrationsHistory(MigrationId, ProductVersion, AppliedDate, AppliedVersion)
|
||||
VALUES ('Tenant.01.00.00.00', '5.0.0', SYSDATETIME(), '{{Version}}')
|
||||
INSERT INTO __EFMigrationsHistory(MigrationId, ProductVersion, AppliedDate, AppliedVersion)
|
||||
SELECT REPLACE(REPLACE(ScriptName, 'Oqtane.Scripts.', ''), '.sql', '') As MigrationId,
|
||||
ProductVersion = '5.0.0',
|
||||
AppliedDate = CONVERT(datetime2(7), Applied),
|
||||
AppliedVersion = '{{Version}}'
|
||||
FROM SchemaVersions
|
||||
WHERE ScriptName LIKE 'Oqtane.Scripts.Tenant.01%'
|
||||
OR ScriptName LIKE 'Oqtane.Scripts.Tenant.02%'
|
||||
INSERT INTO __EFMigrationsHistory(MigrationId, ProductVersion, AppliedVersion)
|
||||
VALUES ('HtmlText.01.00.00.00', '5.0.0', '{{Version}}')
|
||||
INSERT INTO __EFMigrationsHistory(MigrationId, ProductVersion, AppliedDate, AppliedVersion)
|
||||
VALUES ('HtmlText.01.00.00.00', '5.0.0', SYSDATETIME(), '{{Version}}')
|
||||
END
|
Reference in New Issue
Block a user