Updated DB Schema and added new initial create

This commit is contained in:
2019-01-30 22:49:01 +01:00
parent 273b960979
commit 15e2a650b9
14 changed files with 188 additions and 84 deletions

View File

@@ -9,7 +9,7 @@ using Tv7Playlist.Data;
namespace Tv7Playlist.Data.Migrations
{
[DbContext(typeof(PlaylistContext))]
[Migration("20190125212615_InitialCreate")]
[Migration("20190130214707_InitialCreate")]
partial class InitialCreate
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@@ -23,31 +23,37 @@ namespace Tv7Playlist.Data.Migrations
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("ChannelNumberExport");
b.Property<int>("ChannelNumberImport");
b.Property<DateTime>("Created");
b.Property<string>("EpgMatchName");
b.Property<bool>("IsAvailable");
b.Property<bool>("IsEnabled");
b.Property<string>("Name");
b.Property<string>("LogoUrl");
b.Property<string>("NameOverride");
b.Property<DateTime>("Modified");
b.Property<string>("Name");
b.Property<int>("Position");
b.Property<int>("TrackNumber");
b.Property<int>("TrackNumberOverride");
b.Property<string>("Url");
b.Property<string>("UrlOriginal");
b.Property<string>("UrlProxy");
b.HasKey("Id");
b.HasIndex("Name");
b.HasIndex("TrackNumber")
b.HasIndex("ChannelNumberImport")
.IsUnique();
b.HasIndex("Name");
b.ToTable("PlaylistEntries");
});
#pragma warning restore 612, 618

View File

@@ -13,30 +13,33 @@ namespace Tv7Playlist.Data.Migrations
{
Id = table.Column<Guid>(nullable: false),
Position = table.Column<int>(nullable: false),
TrackNumber = table.Column<int>(nullable: false),
TrackNumberOverride = table.Column<int>(nullable: false),
ChannelNumberImport = table.Column<int>(nullable: false),
ChannelNumberExport = table.Column<int>(nullable: false),
Name = table.Column<string>(nullable: true),
NameOverride = table.Column<string>(nullable: true),
Url = table.Column<string>(nullable: true),
EpgMatchName = table.Column<string>(nullable: true),
UrlProxy = table.Column<string>(nullable: true),
UrlOriginal = table.Column<string>(nullable: true),
LogoUrl = table.Column<string>(nullable: true),
IsAvailable = table.Column<bool>(nullable: false),
IsEnabled = table.Column<bool>(nullable: false)
IsEnabled = table.Column<bool>(nullable: false),
Created = table.Column<DateTime>(nullable: false),
Modified = table.Column<DateTime>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PlaylistEntries", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_PlaylistEntries_ChannelNumberImport",
table: "PlaylistEntries",
column: "ChannelNumberImport",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_PlaylistEntries_Name",
table: "PlaylistEntries",
column: "Name");
migrationBuilder.CreateIndex(
name: "IX_PlaylistEntries_TrackNumber",
table: "PlaylistEntries",
column: "TrackNumber",
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)

View File

@@ -21,31 +21,37 @@ namespace Tv7Playlist.Data.Migrations
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("ChannelNumberExport");
b.Property<int>("ChannelNumberImport");
b.Property<DateTime>("Created");
b.Property<string>("EpgMatchName");
b.Property<bool>("IsAvailable");
b.Property<bool>("IsEnabled");
b.Property<string>("Name");
b.Property<string>("LogoUrl");
b.Property<string>("NameOverride");
b.Property<DateTime>("Modified");
b.Property<string>("Name");
b.Property<int>("Position");
b.Property<int>("TrackNumber");
b.Property<int>("TrackNumberOverride");
b.Property<string>("Url");
b.Property<string>("UrlOriginal");
b.Property<string>("UrlProxy");
b.HasKey("Id");
b.HasIndex("Name");
b.HasIndex("TrackNumber")
b.HasIndex("ChannelNumberImport")
.IsUnique();
b.HasIndex("Name");
b.ToTable("PlaylistEntries");
});
#pragma warning restore 612, 618