-
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
3 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
Clean Architecture/CleanMovie.API/Migrations/20240411104200_INitialMigration.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
Clean Architecture/CleanMovie.API/Migrations/20240411104200_INitialMigration.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,35 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace CleanMovie.API.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class INitialMigration : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Movies", | ||
columns: table => new | ||
{ | ||
Id = table.Column<int>(type: "int", nullable: false) | ||
.Annotation("SqlServer:Identity", "1, 1"), | ||
Name = table.Column<string>(type: "nvarchar(max)", nullable: false), | ||
Cost = table.Column<decimal>(type: "decimal(18,2)", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Movies", x => x.Id); | ||
}); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Movies"); | ||
} | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
Clean Architecture/CleanMovie.API/Migrations/MovieDBContextModelSnapshot.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,46 @@ | ||
// <auto-generated /> | ||
using CleanMovie.Infrastructure; | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | ||
|
||
#nullable disable | ||
|
||
namespace CleanMovie.API.Migrations | ||
{ | ||
[DbContext(typeof(MovieDBContext))] | ||
partial class MovieDBContextModelSnapshot : ModelSnapshot | ||
{ | ||
protected override void BuildModel(ModelBuilder modelBuilder) | ||
{ | ||
#pragma warning disable 612, 618 | ||
modelBuilder | ||
.HasAnnotation("ProductVersion", "8.0.4") | ||
.HasAnnotation("Relational:MaxIdentifierLength", 128); | ||
|
||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); | ||
|
||
modelBuilder.Entity("CleanMovie.Domain.Movie", b => | ||
{ | ||
b.Property<int>("Id") | ||
.ValueGeneratedOnAdd() | ||
.HasColumnType("int"); | ||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); | ||
b.Property<decimal>("Cost") | ||
.HasColumnType("decimal(18,2)"); | ||
b.Property<string>("Name") | ||
.IsRequired() | ||
.HasColumnType("nvarchar(max)"); | ||
b.HasKey("Id"); | ||
b.ToTable("Movies"); | ||
}); | ||
#pragma warning restore 612, 618 | ||
} | ||
} | ||
} |