-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add support for SQL Server memory-optimized tables #6442
Conversation
@@ -264,10 +274,12 @@ public virtual IReadOnlyList<MigrationOperation> GetDifferences(IModel source, I | |||
.Concat(dropTableOperations) | |||
.Concat(dropOperations) | |||
.Concat(dropColumnOperations) | |||
.Concat(alterDatabaseOperations) |
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.
My gut feeling is that this should go just before createSequenceOperations
.
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.
I have no objections
bcb1900
to
9e723d8
Compare
IEnumerable<IAnnotation> For([NotNull] IIndex index); | ||
IEnumerable<IAnnotation> For([NotNull] IProperty property); | ||
IEnumerable<IAnnotation> For([NotNull] IKey key); | ||
IEnumerable<IAnnotation> For([NotNull] IForeignKey foreignKey); | ||
IEnumerable<IAnnotation> For([NotNull] IEntityType entityType); | ||
IEnumerable<IAnnotation> For([NotNull] ISequence sequence); | ||
|
||
IEnumerable<IAnnotation> ForRemove([NotNull] IModel model); |
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.
Huh? The differ never generates DropDatabase operations...
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.
Oh interesting. It's a special AlterDatabase when you're going to InitialDatabase
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.
Makes sense.
👍 Looking good |
/// This API supports the Entity Framework Core infrastructure and is not intended to be used | ||
/// directly from your code. This API may change or be removed in future releases. | ||
/// </summary> | ||
public virtual bool IsMemoryOptimized |
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.
Given warning above, .Internal
namespace?
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.
I'll remove the doc comment
c994932
to
0c8532f
Compare
bool oldNullable = false, | ||
[CanBeNull] object oldDefaultValue = null, | ||
[CanBeNull] string oldDefaultValueSql = null, | ||
[CanBeNull] string oldComputedColumnSql = null) |
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.
I wonder if these should be grouped in the API. For example...
.AlterColumn(
oldColumn: new ColumnModel<int>(
isRequired: false));
...or...
.AlterColumn()
.OldColumn<int>(
isRequired: flase);
Might be worth discussing in a design meeting, but I also like the simplicity and consistency with Rename* of the way you have it.
|
Add ForSqlServerIsMemoryOptimized() EntityBuilder extension method Add support for conventions to run when an annotation is set Change conventions to not set cascade delete on foreign keys on memory-optimized tables Add convention to configure keys and indexes as nonclustered on memory-optimized tables Change IsClustered extension method on builders to take a bool? Add AlterDatabaseOperation and AlterTableOperation Add old values to all alter operations Add migrations annotations providers for IModel and ISequence Add migrations annotations providers for removed objects Set migrations annotations on drop operations Diff migrations annotations for IModel, IEntityType and ISequence Add support for memory-optimized tables to RelationalDatabaseCleaner Fixes #6405 Fixes #3122
0c8532f
to
326663a
Compare
Add ForSqlServerIsMemoryOptimized() EntityBuilder extension method
Add support for conventions to run on annotation set
Change conventions to not set cascade delete on foreign keys on on memory-optimized tables
Add convention to configure keys and indexes as nonclustered on memory-optimized tables
Change IsClustered extension method on builders to take a bool?
Add AlterDatabaseOperation and AlterTableOperation
Add OldAnnotations to all alter operations
Add migrations annotations providers for IModel and ISequence
Diff migrations annotations for IModel, IEntityType and ISequence
Set migrations annotations on drop operations
Add support for memory-optimized tables to RelationalDatabaseCleaner
Fixes #6405
Fixes #3122