Proposed fix for Optional RestartSequenceOperation.StartValue #26560#29346
Proposed fix for Optional RestartSequenceOperation.StartValue #26560#29346bricelam merged 6 commits intodotnet:mainfrom
Conversation
roji
left a comment
There was a problem hiding this comment.
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
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
|
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