move project
This commit is contained in:
123
Migrations/20250726215357_InitialMigration.Designer.cs
generated
Normal file
123
Migrations/20250726215357_InitialMigration.Designer.cs
generated
Normal file
@@ -0,0 +1,123 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace TagVid.Migrations
|
||||
{
|
||||
[DbContext(typeof(AdapterContext))]
|
||||
[Migration("20250726215357_InitialMigration")]
|
||||
partial class InitialMigration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.7")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Db.Models.Setting", b =>
|
||||
{
|
||||
b.Property<int>("Name")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Name");
|
||||
|
||||
b.ToTable("Settings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Db.Models.Tag", b =>
|
||||
{
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("Name");
|
||||
|
||||
b.ToTable("Tags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Db.Models.Video", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<TimeSpan>("Duration")
|
||||
.HasColumnType("time");
|
||||
|
||||
b.Property<string>("Extension")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Height")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Width")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Videos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Db.Models.VideoTag", b =>
|
||||
{
|
||||
b.Property<string>("VideoId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("TagId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("VideoId", "TagId");
|
||||
|
||||
b.HasIndex("TagId");
|
||||
|
||||
b.ToTable("VideoTags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Db.Models.VideoTag", b =>
|
||||
{
|
||||
b.HasOne("Db.Models.Tag", "Tag")
|
||||
.WithMany("VideoTags")
|
||||
.HasForeignKey("TagId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Db.Models.Video", "Video")
|
||||
.WithMany("VideoTags")
|
||||
.HasForeignKey("VideoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Tag");
|
||||
|
||||
b.Navigation("Video");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Db.Models.Tag", b =>
|
||||
{
|
||||
b.Navigation("VideoTags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Db.Models.Video", b =>
|
||||
{
|
||||
b.Navigation("VideoTags");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
99
Migrations/20250726215357_InitialMigration.cs
Normal file
99
Migrations/20250726215357_InitialMigration.cs
Normal file
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace TagVid.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class InitialMigration : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Settings",
|
||||
columns: table => new
|
||||
{
|
||||
Name = table.Column<int>(type: "int", nullable: false),
|
||||
Value = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Settings", x => x.Name);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Tags",
|
||||
columns: table => new
|
||||
{
|
||||
Name = table.Column<string>(type: "nvarchar(450)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Tags", x => x.Name);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Videos",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<string>(type: "nvarchar(450)", nullable: false),
|
||||
Title = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Duration = table.Column<TimeSpan>(type: "time", nullable: false),
|
||||
Width = table.Column<int>(type: "int", nullable: false),
|
||||
Height = table.Column<int>(type: "int", nullable: false),
|
||||
Extension = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Videos", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "VideoTags",
|
||||
columns: table => new
|
||||
{
|
||||
VideoId = table.Column<string>(type: "nvarchar(450)", nullable: false),
|
||||
TagId = table.Column<string>(type: "nvarchar(450)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_VideoTags", x => new { x.VideoId, x.TagId });
|
||||
table.ForeignKey(
|
||||
name: "FK_VideoTags_Tags_TagId",
|
||||
column: x => x.TagId,
|
||||
principalTable: "Tags",
|
||||
principalColumn: "Name",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_VideoTags_Videos_VideoId",
|
||||
column: x => x.VideoId,
|
||||
principalTable: "Videos",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_VideoTags_TagId",
|
||||
table: "VideoTags",
|
||||
column: "TagId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Settings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "VideoTags");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Tags");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Videos");
|
||||
}
|
||||
}
|
||||
}
|
120
Migrations/AdapterContextModelSnapshot.cs
Normal file
120
Migrations/AdapterContextModelSnapshot.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace TagVid.Migrations
|
||||
{
|
||||
[DbContext(typeof(AdapterContext))]
|
||||
partial class AdapterContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.7")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Db.Models.Setting", b =>
|
||||
{
|
||||
b.Property<int>("Name")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Name");
|
||||
|
||||
b.ToTable("Settings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Db.Models.Tag", b =>
|
||||
{
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("Name");
|
||||
|
||||
b.ToTable("Tags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Db.Models.Video", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<TimeSpan>("Duration")
|
||||
.HasColumnType("time");
|
||||
|
||||
b.Property<string>("Extension")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Height")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Width")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Videos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Db.Models.VideoTag", b =>
|
||||
{
|
||||
b.Property<string>("VideoId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("TagId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("VideoId", "TagId");
|
||||
|
||||
b.HasIndex("TagId");
|
||||
|
||||
b.ToTable("VideoTags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Db.Models.VideoTag", b =>
|
||||
{
|
||||
b.HasOne("Db.Models.Tag", "Tag")
|
||||
.WithMany("VideoTags")
|
||||
.HasForeignKey("TagId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Db.Models.Video", "Video")
|
||||
.WithMany("VideoTags")
|
||||
.HasForeignKey("VideoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Tag");
|
||||
|
||||
b.Navigation("Video");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Db.Models.Tag", b =>
|
||||
{
|
||||
b.Navigation("VideoTags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Db.Models.Video", b =>
|
||||
{
|
||||
b.Navigation("VideoTags");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user