Created
July 31, 2015 22:10
-
-
Save edrohler/7e119015e2bbb51f8398 to your computer and use it in GitHub Desktop.
EF7 migration sql alter scripts
This file contains hidden or 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
migration.Sql("ALTER TABLE dbo.Availability ADD TotalHours AS DATEDIFF(SECOND,BeginTimeUtc,EndtimeUtc)/3600"); | |
migration.Sql("ALTER TABLE dbo.PayRate ADD EstWeeklyRateLow AS HourlyRateLow*DesiredWeeklyHours"); | |
migration.Sql("ALTER TABLE dbo.PayRate ADD EstWeeklyRateHigh AS HourlyRateHigh*DesiredWeeklyHours"); | |
migration.Sql("ALTER TABLE dbo.Location ADD GeoPoint AS geography::Point(Latitude,Longitude, 4326)"); | |
migration.Sql("ALTER TABLE dbo.ZipCodeLookup ADD GeoPoint AS geography::Point(Latitude,Longitude, 4326)"); | |
migration.Sql("ALTER TABLE dbo.Contact ADD DisplayName AS FirstName + ' ' + LastName"); | |
migration.Sql("ALTER TABLE dbo.Contact ADD LastNameFirst AS LastName + ', ' + FirstName"); | |
migration.Sql("ALTER TABLE dbo.Contact ADD PublicName AS FirstName + ' ' + SUBSTRING(LastName, 1, 1) + '.'"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment