added initial migration
This commit is contained in:
32
Tv7Playlist.Data/Migrations/20181209233600_InitialCreate.cs
Normal file
32
Tv7Playlist.Data/Migrations/20181209233600_InitialCreate.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Tv7Playlist.Data.Migrations
|
||||
{
|
||||
public partial class InitialCreate : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PlaylistEntries",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(nullable: false),
|
||||
TrackNumber = table.Column<int>(nullable: false),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Url = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PlaylistEntries", x => x.Id);
|
||||
table.UniqueConstraint("AK_PlaylistEntries_TrackNumber", x => x.TrackNumber);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "PlaylistEntries");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user