Don't allow migrations to sepecify the charset

pull/3742/head
tidusjar 4 years ago
parent 86937d2a1c
commit 4fdda48512

@ -1,6 +1,7 @@
variables:
- template: templates/variables.yml
- isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/feature/v4')]
stages:
- stage: build
@ -90,4 +91,4 @@ stages:
isPreRelease: true
changeLogCompareToRelease: 'lastNonDraftRelease'
changeLogType: 'commitBased'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/feature/v4'))
condition: and(succeeded(), eq(variables.isMain, true))

File diff suppressed because it is too large Load Diff

@ -20,18 +20,18 @@ namespace Ombi.Store.Migrations.OmbiMySql
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("Name")
.HasColumnType("varchar(256) CHARACTER SET utf8mb4")
.HasColumnType("varchar(256)")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.HasColumnType("varchar(256) CHARACTER SET utf8mb4")
.HasColumnType("varchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
@ -50,14 +50,14 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("ClaimType")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("ClaimValue")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("RoleId")
.IsRequired()
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.HasKey("Id");
@ -73,14 +73,14 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("ClaimType")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("ClaimValue")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.HasKey("Id");
@ -92,17 +92,17 @@ namespace Ombi.Store.Migrations.OmbiMySql
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.Property<string>("LoginProvider")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.Property<string>("ProviderKey")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.Property<string>("ProviderDisplayName")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.HasKey("LoginProvider", "ProviderKey");
@ -114,10 +114,10 @@ namespace Ombi.Store.Migrations.OmbiMySql
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.Property<string>("RoleId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.HasKey("UserId", "RoleId");
@ -129,16 +129,16 @@ namespace Ombi.Store.Migrations.OmbiMySql
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.Property<string>("LoginProvider")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.Property<string>("Name")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.Property<string>("Value")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.HasKey("UserId", "LoginProvider", "Name");
@ -161,10 +161,10 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("datetime(6)");
b.Property<string>("Description")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("User")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.HasKey("Id");
@ -181,10 +181,10 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("datetime(6)");
b.Property<string>("Token")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("UserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.HasKey("Id");
@ -206,13 +206,13 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("tinyint(1)");
b.Property<string>("Message")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<int>("NotificationType")
.HasColumnType("int");
b.Property<string>("Subject")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.HasKey("Id");
@ -229,10 +229,10 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("datetime(6)");
b.Property<string>("PlayerId")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("UserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.HasKey("Id");
@ -244,20 +244,20 @@ namespace Ombi.Store.Migrations.OmbiMySql
modelBuilder.Entity("Ombi.Store.Entities.OmbiUser", b =>
{
b.Property<string>("Id")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.Property<int>("AccessFailedCount")
.HasColumnType("int");
b.Property<string>("Alias")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("Email")
.HasColumnType("varchar(256) CHARACTER SET utf8mb4")
.HasColumnType("varchar(256)")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed")
@ -267,7 +267,7 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("Language")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<DateTime?>("LastLoggedIn")
.HasColumnType("datetime(6)");
@ -285,36 +285,36 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("NormalizedEmail")
.HasColumnType("varchar(256) CHARACTER SET utf8mb4")
.HasColumnType("varchar(256)")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.HasColumnType("varchar(256) CHARACTER SET utf8mb4")
.HasColumnType("varchar(256)")
.HasMaxLength(256);
b.Property<string>("PasswordHash")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("PhoneNumber")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("tinyint(1)");
b.Property<string>("ProviderUserId")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("SecurityStamp")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("tinyint(1)");
b.Property<string>("UserAccessToken")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("UserName")
.HasColumnType("varchar(256) CHARACTER SET utf8mb4")
.HasColumnType("varchar(256)")
.HasMaxLength(256);
b.Property<int>("UserType")
@ -342,7 +342,7 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("datetime(6)");
b.Property<string>("AlbumId")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<int>("ContentId")
.HasColumnType("int");
@ -377,7 +377,7 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("datetime(6)");
b.Property<string>("Error")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<int>("RequestId")
.HasColumnType("int");
@ -406,7 +406,7 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("UserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.HasKey("Id");
@ -425,28 +425,28 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("tinyint(1)");
b.Property<string>("ArtistName")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<bool>("Available")
.HasColumnType("tinyint(1)");
b.Property<string>("Cover")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<bool?>("Denied")
.HasColumnType("tinyint(1)");
b.Property<string>("DeniedReason")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("Disk")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("ForeignAlbumId")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("ForeignArtistId")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<DateTime>("MarkedAsApproved")
.HasColumnType("datetime(6)");
@ -467,16 +467,16 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("RequestedByAlias")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<DateTime>("RequestedDate")
.HasColumnType("datetime(6)");
b.Property<string>("RequestedUserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.Property<string>("Title")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.HasKey("Id");
@ -501,7 +501,7 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("tinyint(1)");
b.Property<string>("DeniedReason")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<int?>("IssueId")
.HasColumnType("int");
@ -522,19 +522,19 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("RequestedByAlias")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<DateTime>("RequestedDate")
.HasColumnType("datetime(6)");
b.Property<string>("RequestedUserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.Property<int>("SeriesType")
.HasColumnType("int");
b.Property<string>("Title")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.HasKey("Id");
@ -552,7 +552,7 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("Value")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.HasKey("Id");
@ -566,7 +566,7 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("Comment")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<DateTime>("Date")
.HasColumnType("datetime(6)");
@ -575,7 +575,7 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("UserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.HasKey("Id");
@ -596,7 +596,7 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("datetime(6)");
b.Property<string>("Description")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<int>("IssueCategoryId")
.HasColumnType("int");
@ -605,7 +605,7 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("ProviderId")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<int?>("RequestId")
.HasColumnType("int");
@ -620,13 +620,13 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("Subject")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("Title")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("UserReportedId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.HasKey("Id");
@ -652,25 +652,25 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("tinyint(1)");
b.Property<string>("Background")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<bool?>("Denied")
.HasColumnType("tinyint(1)");
b.Property<string>("DeniedReason")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<DateTime?>("DigitalReleaseDate")
.HasColumnType("datetime(6)");
b.Property<string>("ImdbId")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<int?>("IssueId")
.HasColumnType("int");
b.Property<string>("LangCode")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<DateTime>("MarkedAsApproved")
.HasColumnType("datetime(6)");
@ -682,10 +682,10 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("datetime(6)");
b.Property<string>("Overview")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("PosterPath")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<int>("QualityOverride")
.HasColumnType("int");
@ -697,25 +697,25 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("RequestedByAlias")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<DateTime>("RequestedDate")
.HasColumnType("datetime(6)");
b.Property<string>("RequestedUserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.Property<int>("RootPathOverride")
.HasColumnType("int");
b.Property<string>("Status")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<int>("TheMovieDbId")
.HasColumnType("int");
b.Property<string>("Title")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.HasKey("Id");
@ -743,7 +743,7 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("UserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.HasKey("Id");
@ -759,16 +759,16 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("Background")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("ImdbId")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("Overview")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("PosterPath")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<int?>("QualityOverride")
.HasColumnType("int");
@ -780,10 +780,10 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("Status")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("Title")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<int>("TotalSeasons")
.HasColumnType("int");
@ -803,10 +803,10 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("Token")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("UserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.HasKey("Id");
@ -828,10 +828,10 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("tinyint(1)");
b.Property<string>("UserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.Property<string>("Value")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.HasKey("Id");
@ -865,7 +865,7 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("UserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.HasKey("Id");
@ -893,7 +893,7 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("UserId")
.HasColumnType("varchar(255) CHARACTER SET utf8mb4");
.HasColumnType("varchar(255)");
b.Property<int>("VoteType")
.HasColumnType("int");
@ -930,10 +930,10 @@ namespace Ombi.Store.Migrations.OmbiMySql
.HasColumnType("int");
b.Property<string>("Title")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.Property<string>("Url")
.HasColumnType("longtext CHARACTER SET utf8mb4");
.HasColumnType("longtext");
b.HasKey("Id");

@ -120,7 +120,10 @@ namespace Ombi.Extensions
public static void ConfigureMySql(DbContextOptionsBuilder options, PerDatabaseConfiguration config)
{
options.UseMySql(config.ConnectionString);
options.UseMySql(config.ConnectionString, b =>
{
b.CharSetBehavior(Pomelo.EntityFrameworkCore.MySql.Infrastructure.CharSetBehavior.NeverAppend);
});
}
public class DatabaseConfiguration

Loading…
Cancel
Save