-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a980373
commit b84db98
Showing
6 changed files
with
242 additions
and
7 deletions.
There are no files selected for viewing
79 changes: 79 additions & 0 deletions
79
...ionsMicroservice.Database/Migrations/20230831142301_SyncDatabaseForProduction.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
73 changes: 73 additions & 0 deletions
73
...thenticationsMicroservice.Database/Migrations/20230831142301_SyncDatabaseForProduction.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,73 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace EasyMicroservices.AuthenticationsMicroservice.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class SyncDatabaseForProduction : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Users", | ||
columns: table => new | ||
{ | ||
Id = table.Column<long>(type: "bigint", nullable: false) | ||
.Annotation("SqlServer:Identity", "1, 1"), | ||
UserName = table.Column<string>(type: "nvarchar(450)", nullable: true), | ||
Password = table.Column<string>(type: "nvarchar(max)", nullable: true), | ||
UniqueIdentity = table.Column<string>(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS"), | ||
CreationDateTime = table.Column<DateTime>(type: "datetime2", nullable: false), | ||
ModificationDateTime = table.Column<DateTime>(type: "datetime2", nullable: true), | ||
IsDeleted = table.Column<bool>(type: "bit", nullable: false), | ||
DeletedDateTime = table.Column<DateTime>(type: "datetime2", nullable: true) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Users", x => x.Id); | ||
}); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Users_CreationDateTime", | ||
table: "Users", | ||
column: "CreationDateTime"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Users_DeletedDateTime", | ||
table: "Users", | ||
column: "DeletedDateTime"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Users_IsDeleted", | ||
table: "Users", | ||
column: "IsDeleted"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Users_ModificationDateTime", | ||
table: "Users", | ||
column: "ModificationDateTime"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Users_UniqueIdentity", | ||
table: "Users", | ||
column: "UniqueIdentity"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Users_UserName", | ||
table: "Users", | ||
column: "UserName", | ||
unique: true, | ||
filter: "[UserName] IS NOT NULL"); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Users"); | ||
} | ||
} | ||
} |
76 changes: 76 additions & 0 deletions
76
...es.AuthenticationsMicroservice.Database/Migrations/AuthenticationsContextModelSnapshot.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,76 @@ | ||
// <auto-generated /> | ||
using System; | ||
using EasyMicroservices.AuthenticationsMicroservice.Database.Contexts; | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | ||
|
||
#nullable disable | ||
|
||
namespace EasyMicroservices.AuthenticationsMicroservice.Migrations | ||
{ | ||
[DbContext(typeof(AuthenticationsContext))] | ||
partial class AuthenticationsContextModelSnapshot : ModelSnapshot | ||
{ | ||
protected override void BuildModel(ModelBuilder modelBuilder) | ||
{ | ||
#pragma warning disable 612, 618 | ||
modelBuilder | ||
.HasAnnotation("ProductVersion", "7.0.10") | ||
.HasAnnotation("Relational:MaxIdentifierLength", 128); | ||
|
||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); | ||
|
||
modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserEntity", b => | ||
{ | ||
b.Property<long>("Id") | ||
.ValueGeneratedOnAdd() | ||
.HasColumnType("bigint"); | ||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id")); | ||
b.Property<DateTime>("CreationDateTime") | ||
.HasColumnType("datetime2"); | ||
b.Property<DateTime?>("DeletedDateTime") | ||
.HasColumnType("datetime2"); | ||
b.Property<bool>("IsDeleted") | ||
.HasColumnType("bit"); | ||
b.Property<DateTime?>("ModificationDateTime") | ||
.HasColumnType("datetime2"); | ||
b.Property<string>("Password") | ||
.HasColumnType("nvarchar(max)"); | ||
b.Property<string>("UniqueIdentity") | ||
.HasColumnType("nvarchar(450)") | ||
.UseCollation("SQL_Latin1_General_CP1_CS_AS"); | ||
b.Property<string>("UserName") | ||
.HasColumnType("nvarchar(450)"); | ||
b.HasKey("Id"); | ||
b.HasIndex("CreationDateTime"); | ||
b.HasIndex("DeletedDateTime"); | ||
b.HasIndex("IsDeleted"); | ||
b.HasIndex("ModificationDateTime"); | ||
b.HasIndex("UniqueIdentity"); | ||
b.HasIndex("UserName") | ||
.IsUnique() | ||
.HasFilter("[UserName] IS NOT NULL"); | ||
b.ToTable("Users"); | ||
}); | ||
#pragma warning restore 612, 618 | ||
} | ||
} | ||
} |
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