addes migration for sqlite to make sure the new id field is text
This commit is contained in:
75
Tv7Playlist.Data/Migrations/20200206214445_DotnetCore3_1_upgrade.Designer.cs
generated
Normal file
75
Tv7Playlist.Data/Migrations/20200206214445_DotnetCore3_1_upgrade.Designer.cs
generated
Normal file
@@ -0,0 +1,75 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Tv7Playlist.Data;
|
||||
|
||||
namespace Tv7Playlist.Data.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlaylistContext))]
|
||||
[Migration("20200206214445_DotnetCore3_1_upgrade")]
|
||||
partial class DotnetCore3_1_upgrade
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.1.1");
|
||||
|
||||
modelBuilder.Entity("Tv7Playlist.Data.PlaylistEntry", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("ChannelNumberExport")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ChannelNumberImport")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("EpgMatchName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("IsAvailable")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsEnabled")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("LogoUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("Modified")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Position")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("UrlOriginal")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UrlProxy")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ChannelNumberImport")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("Name");
|
||||
|
||||
b.ToTable("PlaylistEntries");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Tv7Playlist.Data.Migrations
|
||||
{
|
||||
public partial class DotnetCore3_1_upgrade : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
"PlaylistEntriesTemp",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<Guid>(),
|
||||
Position = table.Column<int>(),
|
||||
ChannelNumberImport = table.Column<int>(),
|
||||
ChannelNumberExport = table.Column<int>(),
|
||||
Name = 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>(),
|
||||
IsEnabled = table.Column<bool>(),
|
||||
Created = table.Column<DateTime>(),
|
||||
Modified = table.Column<DateTime>()
|
||||
});
|
||||
|
||||
migrationBuilder.Sql("INSERT INTO PlaylistEntriesTemp SELECT * From PlaylistEntries");
|
||||
|
||||
migrationBuilder.DropTable("PlaylistEntries");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"PlaylistEntries",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<Guid>(),
|
||||
Position = table.Column<int>(),
|
||||
ChannelNumberImport = table.Column<int>(),
|
||||
ChannelNumberExport = table.Column<int>(),
|
||||
Name = 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>(),
|
||||
IsEnabled = table.Column<bool>(),
|
||||
Created = table.Column<DateTime>(),
|
||||
Modified = table.Column<DateTime>()
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_PlaylistEntries", x => x.Id); });
|
||||
|
||||
migrationBuilder.Sql("INSERT INTO PlaylistEntries SELECT * From PlaylistEntriesTemp");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_PlaylistEntries_ChannelNumberImport",
|
||||
"PlaylistEntries",
|
||||
"ChannelNumberImport",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_PlaylistEntries_Name",
|
||||
"PlaylistEntries",
|
||||
"Name");
|
||||
|
||||
migrationBuilder.DropTable("PlaylistEntriesTemp");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@@ -14,36 +14,49 @@ namespace Tv7Playlist.Data.Migrations
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.2.1-servicing-10028");
|
||||
.HasAnnotation("ProductVersion", "3.1.1");
|
||||
|
||||
modelBuilder.Entity("Tv7Playlist.Data.PlaylistEntry", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("ChannelNumberExport");
|
||||
b.Property<int>("ChannelNumberExport")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ChannelNumberImport");
|
||||
b.Property<int>("ChannelNumberImport")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Created");
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("EpgMatchName");
|
||||
b.Property<string>("EpgMatchName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("IsAvailable");
|
||||
b.Property<bool>("IsAvailable")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsEnabled");
|
||||
b.Property<bool>("IsEnabled")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("LogoUrl");
|
||||
b.Property<string>("LogoUrl")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("Modified");
|
||||
b.Property<DateTime>("Modified")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name");
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Position");
|
||||
b.Property<int>("Position")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("UrlOriginal");
|
||||
b.Property<string>("UrlOriginal")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UrlProxy");
|
||||
b.Property<string>("UrlProxy")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
Reference in New Issue
Block a user