-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
7 changed files
with
170 additions
and
3 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
users-microservice/src/Migrations/20240526051431_InitialCreate.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
users-microservice/src/Migrations/20240526051431_InitialCreate.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,44 @@ | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace src.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class InitialCreate : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.AlterDatabase() | ||
.Annotation("MySql:CharSet", "utf8mb4"); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "Users", | ||
columns: table => new | ||
{ | ||
Id = table.Column<int>(type: "int", nullable: false) | ||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), | ||
Name = table.Column<string>(type: "longtext", nullable: true) | ||
.Annotation("MySql:CharSet", "utf8mb4"), | ||
Email = table.Column<string>(type: "longtext", nullable: true) | ||
.Annotation("MySql:CharSet", "utf8mb4"), | ||
Password = table.Column<string>(type: "longtext", nullable: true) | ||
.Annotation("MySql:CharSet", "utf8mb4") | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Users", x => x.Id); | ||
}) | ||
.Annotation("MySql:CharSet", "utf8mb4"); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Users"); | ||
} | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
users-microservice/src/Migrations/MySqlContextModelSnapshot.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,48 @@ | ||
// <auto-generated /> | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | ||
using users_microservice.repositories; | ||
|
||
#nullable disable | ||
|
||
namespace src.Migrations | ||
{ | ||
[DbContext(typeof(MySqlContext))] | ||
partial class MySqlContextModelSnapshot : ModelSnapshot | ||
{ | ||
protected override void BuildModel(ModelBuilder modelBuilder) | ||
{ | ||
#pragma warning disable 612, 618 | ||
modelBuilder | ||
.HasAnnotation("ProductVersion", "9.0.0-preview.1.24081.2") | ||
.HasAnnotation("Relational:MaxIdentifierLength", 64); | ||
|
||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); | ||
|
||
modelBuilder.Entity("users_microservice.models.UserModel", b => | ||
{ | ||
b.Property<int>("Id") | ||
.ValueGeneratedOnAdd() | ||
.HasColumnType("int"); | ||
|
||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id")); | ||
|
||
b.Property<string>("Email") | ||
.HasColumnType("longtext"); | ||
|
||
b.Property<string>("Name") | ||
.HasColumnType("longtext"); | ||
|
||
b.Property<string>("Password") | ||
.HasColumnType("longtext"); | ||
|
||
b.HasKey("Id"); | ||
|
||
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
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