New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EF migration and sql upgrade file got wrong version numbers #235

Closed
FanrayMedia opened this Issue Sep 30, 2018 · 0 comments

Comments

Projects
1 participant
@FanrayMedia
Owner

FanrayMedia commented Sep 30, 2018

When I changed versioning schemes from v1.1 to v2.0, I overlooked these two things :( Unless you run pre-released Fanray, this will not affect you.

Code

-- lookup
SELECT * FROM dbo.__EFMigrationsHistory
WHERE MigrationId = '20180530163323_FanV1_1'


-- update to new name
UPDATE [dbo].[__EFMigrationsHistory] SET [MigrationId] = '20180530163323_FanV2_0'      
WHERE MigrationId = '20180530163323_FanV1_1'
GO

-- put it back
UPDATE [dbo].[__EFMigrationsHistory] SET [MigrationId] = '20180530163323_FanV1_1'      
WHERE MigrationId = '20180530163323_FanV2_0'
GO

There are several files require modification

  • 20180530163323_FanV2_0.cs and 20180530163323_FanV2_0.Designer, their class name must match
  • 1.0-1.1.sql to 1.0-2.0.sql
  • Two readme.md files, one in /sql folder, one in /Migrations
  • .sln file since it includes the /sql folder

migration ver upgrade before

@FanrayMedia FanrayMedia self-assigned this Oct 1, 2018

@FanrayMedia FanrayMedia added the bug label Oct 1, 2018

@FanrayMedia FanrayMedia added this to To do in v2.0-a1 via automation Oct 1, 2018

@FanrayMedia FanrayMedia added this to the v2.0-a1 milestone Oct 1, 2018

@FanrayMedia FanrayMedia closed this Oct 1, 2018

@FanrayMedia FanrayMedia changed the title from Migration and sql upgrade file got wrong version numbers to EF migration and sql upgrade file got wrong version numbers Oct 3, 2018

@FanrayMedia FanrayMedia moved this from To do to Done in v2.0-a1 Oct 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment