-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Proposed fix for Optional RestartSequenceOperation.StartValue #26560 #29346
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Can you please add two tests in MigrationsTestBase for restarting a sequence with and without a value (seems like we're missing value there)? You can look at Alter_sequence_increment_by as a basis for that. These would need to be overridden in MigrationsSqlServerTest to assert on the actual SQL generated, and also in MigrationsSqliteTest, which should simply assert not supported (since SQLite doesn't support sequences).
If you're having trouble figuring it out, let me know.
If this is
src/EFCore.Design/Migrations/Design/CSharpMigrationOperationGenerator.cs
Outdated
Show resolved
Hide resolved
src/EFCore.Design/Migrations/Design/CSharpMigrationOperationGenerator.cs
Outdated
Show resolved
Hide resolved
src/EFCore.Relational/Migrations/Operations/RestartSequenceOperation.cs
Outdated
Show resolved
Hide resolved
src/EFCore.SqlServer/Migrations/SqlServerMigrationsSqlGenerator.cs
Outdated
Show resolved
Hide resolved
Suggestions applied. |
Added unit tests for Restart operation (with and without startsAt parameter)
I think the scope of this issue was covered with the latest commit. Reverted all changes to Sequence and related. |
Modified the RestartSequenceOperation.StartValue's type from long to Nullable and adapted the dependencies.
Closes #26560