diff --git a/Kyoo/Kyoo.csproj b/Kyoo/Kyoo.csproj
index fcc1332c..69d8d8df 100644
--- a/Kyoo/Kyoo.csproj
+++ b/Kyoo/Kyoo.csproj
@@ -25,6 +25,7 @@
+
@@ -42,7 +43,6 @@
-
diff --git a/Kyoo/Models/DatabaseMigrations/IdentityConfiguration/20200413152957_Initial.Designer.cs b/Kyoo/Models/DatabaseMigrations/IdentityConfiguration/20200526235342_Initial.Designer.cs
similarity index 69%
rename from Kyoo/Models/DatabaseMigrations/IdentityConfiguration/20200413152957_Initial.Designer.cs
rename to Kyoo/Models/DatabaseMigrations/IdentityConfiguration/20200526235342_Initial.Designer.cs
index 9db66b75..02ebc8c3 100644
--- a/Kyoo/Models/DatabaseMigrations/IdentityConfiguration/20200413152957_Initial.Designer.cs
+++ b/Kyoo/Models/DatabaseMigrations/IdentityConfiguration/20200526235342_Initial.Designer.cs
@@ -5,52 +5,56 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
+namespace Kyoo.Models.DatabaseMigrations.IdentityConfiguration
{
[DbContext(typeof(ConfigurationDbContext))]
- [Migration("20200413152957_Initial")]
+ [Migration("20200526235342_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
- .HasAnnotation("ProductVersion", "3.1.3");
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
+ .HasAnnotation("ProductVersion", "3.1.3")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResource", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("Created")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("Description")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(1000)")
.HasMaxLength(1000);
b.Property("DisplayName")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("Enabled")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("LastAccessed")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("Name")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("NonEditable")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("Updated")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.HasKey("Id");
@@ -64,14 +68,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ApiResourceId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Type")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.HasKey("Id");
@@ -85,19 +90,20 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ApiResourceId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Key")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(250)")
.HasMaxLength(250);
b.Property("Value")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.HasKey("Id");
@@ -111,32 +117,33 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ApiResourceId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Description")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(1000)")
.HasMaxLength(1000);
b.Property("DisplayName")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("Emphasize")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("Name")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("Required")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("ShowInDiscoveryDocument")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.HasKey("Id");
@@ -152,14 +159,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ApiScopeId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Type")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.HasKey("Id");
@@ -173,29 +181,30 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ApiResourceId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Created")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("Description")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(1000)")
.HasMaxLength(1000);
b.Property("Expiration")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("Type")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(250)")
.HasMaxLength(250);
b.Property("Value")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(4000)")
.HasMaxLength(4000);
b.HasKey("Id");
@@ -209,143 +218,144 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("AbsoluteRefreshTokenLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("AccessTokenLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("AccessTokenType")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("AllowAccessTokensViaBrowser")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("AllowOfflineAccess")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("AllowPlainTextPkce")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("AllowRememberConsent")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("AlwaysIncludeUserClaimsInIdToken")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("AlwaysSendClientClaims")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("AuthorizationCodeLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("BackChannelLogoutSessionRequired")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("BackChannelLogoutUri")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.Property("ClientClaimsPrefix")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("ClientId")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("ClientName")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("ClientUri")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.Property("ConsentLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Created")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("Description")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(1000)")
.HasMaxLength(1000);
b.Property("DeviceCodeLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("EnableLocalLogin")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("Enabled")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("FrontChannelLogoutSessionRequired")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("FrontChannelLogoutUri")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.Property("IdentityTokenLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("IncludeJwtId")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("LastAccessed")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("LogoUri")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.Property("NonEditable")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("PairWiseSubjectSalt")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("ProtocolType")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("RefreshTokenExpiration")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("RefreshTokenUsage")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("RequireClientSecret")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("RequireConsent")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("RequirePkce")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("SlidingRefreshTokenLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("UpdateAccessTokenClaimsOnRefresh")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("Updated")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("UserCodeType")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(100)")
.HasMaxLength(100);
b.Property("UserSsoLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.HasKey("Id");
@@ -359,19 +369,20 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ClientId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Type")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(250)")
.HasMaxLength(250);
b.Property("Value")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(250)")
.HasMaxLength(250);
b.HasKey("Id");
@@ -385,14 +396,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ClientId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Origin")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(150)")
.HasMaxLength(150);
b.HasKey("Id");
@@ -406,14 +418,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ClientId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("GrantType")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(250)")
.HasMaxLength(250);
b.HasKey("Id");
@@ -427,14 +440,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ClientId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Provider")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.HasKey("Id");
@@ -448,14 +462,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ClientId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("PostLogoutRedirectUri")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.HasKey("Id");
@@ -469,19 +484,20 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ClientId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Key")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(250)")
.HasMaxLength(250);
b.Property("Value")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.HasKey("Id");
@@ -495,14 +511,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ClientId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("RedirectUri")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.HasKey("Id");
@@ -516,14 +533,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ClientId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Scope")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.HasKey("Id");
@@ -537,29 +555,30 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ClientId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Created")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("Description")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.Property("Expiration")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("Type")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(250)")
.HasMaxLength(250);
b.Property("Value")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(4000)")
.HasMaxLength(4000);
b.HasKey("Id");
@@ -573,14 +592,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("IdentityResourceId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Type")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.HasKey("Id");
@@ -594,41 +614,42 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("Created")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("Description")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(1000)")
.HasMaxLength(1000);
b.Property("DisplayName")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("Emphasize")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("Enabled")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("Name")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("NonEditable")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("Required")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("ShowInDiscoveryDocument")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("Updated")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.HasKey("Id");
@@ -642,19 +663,20 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("IdentityResourceId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Key")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(250)")
.HasMaxLength(250);
b.Property("Value")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.HasKey("Id");
diff --git a/Kyoo/Models/DatabaseMigrations/IdentityConfiguration/20200413152957_Initial.cs b/Kyoo/Models/DatabaseMigrations/IdentityConfiguration/20200526235342_Initial.cs
similarity index 91%
rename from Kyoo/Models/DatabaseMigrations/IdentityConfiguration/20200413152957_Initial.cs
rename to Kyoo/Models/DatabaseMigrations/IdentityConfiguration/20200526235342_Initial.cs
index 431b2fd9..447f9385 100644
--- a/Kyoo/Models/DatabaseMigrations/IdentityConfiguration/20200413152957_Initial.cs
+++ b/Kyoo/Models/DatabaseMigrations/IdentityConfiguration/20200526235342_Initial.cs
@@ -1,7 +1,8 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
+namespace Kyoo.Models.DatabaseMigrations.IdentityConfiguration
{
public partial class Initial : Migration
{
@@ -12,7 +13,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column(nullable: false),
Name = table.Column(maxLength: 200, nullable: false),
DisplayName = table.Column(maxLength: 200, nullable: true),
@@ -32,7 +33,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column(nullable: false),
ClientId = table.Column(maxLength: 200, nullable: false),
ProtocolType = table.Column(maxLength: 200, nullable: false),
@@ -85,7 +86,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column(nullable: false),
Name = table.Column(maxLength: 200, nullable: false),
DisplayName = table.Column(maxLength: 200, nullable: true),
@@ -107,7 +108,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Type = table.Column(maxLength: 200, nullable: false),
ApiResourceId = table.Column(nullable: false)
},
@@ -127,7 +128,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Key = table.Column(maxLength: 250, nullable: false),
Value = table.Column(maxLength: 2000, nullable: false),
ApiResourceId = table.Column(nullable: false)
@@ -148,7 +149,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column(maxLength: 200, nullable: false),
DisplayName = table.Column(maxLength: 200, nullable: true),
Description = table.Column(maxLength: 1000, nullable: true),
@@ -173,7 +174,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Description = table.Column(maxLength: 1000, nullable: true),
Value = table.Column(maxLength: 4000, nullable: false),
Expiration = table.Column(nullable: true),
@@ -197,7 +198,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Type = table.Column(maxLength: 250, nullable: false),
Value = table.Column(maxLength: 250, nullable: false),
ClientId = table.Column(nullable: false)
@@ -218,7 +219,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Origin = table.Column(maxLength: 150, nullable: false),
ClientId = table.Column(nullable: false)
},
@@ -238,7 +239,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
GrantType = table.Column(maxLength: 250, nullable: false),
ClientId = table.Column(nullable: false)
},
@@ -258,7 +259,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Provider = table.Column(maxLength: 200, nullable: false),
ClientId = table.Column(nullable: false)
},
@@ -278,7 +279,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
PostLogoutRedirectUri = table.Column(maxLength: 2000, nullable: false),
ClientId = table.Column(nullable: false)
},
@@ -298,7 +299,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Key = table.Column(maxLength: 250, nullable: false),
Value = table.Column(maxLength: 2000, nullable: false),
ClientId = table.Column(nullable: false)
@@ -319,7 +320,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
RedirectUri = table.Column(maxLength: 2000, nullable: false),
ClientId = table.Column(nullable: false)
},
@@ -339,7 +340,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Scope = table.Column(maxLength: 200, nullable: false),
ClientId = table.Column(nullable: false)
},
@@ -359,7 +360,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Description = table.Column(maxLength: 2000, nullable: true),
Value = table.Column(maxLength: 4000, nullable: false),
Expiration = table.Column(nullable: true),
@@ -383,7 +384,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Type = table.Column(maxLength: 200, nullable: false),
IdentityResourceId = table.Column(nullable: false)
},
@@ -403,7 +404,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Key = table.Column(maxLength: 250, nullable: false),
Value = table.Column(maxLength: 2000, nullable: false),
IdentityResourceId = table.Column(nullable: false)
@@ -424,7 +425,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
columns: table => new
{
Id = table.Column(nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Type = table.Column(maxLength: 200, nullable: false),
ApiScopeId = table.Column(nullable: false)
},
diff --git a/Kyoo/Models/DatabaseMigrations/IdentityConfiguration/ConfigurationDbContextModelSnapshot.cs b/Kyoo/Models/DatabaseMigrations/IdentityConfiguration/ConfigurationDbContextModelSnapshot.cs
index 6e988a02..f83d80e5 100644
--- a/Kyoo/Models/DatabaseMigrations/IdentityConfiguration/ConfigurationDbContextModelSnapshot.cs
+++ b/Kyoo/Models/DatabaseMigrations/IdentityConfiguration/ConfigurationDbContextModelSnapshot.cs
@@ -4,8 +4,9 @@ using IdentityServer4.EntityFramework.DbContexts;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
+namespace Kyoo.Models.DatabaseMigrations.IdentityConfiguration
{
[DbContext(typeof(ConfigurationDbContext))]
partial class ConfigurationDbContextModelSnapshot : ModelSnapshot
@@ -14,41 +15,44 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
#pragma warning disable 612, 618
modelBuilder
- .HasAnnotation("ProductVersion", "3.1.3");
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
+ .HasAnnotation("ProductVersion", "3.1.3")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResource", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("Created")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("Description")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(1000)")
.HasMaxLength(1000);
b.Property("DisplayName")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("Enabled")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("LastAccessed")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("Name")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("NonEditable")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("Updated")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.HasKey("Id");
@@ -62,14 +66,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ApiResourceId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Type")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.HasKey("Id");
@@ -83,19 +88,20 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ApiResourceId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Key")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(250)")
.HasMaxLength(250);
b.Property("Value")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.HasKey("Id");
@@ -109,32 +115,33 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ApiResourceId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Description")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(1000)")
.HasMaxLength(1000);
b.Property("DisplayName")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("Emphasize")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("Name")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("Required")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("ShowInDiscoveryDocument")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.HasKey("Id");
@@ -150,14 +157,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ApiScopeId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Type")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.HasKey("Id");
@@ -171,29 +179,30 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("ApiResourceId")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Created")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("Description")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(1000)")
.HasMaxLength(1000);
b.Property("Expiration")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("Type")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(250)")
.HasMaxLength(250);
b.Property("Value")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(4000)")
.HasMaxLength(4000);
b.HasKey("Id");
@@ -207,143 +216,144 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
{
b.Property("Id")
.ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("AbsoluteRefreshTokenLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("AccessTokenLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("AccessTokenType")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("AllowAccessTokensViaBrowser")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("AllowOfflineAccess")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("AllowPlainTextPkce")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("AllowRememberConsent")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("AlwaysIncludeUserClaimsInIdToken")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("AlwaysSendClientClaims")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("AuthorizationCodeLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("BackChannelLogoutSessionRequired")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("BackChannelLogoutUri")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.Property("ClientClaimsPrefix")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("ClientId")
.IsRequired()
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("ClientName")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(200)")
.HasMaxLength(200);
b.Property("ClientUri")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.Property("ConsentLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("Created")
- .HasColumnType("TEXT");
+ .HasColumnType("timestamp without time zone");
b.Property("Description")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(1000)")
.HasMaxLength(1000);
b.Property("DeviceCodeLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property("EnableLocalLogin")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("Enabled")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("FrontChannelLogoutSessionRequired")
- .HasColumnType("INTEGER");
+ .HasColumnType("boolean");
b.Property("FrontChannelLogoutUri")
- .HasColumnType("TEXT")
+ .HasColumnType("character varying(2000)")
.HasMaxLength(2000);
b.Property("IdentityTokenLifetime")
- .HasColumnType("INTEGER");
+ .HasColumnType("integer");
b.Property