-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
18 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1 @@ | ||
-- v14.8 | ||
IF NOT EXISTS (SELECT * FROM sys.columns | ||
WHERE Name = N'RouteLink' AND Object_ID = Object_ID(N'Post')) | ||
BEGIN | ||
EXEC sp_executesql N'ALTER TABLE Post ADD RouteLink NVARCHAR(256)' | ||
EXEC sp_executesql N'UPDATE Post SET RouteLink = FORMAT(PubDateUtc, ''yyyy/M/d'') + ''/'' + Slug' | ||
END | ||
|
||
IF EXISTS ( | ||
SELECT 1 | ||
FROM sys.columns c | ||
JOIN sys.objects o ON c.object_id = o.object_id | ||
WHERE o.name = 'Post' AND c.name = 'HashCheckSum' | ||
) | ||
BEGIN | ||
ALTER TABLE Post DROP COLUMN HashCheckSum; | ||
END; | ||
-- |