-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrations: Honor [Column(Order)] in CreateTable operation
Resolves #10059
- Loading branch information
Showing
35 changed files
with
755 additions
and
70 deletions.
There are no files selected for viewing
This file contains 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
34 changes: 0 additions & 34 deletions
34
src/EFCore.Design/Metadata/Internal/ScaffoldingPropertyExtensions.cs
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Diagnostics | ||
{ | ||
/// <summary> | ||
/// A <see cref="DiagnosticSource" /> event payload class for events that have columns. | ||
/// </summary> | ||
public class ColumnsEventData : EventData | ||
{ | ||
/// <summary> | ||
/// Constructs the event payload. | ||
/// </summary> | ||
/// <param name="eventDefinition"> The event definition. </param> | ||
/// <param name="messageGenerator"> A delegate that generates a log message for this event. </param> | ||
/// <param name="storeObject"> The table. </param> | ||
/// <param name="columns"> The columns. </param> | ||
public ColumnsEventData( | ||
EventDefinitionBase eventDefinition, | ||
Func<EventDefinitionBase, EventData, string> messageGenerator, | ||
StoreObjectIdentifier storeObject, | ||
IReadOnlyList<string> columns) | ||
: base(eventDefinition, messageGenerator) | ||
{ | ||
StoreObject = storeObject; | ||
Columns = columns; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the table. | ||
/// </summary> | ||
/// <value> The table. </value> | ||
public virtual StoreObjectIdentifier StoreObject { get; } | ||
|
||
/// <summary> | ||
/// Gets the columns. | ||
/// </summary> | ||
/// <value> The columns. </value> | ||
public virtual IReadOnlyList<string> Columns { get; } | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/EFCore.Relational/Diagnostics/MigrationColumnOperationEventData.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Diagnostics; | ||
using Microsoft.EntityFrameworkCore.Migrations.Operations; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Diagnostics | ||
{ | ||
/// <summary> | ||
/// The <see cref="DiagnosticSource"/> event payload for events that reference a Migrations column operation. | ||
/// </summary> | ||
public class MigrationColumnOperationEventData : EventData | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="MigrationColumnOperationEventData"/> class. | ||
/// </summary> | ||
/// <param name="eventDefinition"> The event definition. </param> | ||
/// <param name="messageGenerator"> A delegate that generates a log message for this event. </param> | ||
/// <param name="columnOperation"> The column operation. </param> | ||
public MigrationColumnOperationEventData( | ||
EventDefinitionBase eventDefinition, | ||
Func<EventDefinitionBase, EventData, string> messageGenerator, | ||
ColumnOperation columnOperation) | ||
: base(eventDefinition, messageGenerator) | ||
=> ColumnOperation = columnOperation; | ||
|
||
/// <summary> | ||
/// Gets the column operation. | ||
/// </summary> | ||
/// <value> The column operation. </value> | ||
public virtual ColumnOperation ColumnOperation { get; } | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.