mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Replacing sqlite with postgres
This commit is contained in:
parent
3684ea73f3
commit
28d48e9daf
@ -25,6 +25,7 @@
|
|||||||
<PackageReference Include="IdentityServer4.EntityFramework.Storage" Version="3.1.2" />
|
<PackageReference Include="IdentityServer4.EntityFramework.Storage" Version="3.1.2" />
|
||||||
<PackageReference Include="IdentityServer4.Storage" Version="3.1.2" />
|
<PackageReference Include="IdentityServer4.Storage" Version="3.1.2" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.3" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.3" />
|
||||||
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.3" />
|
||||||
<PackageReference Include="Portable.BouncyCastle" Version="1.8.6.7" />
|
<PackageReference Include="Portable.BouncyCastle" Version="1.8.6.7" />
|
||||||
<ProjectReference Include="../Kyoo.Common/Kyoo.Common.csproj" />
|
<ProjectReference Include="../Kyoo.Common/Kyoo.Common.csproj" />
|
||||||
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
|
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
|
||||||
@ -42,7 +43,6 @@
|
|||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="3.1.3" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="3.1.3" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.3" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.3" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.3" />
|
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -5,52 +5,56 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
namespace Kyoo.Models.DatabaseMigrations.IdentityConfiguration
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ConfigurationDbContext))]
|
[DbContext(typeof(ConfigurationDbContext))]
|
||||||
[Migration("20200413152957_Initial")]
|
[Migration("20200526235342_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
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 =>
|
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResource", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<DateTime>("Created")
|
b.Property<DateTime>("Created")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(1000)")
|
||||||
.HasMaxLength(1000);
|
.HasMaxLength(1000);
|
||||||
|
|
||||||
b.Property<string>("DisplayName")
|
b.Property<string>("DisplayName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
b.Property<bool>("Enabled")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<DateTime?>("LastAccessed")
|
b.Property<DateTime?>("LastAccessed")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<bool>("NonEditable")
|
b.Property<bool>("NonEditable")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<DateTime?>("Updated")
|
b.Property<DateTime?>("Updated")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -64,14 +68,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ApiResourceId")
|
b.Property<int>("ApiResourceId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -85,19 +90,20 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ApiResourceId")
|
b.Property<int>("ApiResourceId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Key")
|
b.Property<string>("Key")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -111,32 +117,33 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ApiResourceId")
|
b.Property<int>("ApiResourceId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(1000)")
|
||||||
.HasMaxLength(1000);
|
.HasMaxLength(1000);
|
||||||
|
|
||||||
b.Property<string>("DisplayName")
|
b.Property<string>("DisplayName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<bool>("Emphasize")
|
b.Property<bool>("Emphasize")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<bool>("Required")
|
b.Property<bool>("Required")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("ShowInDiscoveryDocument")
|
b.Property<bool>("ShowInDiscoveryDocument")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -152,14 +159,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ApiScopeId")
|
b.Property<int>("ApiScopeId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -173,29 +181,30 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ApiResourceId")
|
b.Property<int>("ApiResourceId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<DateTime>("Created")
|
b.Property<DateTime>("Created")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(1000)")
|
||||||
.HasMaxLength(1000);
|
.HasMaxLength(1000);
|
||||||
|
|
||||||
b.Property<DateTime?>("Expiration")
|
b.Property<DateTime?>("Expiration")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(4000)")
|
||||||
.HasMaxLength(4000);
|
.HasMaxLength(4000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -209,143 +218,144 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("AbsoluteRefreshTokenLifetime")
|
b.Property<int>("AbsoluteRefreshTokenLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<int>("AccessTokenLifetime")
|
b.Property<int>("AccessTokenLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<int>("AccessTokenType")
|
b.Property<int>("AccessTokenType")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<bool>("AllowAccessTokensViaBrowser")
|
b.Property<bool>("AllowAccessTokensViaBrowser")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("AllowOfflineAccess")
|
b.Property<bool>("AllowOfflineAccess")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("AllowPlainTextPkce")
|
b.Property<bool>("AllowPlainTextPkce")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("AllowRememberConsent")
|
b.Property<bool>("AllowRememberConsent")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
|
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("AlwaysSendClientClaims")
|
b.Property<bool>("AlwaysSendClientClaims")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<int>("AuthorizationCodeLifetime")
|
b.Property<int>("AuthorizationCodeLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<bool>("BackChannelLogoutSessionRequired")
|
b.Property<bool>("BackChannelLogoutSessionRequired")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("BackChannelLogoutUri")
|
b.Property<string>("BackChannelLogoutUri")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.Property<string>("ClientClaimsPrefix")
|
b.Property<string>("ClientClaimsPrefix")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("ClientId")
|
b.Property<string>("ClientId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("ClientName")
|
b.Property<string>("ClientName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("ClientUri")
|
b.Property<string>("ClientUri")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.Property<int?>("ConsentLifetime")
|
b.Property<int?>("ConsentLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<DateTime>("Created")
|
b.Property<DateTime>("Created")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(1000)")
|
||||||
.HasMaxLength(1000);
|
.HasMaxLength(1000);
|
||||||
|
|
||||||
b.Property<int>("DeviceCodeLifetime")
|
b.Property<int>("DeviceCodeLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<bool>("EnableLocalLogin")
|
b.Property<bool>("EnableLocalLogin")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
b.Property<bool>("Enabled")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("FrontChannelLogoutSessionRequired")
|
b.Property<bool>("FrontChannelLogoutSessionRequired")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("FrontChannelLogoutUri")
|
b.Property<string>("FrontChannelLogoutUri")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.Property<int>("IdentityTokenLifetime")
|
b.Property<int>("IdentityTokenLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<bool>("IncludeJwtId")
|
b.Property<bool>("IncludeJwtId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<DateTime?>("LastAccessed")
|
b.Property<DateTime?>("LastAccessed")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("LogoUri")
|
b.Property<string>("LogoUri")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.Property<bool>("NonEditable")
|
b.Property<bool>("NonEditable")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("PairWiseSubjectSalt")
|
b.Property<string>("PairWiseSubjectSalt")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("ProtocolType")
|
b.Property<string>("ProtocolType")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<int>("RefreshTokenExpiration")
|
b.Property<int>("RefreshTokenExpiration")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<int>("RefreshTokenUsage")
|
b.Property<int>("RefreshTokenUsage")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<bool>("RequireClientSecret")
|
b.Property<bool>("RequireClientSecret")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("RequireConsent")
|
b.Property<bool>("RequireConsent")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("RequirePkce")
|
b.Property<bool>("RequirePkce")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<int>("SlidingRefreshTokenLifetime")
|
b.Property<int>("SlidingRefreshTokenLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<bool>("UpdateAccessTokenClaimsOnRefresh")
|
b.Property<bool>("UpdateAccessTokenClaimsOnRefresh")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<DateTime?>("Updated")
|
b.Property<DateTime?>("Updated")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("UserCodeType")
|
b.Property<string>("UserCodeType")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(100)")
|
||||||
.HasMaxLength(100);
|
.HasMaxLength(100);
|
||||||
|
|
||||||
b.Property<int?>("UserSsoLifetime")
|
b.Property<int?>("UserSsoLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -359,19 +369,20 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -385,14 +396,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Origin")
|
b.Property<string>("Origin")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(150)")
|
||||||
.HasMaxLength(150);
|
.HasMaxLength(150);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -406,14 +418,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("GrantType")
|
b.Property<string>("GrantType")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -427,14 +440,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Provider")
|
b.Property<string>("Provider")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -448,14 +462,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("PostLogoutRedirectUri")
|
b.Property<string>("PostLogoutRedirectUri")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -469,19 +484,20 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Key")
|
b.Property<string>("Key")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -495,14 +511,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("RedirectUri")
|
b.Property<string>("RedirectUri")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -516,14 +533,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Scope")
|
b.Property<string>("Scope")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -537,29 +555,30 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<DateTime>("Created")
|
b.Property<DateTime>("Created")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.Property<DateTime?>("Expiration")
|
b.Property<DateTime?>("Expiration")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(4000)")
|
||||||
.HasMaxLength(4000);
|
.HasMaxLength(4000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -573,14 +592,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("IdentityResourceId")
|
b.Property<int>("IdentityResourceId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -594,41 +614,42 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<DateTime>("Created")
|
b.Property<DateTime>("Created")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(1000)")
|
||||||
.HasMaxLength(1000);
|
.HasMaxLength(1000);
|
||||||
|
|
||||||
b.Property<string>("DisplayName")
|
b.Property<string>("DisplayName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<bool>("Emphasize")
|
b.Property<bool>("Emphasize")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
b.Property<bool>("Enabled")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<bool>("NonEditable")
|
b.Property<bool>("NonEditable")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("Required")
|
b.Property<bool>("Required")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("ShowInDiscoveryDocument")
|
b.Property<bool>("ShowInDiscoveryDocument")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<DateTime?>("Updated")
|
b.Property<DateTime?>("Updated")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -642,19 +663,20 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("IdentityResourceId")
|
b.Property<int>("IdentityResourceId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Key")
|
b.Property<string>("Key")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
@ -1,7 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
namespace Kyoo.Models.DatabaseMigrations.IdentityConfiguration
|
||||||
{
|
{
|
||||||
public partial class Initial : Migration
|
public partial class Initial : Migration
|
||||||
{
|
{
|
||||||
@ -12,7 +13,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Enabled = table.Column<bool>(nullable: false),
|
Enabled = table.Column<bool>(nullable: false),
|
||||||
Name = table.Column<string>(maxLength: 200, nullable: false),
|
Name = table.Column<string>(maxLength: 200, nullable: false),
|
||||||
DisplayName = table.Column<string>(maxLength: 200, nullable: true),
|
DisplayName = table.Column<string>(maxLength: 200, nullable: true),
|
||||||
@ -32,7 +33,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Enabled = table.Column<bool>(nullable: false),
|
Enabled = table.Column<bool>(nullable: false),
|
||||||
ClientId = table.Column<string>(maxLength: 200, nullable: false),
|
ClientId = table.Column<string>(maxLength: 200, nullable: false),
|
||||||
ProtocolType = table.Column<string>(maxLength: 200, nullable: false),
|
ProtocolType = table.Column<string>(maxLength: 200, nullable: false),
|
||||||
@ -85,7 +86,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Enabled = table.Column<bool>(nullable: false),
|
Enabled = table.Column<bool>(nullable: false),
|
||||||
Name = table.Column<string>(maxLength: 200, nullable: false),
|
Name = table.Column<string>(maxLength: 200, nullable: false),
|
||||||
DisplayName = table.Column<string>(maxLength: 200, nullable: true),
|
DisplayName = table.Column<string>(maxLength: 200, nullable: true),
|
||||||
@ -107,7 +108,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Type = table.Column<string>(maxLength: 200, nullable: false),
|
Type = table.Column<string>(maxLength: 200, nullable: false),
|
||||||
ApiResourceId = table.Column<int>(nullable: false)
|
ApiResourceId = table.Column<int>(nullable: false)
|
||||||
},
|
},
|
||||||
@ -127,7 +128,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Key = table.Column<string>(maxLength: 250, nullable: false),
|
Key = table.Column<string>(maxLength: 250, nullable: false),
|
||||||
Value = table.Column<string>(maxLength: 2000, nullable: false),
|
Value = table.Column<string>(maxLength: 2000, nullable: false),
|
||||||
ApiResourceId = table.Column<int>(nullable: false)
|
ApiResourceId = table.Column<int>(nullable: false)
|
||||||
@ -148,7 +149,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Name = table.Column<string>(maxLength: 200, nullable: false),
|
Name = table.Column<string>(maxLength: 200, nullable: false),
|
||||||
DisplayName = table.Column<string>(maxLength: 200, nullable: true),
|
DisplayName = table.Column<string>(maxLength: 200, nullable: true),
|
||||||
Description = table.Column<string>(maxLength: 1000, nullable: true),
|
Description = table.Column<string>(maxLength: 1000, nullable: true),
|
||||||
@ -173,7 +174,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Description = table.Column<string>(maxLength: 1000, nullable: true),
|
Description = table.Column<string>(maxLength: 1000, nullable: true),
|
||||||
Value = table.Column<string>(maxLength: 4000, nullable: false),
|
Value = table.Column<string>(maxLength: 4000, nullable: false),
|
||||||
Expiration = table.Column<DateTime>(nullable: true),
|
Expiration = table.Column<DateTime>(nullable: true),
|
||||||
@ -197,7 +198,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Type = table.Column<string>(maxLength: 250, nullable: false),
|
Type = table.Column<string>(maxLength: 250, nullable: false),
|
||||||
Value = table.Column<string>(maxLength: 250, nullable: false),
|
Value = table.Column<string>(maxLength: 250, nullable: false),
|
||||||
ClientId = table.Column<int>(nullable: false)
|
ClientId = table.Column<int>(nullable: false)
|
||||||
@ -218,7 +219,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Origin = table.Column<string>(maxLength: 150, nullable: false),
|
Origin = table.Column<string>(maxLength: 150, nullable: false),
|
||||||
ClientId = table.Column<int>(nullable: false)
|
ClientId = table.Column<int>(nullable: false)
|
||||||
},
|
},
|
||||||
@ -238,7 +239,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
GrantType = table.Column<string>(maxLength: 250, nullable: false),
|
GrantType = table.Column<string>(maxLength: 250, nullable: false),
|
||||||
ClientId = table.Column<int>(nullable: false)
|
ClientId = table.Column<int>(nullable: false)
|
||||||
},
|
},
|
||||||
@ -258,7 +259,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Provider = table.Column<string>(maxLength: 200, nullable: false),
|
Provider = table.Column<string>(maxLength: 200, nullable: false),
|
||||||
ClientId = table.Column<int>(nullable: false)
|
ClientId = table.Column<int>(nullable: false)
|
||||||
},
|
},
|
||||||
@ -278,7 +279,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
PostLogoutRedirectUri = table.Column<string>(maxLength: 2000, nullable: false),
|
PostLogoutRedirectUri = table.Column<string>(maxLength: 2000, nullable: false),
|
||||||
ClientId = table.Column<int>(nullable: false)
|
ClientId = table.Column<int>(nullable: false)
|
||||||
},
|
},
|
||||||
@ -298,7 +299,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Key = table.Column<string>(maxLength: 250, nullable: false),
|
Key = table.Column<string>(maxLength: 250, nullable: false),
|
||||||
Value = table.Column<string>(maxLength: 2000, nullable: false),
|
Value = table.Column<string>(maxLength: 2000, nullable: false),
|
||||||
ClientId = table.Column<int>(nullable: false)
|
ClientId = table.Column<int>(nullable: false)
|
||||||
@ -319,7 +320,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
RedirectUri = table.Column<string>(maxLength: 2000, nullable: false),
|
RedirectUri = table.Column<string>(maxLength: 2000, nullable: false),
|
||||||
ClientId = table.Column<int>(nullable: false)
|
ClientId = table.Column<int>(nullable: false)
|
||||||
},
|
},
|
||||||
@ -339,7 +340,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Scope = table.Column<string>(maxLength: 200, nullable: false),
|
Scope = table.Column<string>(maxLength: 200, nullable: false),
|
||||||
ClientId = table.Column<int>(nullable: false)
|
ClientId = table.Column<int>(nullable: false)
|
||||||
},
|
},
|
||||||
@ -359,7 +360,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Description = table.Column<string>(maxLength: 2000, nullable: true),
|
Description = table.Column<string>(maxLength: 2000, nullable: true),
|
||||||
Value = table.Column<string>(maxLength: 4000, nullable: false),
|
Value = table.Column<string>(maxLength: 4000, nullable: false),
|
||||||
Expiration = table.Column<DateTime>(nullable: true),
|
Expiration = table.Column<DateTime>(nullable: true),
|
||||||
@ -383,7 +384,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Type = table.Column<string>(maxLength: 200, nullable: false),
|
Type = table.Column<string>(maxLength: 200, nullable: false),
|
||||||
IdentityResourceId = table.Column<int>(nullable: false)
|
IdentityResourceId = table.Column<int>(nullable: false)
|
||||||
},
|
},
|
||||||
@ -403,7 +404,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Key = table.Column<string>(maxLength: 250, nullable: false),
|
Key = table.Column<string>(maxLength: 250, nullable: false),
|
||||||
Value = table.Column<string>(maxLength: 2000, nullable: false),
|
Value = table.Column<string>(maxLength: 2000, nullable: false),
|
||||||
IdentityResourceId = table.Column<int>(nullable: false)
|
IdentityResourceId = table.Column<int>(nullable: false)
|
||||||
@ -424,7 +425,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Type = table.Column<string>(maxLength: 200, nullable: false),
|
Type = table.Column<string>(maxLength: 200, nullable: false),
|
||||||
ApiScopeId = table.Column<int>(nullable: false)
|
ApiScopeId = table.Column<int>(nullable: false)
|
||||||
},
|
},
|
@ -4,8 +4,9 @@ using IdentityServer4.EntityFramework.DbContexts;
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
namespace Kyoo.Models.DatabaseMigrations.IdentityConfiguration
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ConfigurationDbContext))]
|
[DbContext(typeof(ConfigurationDbContext))]
|
||||||
partial class ConfigurationDbContextModelSnapshot : ModelSnapshot
|
partial class ConfigurationDbContextModelSnapshot : ModelSnapshot
|
||||||
@ -14,41 +15,44 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
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 =>
|
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResource", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<DateTime>("Created")
|
b.Property<DateTime>("Created")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(1000)")
|
||||||
.HasMaxLength(1000);
|
.HasMaxLength(1000);
|
||||||
|
|
||||||
b.Property<string>("DisplayName")
|
b.Property<string>("DisplayName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
b.Property<bool>("Enabled")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<DateTime?>("LastAccessed")
|
b.Property<DateTime?>("LastAccessed")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<bool>("NonEditable")
|
b.Property<bool>("NonEditable")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<DateTime?>("Updated")
|
b.Property<DateTime?>("Updated")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -62,14 +66,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ApiResourceId")
|
b.Property<int>("ApiResourceId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -83,19 +88,20 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ApiResourceId")
|
b.Property<int>("ApiResourceId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Key")
|
b.Property<string>("Key")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -109,32 +115,33 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ApiResourceId")
|
b.Property<int>("ApiResourceId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(1000)")
|
||||||
.HasMaxLength(1000);
|
.HasMaxLength(1000);
|
||||||
|
|
||||||
b.Property<string>("DisplayName")
|
b.Property<string>("DisplayName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<bool>("Emphasize")
|
b.Property<bool>("Emphasize")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<bool>("Required")
|
b.Property<bool>("Required")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("ShowInDiscoveryDocument")
|
b.Property<bool>("ShowInDiscoveryDocument")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -150,14 +157,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ApiScopeId")
|
b.Property<int>("ApiScopeId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -171,29 +179,30 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ApiResourceId")
|
b.Property<int>("ApiResourceId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<DateTime>("Created")
|
b.Property<DateTime>("Created")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(1000)")
|
||||||
.HasMaxLength(1000);
|
.HasMaxLength(1000);
|
||||||
|
|
||||||
b.Property<DateTime?>("Expiration")
|
b.Property<DateTime?>("Expiration")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(4000)")
|
||||||
.HasMaxLength(4000);
|
.HasMaxLength(4000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -207,143 +216,144 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("AbsoluteRefreshTokenLifetime")
|
b.Property<int>("AbsoluteRefreshTokenLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<int>("AccessTokenLifetime")
|
b.Property<int>("AccessTokenLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<int>("AccessTokenType")
|
b.Property<int>("AccessTokenType")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<bool>("AllowAccessTokensViaBrowser")
|
b.Property<bool>("AllowAccessTokensViaBrowser")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("AllowOfflineAccess")
|
b.Property<bool>("AllowOfflineAccess")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("AllowPlainTextPkce")
|
b.Property<bool>("AllowPlainTextPkce")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("AllowRememberConsent")
|
b.Property<bool>("AllowRememberConsent")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
|
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("AlwaysSendClientClaims")
|
b.Property<bool>("AlwaysSendClientClaims")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<int>("AuthorizationCodeLifetime")
|
b.Property<int>("AuthorizationCodeLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<bool>("BackChannelLogoutSessionRequired")
|
b.Property<bool>("BackChannelLogoutSessionRequired")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("BackChannelLogoutUri")
|
b.Property<string>("BackChannelLogoutUri")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.Property<string>("ClientClaimsPrefix")
|
b.Property<string>("ClientClaimsPrefix")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("ClientId")
|
b.Property<string>("ClientId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("ClientName")
|
b.Property<string>("ClientName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("ClientUri")
|
b.Property<string>("ClientUri")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.Property<int?>("ConsentLifetime")
|
b.Property<int?>("ConsentLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<DateTime>("Created")
|
b.Property<DateTime>("Created")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(1000)")
|
||||||
.HasMaxLength(1000);
|
.HasMaxLength(1000);
|
||||||
|
|
||||||
b.Property<int>("DeviceCodeLifetime")
|
b.Property<int>("DeviceCodeLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<bool>("EnableLocalLogin")
|
b.Property<bool>("EnableLocalLogin")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
b.Property<bool>("Enabled")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("FrontChannelLogoutSessionRequired")
|
b.Property<bool>("FrontChannelLogoutSessionRequired")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("FrontChannelLogoutUri")
|
b.Property<string>("FrontChannelLogoutUri")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.Property<int>("IdentityTokenLifetime")
|
b.Property<int>("IdentityTokenLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<bool>("IncludeJwtId")
|
b.Property<bool>("IncludeJwtId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<DateTime?>("LastAccessed")
|
b.Property<DateTime?>("LastAccessed")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("LogoUri")
|
b.Property<string>("LogoUri")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.Property<bool>("NonEditable")
|
b.Property<bool>("NonEditable")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("PairWiseSubjectSalt")
|
b.Property<string>("PairWiseSubjectSalt")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("ProtocolType")
|
b.Property<string>("ProtocolType")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<int>("RefreshTokenExpiration")
|
b.Property<int>("RefreshTokenExpiration")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<int>("RefreshTokenUsage")
|
b.Property<int>("RefreshTokenUsage")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<bool>("RequireClientSecret")
|
b.Property<bool>("RequireClientSecret")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("RequireConsent")
|
b.Property<bool>("RequireConsent")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("RequirePkce")
|
b.Property<bool>("RequirePkce")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<int>("SlidingRefreshTokenLifetime")
|
b.Property<int>("SlidingRefreshTokenLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<bool>("UpdateAccessTokenClaimsOnRefresh")
|
b.Property<bool>("UpdateAccessTokenClaimsOnRefresh")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<DateTime?>("Updated")
|
b.Property<DateTime?>("Updated")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("UserCodeType")
|
b.Property<string>("UserCodeType")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(100)")
|
||||||
.HasMaxLength(100);
|
.HasMaxLength(100);
|
||||||
|
|
||||||
b.Property<int?>("UserSsoLifetime")
|
b.Property<int?>("UserSsoLifetime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -357,19 +367,20 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -383,14 +394,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Origin")
|
b.Property<string>("Origin")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(150)")
|
||||||
.HasMaxLength(150);
|
.HasMaxLength(150);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -404,14 +416,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("GrantType")
|
b.Property<string>("GrantType")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -425,14 +438,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Provider")
|
b.Property<string>("Provider")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -446,14 +460,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("PostLogoutRedirectUri")
|
b.Property<string>("PostLogoutRedirectUri")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -467,19 +482,20 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Key")
|
b.Property<string>("Key")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -493,14 +509,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("RedirectUri")
|
b.Property<string>("RedirectUri")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -514,14 +531,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Scope")
|
b.Property<string>("Scope")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -535,29 +553,30 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
b.Property<int>("ClientId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<DateTime>("Created")
|
b.Property<DateTime>("Created")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.Property<DateTime?>("Expiration")
|
b.Property<DateTime?>("Expiration")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(4000)")
|
||||||
.HasMaxLength(4000);
|
.HasMaxLength(4000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -571,14 +590,15 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("IdentityResourceId")
|
b.Property<int>("IdentityResourceId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -592,41 +612,42 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<DateTime>("Created")
|
b.Property<DateTime>("Created")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(1000)")
|
||||||
.HasMaxLength(1000);
|
.HasMaxLength(1000);
|
||||||
|
|
||||||
b.Property<string>("DisplayName")
|
b.Property<string>("DisplayName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<bool>("Emphasize")
|
b.Property<bool>("Emphasize")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
b.Property<bool>("Enabled")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<bool>("NonEditable")
|
b.Property<bool>("NonEditable")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("Required")
|
b.Property<bool>("Required")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("ShowInDiscoveryDocument")
|
b.Property<bool>("ShowInDiscoveryDocument")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<DateTime?>("Updated")
|
b.Property<DateTime?>("Updated")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -640,19 +661,20 @@ namespace Kyoo.Models.DatabaseMigrations.IdentitiyConfiguration
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<int>("IdentityResourceId")
|
b.Property<int>("IdentityResourceId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Key")
|
b.Property<string>("Key")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(250)")
|
||||||
.HasMaxLength(250);
|
.HasMaxLength(250);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(2000)")
|
||||||
.HasMaxLength(2000);
|
.HasMaxLength(2000);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
@ -5,49 +5,52 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
||||||
{
|
{
|
||||||
[DbContext(typeof(IdentityDatabase))]
|
[DbContext(typeof(IdentityDatabase))]
|
||||||
[Migration("20200413153045_Initial")]
|
[Migration("20200526235424_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
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.DeviceFlowCodes", b =>
|
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserCode")
|
b.Property<string>("UserCode")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("ClientId")
|
b.Property<string>("ClientId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
b.Property<DateTime>("CreationTime")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Data")
|
b.Property<string>("Data")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(50000)")
|
||||||
.HasMaxLength(50000);
|
.HasMaxLength(50000);
|
||||||
|
|
||||||
b.Property<string>("DeviceCode")
|
b.Property<string>("DeviceCode")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<DateTime?>("Expiration")
|
b.Property<DateTime?>("Expiration")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("SubjectId")
|
b.Property<string>("SubjectId")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.HasKey("UserCode");
|
b.HasKey("UserCode");
|
||||||
@ -63,32 +66,32 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b =>
|
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Key")
|
b.Property<string>("Key")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("ClientId")
|
b.Property<string>("ClientId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
b.Property<DateTime>("CreationTime")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Data")
|
b.Property<string>("Data")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(50000)")
|
||||||
.HasMaxLength(50000);
|
.HasMaxLength(50000);
|
||||||
|
|
||||||
b.Property<DateTime?>("Expiration")
|
b.Property<DateTime?>("Expiration")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("SubjectId")
|
b.Property<string>("SubjectId")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(50)")
|
||||||
.HasMaxLength(50);
|
.HasMaxLength(50);
|
||||||
|
|
||||||
b.HasKey("Key");
|
b.HasKey("Key");
|
||||||
@ -103,59 +106,59 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
modelBuilder.Entity("Kyoo.Models.User", b =>
|
modelBuilder.Entity("Kyoo.Models.User", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<int>("AccessFailedCount")
|
b.Property<int>("AccessFailedCount")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
b.Property<string>("ConcurrencyStamp")
|
||||||
.IsConcurrencyToken()
|
.IsConcurrencyToken()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Email")
|
b.Property<string>("Email")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(256)")
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
|
|
||||||
b.Property<bool>("EmailConfirmed")
|
b.Property<bool>("EmailConfirmed")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled")
|
b.Property<bool>("LockoutEnabled")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
b.Property<string>("NormalizedEmail")
|
b.Property<string>("NormalizedEmail")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(256)")
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
b.Property<string>("NormalizedUserName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(256)")
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
|
|
||||||
b.Property<string>("OTAC")
|
b.Property<string>("OTAC")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime?>("OTACExpires")
|
b.Property<DateTime?>("OTACExpires")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("PasswordHash")
|
b.Property<string>("PasswordHash")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber")
|
b.Property<string>("PhoneNumber")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<bool>("PhoneNumberConfirmed")
|
b.Property<bool>("PhoneNumberConfirmed")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("SecurityStamp")
|
b.Property<string>("SecurityStamp")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<bool>("TwoFactorEnabled")
|
b.Property<bool>("TwoFactorEnabled")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
b.Property<string>("UserName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(256)")
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -173,18 +176,18 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
b.Property<string>("ConcurrencyStamp")
|
||||||
.IsConcurrencyToken()
|
.IsConcurrencyToken()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(256)")
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
b.Property<string>("NormalizedName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(256)")
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -200,17 +203,18 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("ClaimType")
|
b.Property<string>("ClaimType")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("ClaimValue")
|
b.Property<string>("ClaimValue")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("RoleId")
|
b.Property<string>("RoleId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -223,17 +227,18 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("ClaimType")
|
b.Property<string>("ClaimType")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("ClaimValue")
|
b.Property<string>("ClaimValue")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -245,19 +250,19 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("LoginProvider")
|
b.Property<string>("LoginProvider")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(128)")
|
||||||
.HasMaxLength(128);
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("ProviderKey")
|
b.Property<string>("ProviderKey")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(128)")
|
||||||
.HasMaxLength(128);
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName")
|
b.Property<string>("ProviderDisplayName")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("LoginProvider", "ProviderKey");
|
b.HasKey("LoginProvider", "ProviderKey");
|
||||||
|
|
||||||
@ -269,10 +274,10 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("RoleId")
|
b.Property<string>("RoleId")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("UserId", "RoleId");
|
b.HasKey("UserId", "RoleId");
|
||||||
|
|
||||||
@ -284,18 +289,18 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("LoginProvider")
|
b.Property<string>("LoginProvider")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(128)")
|
||||||
.HasMaxLength(128);
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(128)")
|
||||||
.HasMaxLength(128);
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("UserId", "LoginProvider", "Name");
|
b.HasKey("UserId", "LoginProvider", "Name");
|
||||||
|
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
||||||
{
|
{
|
||||||
@ -87,7 +88,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
UserId = table.Column<string>(nullable: false),
|
UserId = table.Column<string>(nullable: false),
|
||||||
ClaimType = table.Column<string>(nullable: true),
|
ClaimType = table.Column<string>(nullable: true),
|
||||||
ClaimValue = table.Column<string>(nullable: true)
|
ClaimValue = table.Column<string>(nullable: true)
|
||||||
@ -172,7 +173,7 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(nullable: false)
|
Id = table.Column<int>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
RoleId = table.Column<string>(nullable: false),
|
RoleId = table.Column<string>(nullable: false),
|
||||||
ClaimType = table.Column<string>(nullable: true),
|
ClaimType = table.Column<string>(nullable: true),
|
||||||
ClaimValue = table.Column<string>(nullable: true)
|
ClaimValue = table.Column<string>(nullable: true)
|
@ -4,6 +4,7 @@ using Kyoo;
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
||||||
{
|
{
|
||||||
@ -14,38 +15,40 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
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.DeviceFlowCodes", b =>
|
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserCode")
|
b.Property<string>("UserCode")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("ClientId")
|
b.Property<string>("ClientId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
b.Property<DateTime>("CreationTime")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Data")
|
b.Property<string>("Data")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(50000)")
|
||||||
.HasMaxLength(50000);
|
.HasMaxLength(50000);
|
||||||
|
|
||||||
b.Property<string>("DeviceCode")
|
b.Property<string>("DeviceCode")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<DateTime?>("Expiration")
|
b.Property<DateTime?>("Expiration")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("SubjectId")
|
b.Property<string>("SubjectId")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.HasKey("UserCode");
|
b.HasKey("UserCode");
|
||||||
@ -61,32 +64,32 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b =>
|
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Key")
|
b.Property<string>("Key")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("ClientId")
|
b.Property<string>("ClientId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
b.Property<DateTime>("CreationTime")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("Data")
|
b.Property<string>("Data")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(50000)")
|
||||||
.HasMaxLength(50000);
|
.HasMaxLength(50000);
|
||||||
|
|
||||||
b.Property<DateTime?>("Expiration")
|
b.Property<DateTime?>("Expiration")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("SubjectId")
|
b.Property<string>("SubjectId")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(200)")
|
||||||
.HasMaxLength(200);
|
.HasMaxLength(200);
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(50)")
|
||||||
.HasMaxLength(50);
|
.HasMaxLength(50);
|
||||||
|
|
||||||
b.HasKey("Key");
|
b.HasKey("Key");
|
||||||
@ -101,59 +104,59 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
modelBuilder.Entity("Kyoo.Models.User", b =>
|
modelBuilder.Entity("Kyoo.Models.User", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<int>("AccessFailedCount")
|
b.Property<int>("AccessFailedCount")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
b.Property<string>("ConcurrencyStamp")
|
||||||
.IsConcurrencyToken()
|
.IsConcurrencyToken()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Email")
|
b.Property<string>("Email")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(256)")
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
|
|
||||||
b.Property<bool>("EmailConfirmed")
|
b.Property<bool>("EmailConfirmed")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled")
|
b.Property<bool>("LockoutEnabled")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
b.Property<string>("NormalizedEmail")
|
b.Property<string>("NormalizedEmail")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(256)")
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
b.Property<string>("NormalizedUserName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(256)")
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
|
|
||||||
b.Property<string>("OTAC")
|
b.Property<string>("OTAC")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime?>("OTACExpires")
|
b.Property<DateTime?>("OTACExpires")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<string>("PasswordHash")
|
b.Property<string>("PasswordHash")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber")
|
b.Property<string>("PhoneNumber")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<bool>("PhoneNumberConfirmed")
|
b.Property<bool>("PhoneNumberConfirmed")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("SecurityStamp")
|
b.Property<string>("SecurityStamp")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<bool>("TwoFactorEnabled")
|
b.Property<bool>("TwoFactorEnabled")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
b.Property<string>("UserName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(256)")
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -171,18 +174,18 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
b.Property<string>("ConcurrencyStamp")
|
||||||
.IsConcurrencyToken()
|
.IsConcurrencyToken()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(256)")
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
b.Property<string>("NormalizedName")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(256)")
|
||||||
.HasMaxLength(256);
|
.HasMaxLength(256);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -198,17 +201,18 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("ClaimType")
|
b.Property<string>("ClaimType")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("ClaimValue")
|
b.Property<string>("ClaimValue")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("RoleId")
|
b.Property<string>("RoleId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -221,17 +225,18 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("ClaimType")
|
b.Property<string>("ClaimType")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("ClaimValue")
|
b.Property<string>("ClaimValue")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -243,19 +248,19 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("LoginProvider")
|
b.Property<string>("LoginProvider")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(128)")
|
||||||
.HasMaxLength(128);
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("ProviderKey")
|
b.Property<string>("ProviderKey")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(128)")
|
||||||
.HasMaxLength(128);
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName")
|
b.Property<string>("ProviderDisplayName")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("LoginProvider", "ProviderKey");
|
b.HasKey("LoginProvider", "ProviderKey");
|
||||||
|
|
||||||
@ -267,10 +272,10 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("RoleId")
|
b.Property<string>("RoleId")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("UserId", "RoleId");
|
b.HasKey("UserId", "RoleId");
|
||||||
|
|
||||||
@ -282,18 +287,18 @@ namespace Kyoo.Models.DatabaseMigrations.IdentityDatbase
|
|||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("LoginProvider")
|
b.Property<string>("LoginProvider")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(128)")
|
||||||
.HasMaxLength(128);
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT")
|
.HasColumnType("character varying(128)")
|
||||||
.HasMaxLength(128);
|
.HasMaxLength(128);
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("UserId", "LoginProvider", "Name");
|
b.HasKey("UserId", "LoginProvider", "Name");
|
||||||
|
|
||||||
|
@ -5,47 +5,46 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
namespace Kyoo.Models.DatabaseMigrations.Internal
|
namespace Kyoo.Models.DatabaseMigrations.Internal
|
||||||
{
|
{
|
||||||
[DbContext(typeof(DatabaseContext))]
|
[DbContext(typeof(DatabaseContext))]
|
||||||
[Migration("20200507185533_Initial")]
|
[Migration("20200526235513_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasAnnotation("ProductVersion", "3.1.3");
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.3")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
modelBuilder.Entity("Kyoo.Models.Collection", b =>
|
modelBuilder.Entity("Kyoo.Models.Collection", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("ImgPrimary")
|
b.Property<string>("ImgPrimary")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long?>("LibraryID")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Overview")
|
b.Property<string>("Overview")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Poster")
|
b.Property<string>("Poster")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
b.HasIndex("LibraryID");
|
|
||||||
|
|
||||||
b.HasIndex("Slug")
|
b.HasIndex("Slug")
|
||||||
.IsUnique();
|
.IsUnique();
|
||||||
|
|
||||||
@ -56,13 +55,14 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<long?>("CollectionID")
|
b.Property<long?>("CollectionID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("ShowID")
|
b.Property<long>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -77,40 +77,41 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<long>("AbsoluteNumber")
|
b.Property<long>("AbsoluteNumber")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("EpisodeNumber")
|
b.Property<long>("EpisodeNumber")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("ImgPrimary")
|
b.Property<string>("ImgPrimary")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Overview")
|
b.Property<string>("Overview")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Path")
|
b.Property<string>("Path")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime?>("ReleaseDate")
|
b.Property<DateTime?>("ReleaseDate")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<long>("Runtime")
|
b.Property<long>("Runtime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long?>("SeasonID")
|
b.Property<long?>("SeasonID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("SeasonNumber")
|
b.Property<long>("SeasonNumber")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("ShowID")
|
b.Property<long>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Title")
|
b.Property<string>("Title")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -125,13 +126,14 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -144,10 +146,10 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
modelBuilder.Entity("Kyoo.Models.GenreLink", b =>
|
modelBuilder.Entity("Kyoo.Models.GenreLink", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("ShowID")
|
b.Property<long>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("GenreID")
|
b.Property<long>("GenreID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.HasKey("ShowID", "GenreID");
|
b.HasKey("ShowID", "GenreID");
|
||||||
|
|
||||||
@ -160,16 +162,17 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Paths")
|
b.Property<string>("Paths")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -183,16 +186,17 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<long?>("CollectionID")
|
b.Property<long?>("CollectionID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("LibraryID")
|
b.Property<long>("LibraryID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long?>("ShowID")
|
b.Property<long?>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -209,28 +213,29 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("DataID")
|
b.Property<string>("DataID")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long?>("EpisodeID")
|
b.Property<long?>("EpisodeID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Link")
|
b.Property<string>("Link")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long?>("PeopleID")
|
b.Property<long?>("PeopleID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("ProviderID")
|
b.Property<long>("ProviderID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long?>("SeasonID")
|
b.Property<long?>("SeasonID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long?>("ShowID")
|
b.Property<long?>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -251,16 +256,17 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("ImgPrimary")
|
b.Property<string>("ImgPrimary")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -274,19 +280,20 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<long>("PeopleID")
|
b.Property<long>("PeopleID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Role")
|
b.Property<string>("Role")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long>("ShowID")
|
b.Property<long>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -301,13 +308,14 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("Logo")
|
b.Property<string>("Logo")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -321,13 +329,14 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<long?>("LibraryID")
|
b.Property<long?>("LibraryID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("ProviderID")
|
b.Property<long>("ProviderID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -342,25 +351,26 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("ImgPrimary")
|
b.Property<string>("ImgPrimary")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Overview")
|
b.Property<string>("Overview")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long>("SeasonNumber")
|
b.Property<long>("SeasonNumber")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("ShowID")
|
b.Property<long>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Title")
|
b.Property<string>("Title")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long?>("Year")
|
b.Property<long?>("Year")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -373,57 +383,53 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("Aliases")
|
b.Property<string>("Aliases")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Backdrop")
|
b.Property<string>("Backdrop")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long?>("EndYear")
|
b.Property<long?>("EndYear")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<bool>("IsMovie")
|
b.Property<bool>("IsMovie")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<long?>("LibraryID")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.Property<string>("Logo")
|
b.Property<string>("Logo")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Overview")
|
b.Property<string>("Overview")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Path")
|
b.Property<string>("Path")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Poster")
|
b.Property<string>("Poster")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long?>("StartYear")
|
b.Property<long?>("StartYear")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<int?>("Status")
|
b.Property<int?>("Status")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<long?>("StudioID")
|
b.Property<long?>("StudioID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Title")
|
b.Property<string>("Title")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("TrailerUrl")
|
b.Property<string>("TrailerUrl")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
b.HasIndex("LibraryID");
|
|
||||||
|
|
||||||
b.HasIndex("Slug")
|
b.HasIndex("Slug")
|
||||||
.IsUnique();
|
.IsUnique();
|
||||||
|
|
||||||
@ -436,13 +442,14 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -456,34 +463,35 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("Codec")
|
b.Property<string>("Codec")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long>("EpisodeID")
|
b.Property<long>("EpisodeID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<bool>("IsDefault")
|
b.Property<bool>("IsDefault")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("IsExternal")
|
b.Property<bool>("IsExternal")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("IsForced")
|
b.Property<bool>("IsForced")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("Language")
|
b.Property<string>("Language")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Path")
|
b.Property<string>("Path")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Title")
|
b.Property<string>("Title")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<int>("Type")
|
b.Property<int>("Type")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -492,13 +500,6 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
b.ToTable("Tracks");
|
b.ToTable("Tracks");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Kyoo.Models.Collection", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Kyoo.Models.Library", null)
|
|
||||||
.WithMany("Collections")
|
|
||||||
.HasForeignKey("LibraryID");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Kyoo.Models.CollectionLink", b =>
|
modelBuilder.Entity("Kyoo.Models.CollectionLink", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Kyoo.Models.Collection", "Collection")
|
b.HasOne("Kyoo.Models.Collection", "Collection")
|
||||||
@ -547,7 +548,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
.HasForeignKey("CollectionID");
|
.HasForeignKey("CollectionID");
|
||||||
|
|
||||||
b.HasOne("Kyoo.Models.Library", "Library")
|
b.HasOne("Kyoo.Models.Library", "Library")
|
||||||
.WithMany()
|
.WithMany("Links")
|
||||||
.HasForeignKey("LibraryID")
|
.HasForeignKey("LibraryID")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
@ -600,7 +601,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
modelBuilder.Entity("Kyoo.Models.ProviderLink", b =>
|
modelBuilder.Entity("Kyoo.Models.ProviderLink", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Kyoo.Models.Library", "Library")
|
b.HasOne("Kyoo.Models.Library", "Library")
|
||||||
.WithMany("Providers")
|
.WithMany("ProviderLinks")
|
||||||
.HasForeignKey("LibraryID");
|
.HasForeignKey("LibraryID");
|
||||||
|
|
||||||
b.HasOne("Kyoo.Models.ProviderID", "Provider")
|
b.HasOne("Kyoo.Models.ProviderID", "Provider")
|
||||||
@ -621,12 +622,8 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
|
|
||||||
modelBuilder.Entity("Kyoo.Models.Show", b =>
|
modelBuilder.Entity("Kyoo.Models.Show", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Kyoo.Models.Library", null)
|
|
||||||
.WithMany("Shows")
|
|
||||||
.HasForeignKey("LibraryID");
|
|
||||||
|
|
||||||
b.HasOne("Kyoo.Models.Studio", "Studio")
|
b.HasOne("Kyoo.Models.Studio", "Studio")
|
||||||
.WithMany()
|
.WithMany("Shows")
|
||||||
.HasForeignKey("StudioID");
|
.HasForeignKey("StudioID");
|
||||||
});
|
});
|
||||||
|
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
namespace Kyoo.Models.DatabaseMigrations.Internal
|
namespace Kyoo.Models.DatabaseMigrations.Internal
|
||||||
{
|
{
|
||||||
@ -7,12 +8,29 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Collections",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
ID = table.Column<long>(nullable: false)
|
||||||
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
|
Slug = table.Column<string>(nullable: true),
|
||||||
|
Name = table.Column<string>(nullable: true),
|
||||||
|
Poster = table.Column<string>(nullable: true),
|
||||||
|
Overview = table.Column<string>(nullable: true),
|
||||||
|
ImgPrimary = table.Column<string>(nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Collections", x => x.ID);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "Genres",
|
name: "Genres",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Slug = table.Column<string>(nullable: true),
|
Slug = table.Column<string>(nullable: true),
|
||||||
Name = table.Column<string>(nullable: true)
|
Name = table.Column<string>(nullable: true)
|
||||||
},
|
},
|
||||||
@ -26,7 +44,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Slug = table.Column<string>(nullable: true),
|
Slug = table.Column<string>(nullable: true),
|
||||||
Name = table.Column<string>(nullable: true),
|
Name = table.Column<string>(nullable: true),
|
||||||
Paths = table.Column<string>(nullable: true)
|
Paths = table.Column<string>(nullable: true)
|
||||||
@ -41,7 +59,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Slug = table.Column<string>(nullable: true),
|
Slug = table.Column<string>(nullable: true),
|
||||||
Name = table.Column<string>(nullable: true),
|
Name = table.Column<string>(nullable: true),
|
||||||
ImgPrimary = table.Column<string>(nullable: true)
|
ImgPrimary = table.Column<string>(nullable: true)
|
||||||
@ -56,7 +74,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Name = table.Column<string>(nullable: true),
|
Name = table.Column<string>(nullable: true),
|
||||||
Logo = table.Column<string>(nullable: true)
|
Logo = table.Column<string>(nullable: true)
|
||||||
},
|
},
|
||||||
@ -70,7 +88,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Slug = table.Column<string>(nullable: true),
|
Slug = table.Column<string>(nullable: true),
|
||||||
Name = table.Column<string>(nullable: true)
|
Name = table.Column<string>(nullable: true)
|
||||||
},
|
},
|
||||||
@ -79,36 +97,12 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
table.PrimaryKey("PK_Studios", x => x.ID);
|
table.PrimaryKey("PK_Studios", x => x.ID);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Collections",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
ID = table.Column<long>(nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
Slug = table.Column<string>(nullable: true),
|
|
||||||
Name = table.Column<string>(nullable: true),
|
|
||||||
Poster = table.Column<string>(nullable: true),
|
|
||||||
Overview = table.Column<string>(nullable: true),
|
|
||||||
ImgPrimary = table.Column<string>(nullable: true),
|
|
||||||
LibraryID = table.Column<long>(nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Collections", x => x.ID);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Collections_Libraries_LibraryID",
|
|
||||||
column: x => x.LibraryID,
|
|
||||||
principalTable: "Libraries",
|
|
||||||
principalColumn: "ID",
|
|
||||||
onDelete: ReferentialAction.Restrict);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "ProviderLinks",
|
name: "ProviderLinks",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
ProviderID = table.Column<long>(nullable: false),
|
ProviderID = table.Column<long>(nullable: false),
|
||||||
LibraryID = table.Column<long>(nullable: true)
|
LibraryID = table.Column<long>(nullable: true)
|
||||||
},
|
},
|
||||||
@ -134,7 +128,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Slug = table.Column<string>(nullable: true),
|
Slug = table.Column<string>(nullable: true),
|
||||||
Title = table.Column<string>(nullable: true),
|
Title = table.Column<string>(nullable: true),
|
||||||
Aliases = table.Column<string>(nullable: true),
|
Aliases = table.Column<string>(nullable: true),
|
||||||
@ -148,18 +142,11 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
Logo = table.Column<string>(nullable: true),
|
Logo = table.Column<string>(nullable: true),
|
||||||
Backdrop = table.Column<string>(nullable: true),
|
Backdrop = table.Column<string>(nullable: true),
|
||||||
IsMovie = table.Column<bool>(nullable: false),
|
IsMovie = table.Column<bool>(nullable: false),
|
||||||
StudioID = table.Column<long>(nullable: true),
|
StudioID = table.Column<long>(nullable: true)
|
||||||
LibraryID = table.Column<long>(nullable: true)
|
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
table.PrimaryKey("PK_Shows", x => x.ID);
|
table.PrimaryKey("PK_Shows", x => x.ID);
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Shows_Libraries_LibraryID",
|
|
||||||
column: x => x.LibraryID,
|
|
||||||
principalTable: "Libraries",
|
|
||||||
principalColumn: "ID",
|
|
||||||
onDelete: ReferentialAction.Restrict);
|
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_Shows_Studios_StudioID",
|
name: "FK_Shows_Studios_StudioID",
|
||||||
column: x => x.StudioID,
|
column: x => x.StudioID,
|
||||||
@ -173,7 +160,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
CollectionID = table.Column<long>(nullable: true),
|
CollectionID = table.Column<long>(nullable: true),
|
||||||
ShowID = table.Column<long>(nullable: false)
|
ShowID = table.Column<long>(nullable: false)
|
||||||
},
|
},
|
||||||
@ -223,7 +210,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
LibraryID = table.Column<long>(nullable: false),
|
LibraryID = table.Column<long>(nullable: false),
|
||||||
ShowID = table.Column<long>(nullable: true),
|
ShowID = table.Column<long>(nullable: true),
|
||||||
CollectionID = table.Column<long>(nullable: true)
|
CollectionID = table.Column<long>(nullable: true)
|
||||||
@ -256,7 +243,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
PeopleID = table.Column<long>(nullable: false),
|
PeopleID = table.Column<long>(nullable: false),
|
||||||
ShowID = table.Column<long>(nullable: false),
|
ShowID = table.Column<long>(nullable: false),
|
||||||
Role = table.Column<string>(nullable: true),
|
Role = table.Column<string>(nullable: true),
|
||||||
@ -284,7 +271,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
ShowID = table.Column<long>(nullable: false),
|
ShowID = table.Column<long>(nullable: false),
|
||||||
SeasonNumber = table.Column<long>(nullable: false),
|
SeasonNumber = table.Column<long>(nullable: false),
|
||||||
Title = table.Column<string>(nullable: true),
|
Title = table.Column<string>(nullable: true),
|
||||||
@ -308,7 +295,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
ShowID = table.Column<long>(nullable: false),
|
ShowID = table.Column<long>(nullable: false),
|
||||||
SeasonID = table.Column<long>(nullable: true),
|
SeasonID = table.Column<long>(nullable: true),
|
||||||
SeasonNumber = table.Column<long>(nullable: false),
|
SeasonNumber = table.Column<long>(nullable: false),
|
||||||
@ -343,7 +330,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
ProviderID = table.Column<long>(nullable: false),
|
ProviderID = table.Column<long>(nullable: false),
|
||||||
ShowID = table.Column<long>(nullable: true),
|
ShowID = table.Column<long>(nullable: true),
|
||||||
EpisodeID = table.Column<long>(nullable: true),
|
EpisodeID = table.Column<long>(nullable: true),
|
||||||
@ -392,7 +379,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
ID = table.Column<long>(nullable: false)
|
ID = table.Column<long>(nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
Title = table.Column<string>(nullable: true),
|
Title = table.Column<string>(nullable: true),
|
||||||
Language = table.Column<string>(nullable: true),
|
Language = table.Column<string>(nullable: true),
|
||||||
Codec = table.Column<string>(nullable: true),
|
Codec = table.Column<string>(nullable: true),
|
||||||
@ -424,11 +411,6 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
table: "CollectionLinks",
|
table: "CollectionLinks",
|
||||||
column: "ShowID");
|
column: "ShowID");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Collections_LibraryID",
|
|
||||||
table: "Collections",
|
|
||||||
column: "LibraryID");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_Collections_Slug",
|
name: "IX_Collections_Slug",
|
||||||
table: "Collections",
|
table: "Collections",
|
||||||
@ -539,11 +521,6 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
table: "Seasons",
|
table: "Seasons",
|
||||||
column: "ShowID");
|
column: "ShowID");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Shows_LibraryID",
|
|
||||||
table: "Shows",
|
|
||||||
column: "LibraryID");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_Shows_Slug",
|
name: "IX_Shows_Slug",
|
||||||
table: "Shows",
|
table: "Shows",
|
||||||
@ -599,6 +576,9 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Peoples");
|
name: "Peoples");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Libraries");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Providers");
|
name: "Providers");
|
||||||
|
|
||||||
@ -611,9 +591,6 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Shows");
|
name: "Shows");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Libraries");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Studios");
|
name: "Studios");
|
||||||
}
|
}
|
@ -4,6 +4,7 @@ using Kyoo;
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
namespace Kyoo.Models.DatabaseMigrations.Internal
|
namespace Kyoo.Models.DatabaseMigrations.Internal
|
||||||
{
|
{
|
||||||
@ -14,36 +15,34 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasAnnotation("ProductVersion", "3.1.3");
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.3")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
modelBuilder.Entity("Kyoo.Models.Collection", b =>
|
modelBuilder.Entity("Kyoo.Models.Collection", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("ImgPrimary")
|
b.Property<string>("ImgPrimary")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long?>("LibraryID")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Overview")
|
b.Property<string>("Overview")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Poster")
|
b.Property<string>("Poster")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
b.HasIndex("LibraryID");
|
|
||||||
|
|
||||||
b.HasIndex("Slug")
|
b.HasIndex("Slug")
|
||||||
.IsUnique();
|
.IsUnique();
|
||||||
|
|
||||||
@ -54,13 +53,14 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<long?>("CollectionID")
|
b.Property<long?>("CollectionID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("ShowID")
|
b.Property<long>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -75,40 +75,41 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<long>("AbsoluteNumber")
|
b.Property<long>("AbsoluteNumber")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("EpisodeNumber")
|
b.Property<long>("EpisodeNumber")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("ImgPrimary")
|
b.Property<string>("ImgPrimary")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Overview")
|
b.Property<string>("Overview")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Path")
|
b.Property<string>("Path")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime?>("ReleaseDate")
|
b.Property<DateTime?>("ReleaseDate")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
b.Property<long>("Runtime")
|
b.Property<long>("Runtime")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long?>("SeasonID")
|
b.Property<long?>("SeasonID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("SeasonNumber")
|
b.Property<long>("SeasonNumber")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("ShowID")
|
b.Property<long>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Title")
|
b.Property<string>("Title")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -123,13 +124,14 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -142,10 +144,10 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
modelBuilder.Entity("Kyoo.Models.GenreLink", b =>
|
modelBuilder.Entity("Kyoo.Models.GenreLink", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("ShowID")
|
b.Property<long>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("GenreID")
|
b.Property<long>("GenreID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.HasKey("ShowID", "GenreID");
|
b.HasKey("ShowID", "GenreID");
|
||||||
|
|
||||||
@ -158,16 +160,17 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Paths")
|
b.Property<string>("Paths")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -181,16 +184,17 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<long?>("CollectionID")
|
b.Property<long?>("CollectionID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("LibraryID")
|
b.Property<long>("LibraryID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long?>("ShowID")
|
b.Property<long?>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -207,28 +211,29 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("DataID")
|
b.Property<string>("DataID")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long?>("EpisodeID")
|
b.Property<long?>("EpisodeID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Link")
|
b.Property<string>("Link")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long?>("PeopleID")
|
b.Property<long?>("PeopleID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("ProviderID")
|
b.Property<long>("ProviderID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long?>("SeasonID")
|
b.Property<long?>("SeasonID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long?>("ShowID")
|
b.Property<long?>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -249,16 +254,17 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("ImgPrimary")
|
b.Property<string>("ImgPrimary")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -272,19 +278,20 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<long>("PeopleID")
|
b.Property<long>("PeopleID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Role")
|
b.Property<string>("Role")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long>("ShowID")
|
b.Property<long>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Type")
|
b.Property<string>("Type")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -299,13 +306,14 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("Logo")
|
b.Property<string>("Logo")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -319,13 +327,14 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<long?>("LibraryID")
|
b.Property<long?>("LibraryID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("ProviderID")
|
b.Property<long>("ProviderID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -340,25 +349,26 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("ImgPrimary")
|
b.Property<string>("ImgPrimary")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Overview")
|
b.Property<string>("Overview")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long>("SeasonNumber")
|
b.Property<long>("SeasonNumber")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<long>("ShowID")
|
b.Property<long>("ShowID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Title")
|
b.Property<string>("Title")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long?>("Year")
|
b.Property<long?>("Year")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -371,57 +381,53 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("Aliases")
|
b.Property<string>("Aliases")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Backdrop")
|
b.Property<string>("Backdrop")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long?>("EndYear")
|
b.Property<long?>("EndYear")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<bool>("IsMovie")
|
b.Property<bool>("IsMovie")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<long?>("LibraryID")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.Property<string>("Logo")
|
b.Property<string>("Logo")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Overview")
|
b.Property<string>("Overview")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Path")
|
b.Property<string>("Path")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Poster")
|
b.Property<string>("Poster")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long?>("StartYear")
|
b.Property<long?>("StartYear")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<int?>("Status")
|
b.Property<int?>("Status")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<long?>("StudioID")
|
b.Property<long?>("StudioID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("Title")
|
b.Property<string>("Title")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("TrailerUrl")
|
b.Property<string>("TrailerUrl")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
b.HasIndex("LibraryID");
|
|
||||||
|
|
||||||
b.HasIndex("Slug")
|
b.HasIndex("Slug")
|
||||||
.IsUnique();
|
.IsUnique();
|
||||||
|
|
||||||
@ -434,13 +440,14 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -454,34 +461,35 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
{
|
{
|
||||||
b.Property<long>("ID")
|
b.Property<long>("ID")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
b.Property<string>("Codec")
|
b.Property<string>("Codec")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<long>("EpisodeID")
|
b.Property<long>("EpisodeID")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<bool>("IsDefault")
|
b.Property<bool>("IsDefault")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("IsExternal")
|
b.Property<bool>("IsExternal")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("IsForced")
|
b.Property<bool>("IsForced")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("Language")
|
b.Property<string>("Language")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Path")
|
b.Property<string>("Path")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Title")
|
b.Property<string>("Title")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<int>("Type")
|
b.Property<int>("Type")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.HasKey("ID");
|
b.HasKey("ID");
|
||||||
|
|
||||||
@ -490,13 +498,6 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
b.ToTable("Tracks");
|
b.ToTable("Tracks");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Kyoo.Models.Collection", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Kyoo.Models.Library", null)
|
|
||||||
.WithMany("Collections")
|
|
||||||
.HasForeignKey("LibraryID");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Kyoo.Models.CollectionLink", b =>
|
modelBuilder.Entity("Kyoo.Models.CollectionLink", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Kyoo.Models.Collection", "Collection")
|
b.HasOne("Kyoo.Models.Collection", "Collection")
|
||||||
@ -545,7 +546,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
.HasForeignKey("CollectionID");
|
.HasForeignKey("CollectionID");
|
||||||
|
|
||||||
b.HasOne("Kyoo.Models.Library", "Library")
|
b.HasOne("Kyoo.Models.Library", "Library")
|
||||||
.WithMany()
|
.WithMany("Links")
|
||||||
.HasForeignKey("LibraryID")
|
.HasForeignKey("LibraryID")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
@ -598,7 +599,7 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
modelBuilder.Entity("Kyoo.Models.ProviderLink", b =>
|
modelBuilder.Entity("Kyoo.Models.ProviderLink", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Kyoo.Models.Library", "Library")
|
b.HasOne("Kyoo.Models.Library", "Library")
|
||||||
.WithMany("Providers")
|
.WithMany("ProviderLinks")
|
||||||
.HasForeignKey("LibraryID");
|
.HasForeignKey("LibraryID");
|
||||||
|
|
||||||
b.HasOne("Kyoo.Models.ProviderID", "Provider")
|
b.HasOne("Kyoo.Models.ProviderID", "Provider")
|
||||||
@ -619,12 +620,8 @@ namespace Kyoo.Models.DatabaseMigrations.Internal
|
|||||||
|
|
||||||
modelBuilder.Entity("Kyoo.Models.Show", b =>
|
modelBuilder.Entity("Kyoo.Models.Show", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Kyoo.Models.Library", null)
|
|
||||||
.WithMany("Shows")
|
|
||||||
.HasForeignKey("LibraryID");
|
|
||||||
|
|
||||||
b.HasOne("Kyoo.Models.Studio", "Studio")
|
b.HasOne("Kyoo.Models.Studio", "Studio")
|
||||||
.WithMany()
|
.WithMany("Shows")
|
||||||
.HasForeignKey("StudioID");
|
.HasForeignKey("StudioID");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ using Microsoft.AspNetCore.SpaServices.AngularCli;
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
@ -44,22 +43,22 @@ namespace Kyoo
|
|||||||
services.AddControllers().AddNewtonsoftJson();
|
services.AddControllers().AddNewtonsoftJson();
|
||||||
services.AddHttpClient();
|
services.AddHttpClient();
|
||||||
|
|
||||||
services.AddSingleton<DatabaseFactory>(x => new DatabaseFactory(
|
services.AddSingleton(x => new DatabaseFactory(
|
||||||
new DbContextOptionsBuilder<DatabaseContext>()
|
new DbContextOptionsBuilder<DatabaseContext>()
|
||||||
.UseLazyLoadingProxies()
|
.UseLazyLoadingProxies()
|
||||||
.UseSqlite(_configuration.GetConnectionString("Database")).Options));
|
.UseNpgsql(_configuration.GetConnectionString("Database")).Options));
|
||||||
|
|
||||||
services.AddDbContext<DatabaseContext>(options =>
|
services.AddDbContext<DatabaseContext>(options =>
|
||||||
{
|
{
|
||||||
options.UseLazyLoadingProxies()
|
options.UseLazyLoadingProxies()
|
||||||
.UseSqlite(_configuration.GetConnectionString("Database"));
|
.UseNpgsql(_configuration.GetConnectionString("Database"));
|
||||||
// .EnableSensitiveDataLogging()
|
// .EnableSensitiveDataLogging()
|
||||||
// .UseLoggerFactory(LoggerFactory.Create(builder => builder.AddConsole()));
|
// .UseLoggerFactory(LoggerFactory.Create(builder => builder.AddConsole()));
|
||||||
});
|
});
|
||||||
|
|
||||||
services.AddDbContext<IdentityDatabase>(options =>
|
services.AddDbContext<IdentityDatabase>(options =>
|
||||||
{
|
{
|
||||||
options.UseSqlite(_configuration.GetConnectionString("Database"));
|
options.UseNpgsql(_configuration.GetConnectionString("Database"));
|
||||||
});
|
});
|
||||||
|
|
||||||
string assemblyName = typeof(Startup).GetTypeInfo().Assembly.GetName().Name;
|
string assemblyName = typeof(Startup).GetTypeInfo().Assembly.GetName().Name;
|
||||||
@ -85,13 +84,13 @@ namespace Kyoo
|
|||||||
.AddConfigurationStore(options =>
|
.AddConfigurationStore(options =>
|
||||||
{
|
{
|
||||||
options.ConfigureDbContext = builder =>
|
options.ConfigureDbContext = builder =>
|
||||||
builder.UseSqlite(_configuration.GetConnectionString("Database"),
|
builder.UseNpgsql(_configuration.GetConnectionString("Database"),
|
||||||
sql => sql.MigrationsAssembly(assemblyName));
|
sql => sql.MigrationsAssembly(assemblyName));
|
||||||
})
|
})
|
||||||
.AddOperationalStore(options =>
|
.AddOperationalStore(options =>
|
||||||
{
|
{
|
||||||
options.ConfigureDbContext = builder =>
|
options.ConfigureDbContext = builder =>
|
||||||
builder.UseSqlite(_configuration.GetConnectionString("Database"),
|
builder.UseNpgsql(_configuration.GetConnectionString("Database"),
|
||||||
sql => sql.MigrationsAssembly(assemblyName));
|
sql => sql.MigrationsAssembly(assemblyName));
|
||||||
options.EnableTokenCleanup = true;
|
options.EnableTokenCleanup = true;
|
||||||
})
|
})
|
||||||
@ -145,7 +144,7 @@ namespace Kyoo
|
|||||||
services.AddSingleton<IPluginManager, PluginManager>();
|
services.AddSingleton<IPluginManager, PluginManager>();
|
||||||
services.AddSingleton<ITaskManager, TaskManager>();
|
services.AddSingleton<ITaskManager, TaskManager>();
|
||||||
|
|
||||||
services.AddHostedService<TaskManager>(provider => (TaskManager)provider.GetService<ITaskManager>());
|
services.AddHostedService(provider => (TaskManager)provider.GetService<ITaskManager>());
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
|
@ -65,9 +65,7 @@ namespace Kyoo.Controllers
|
|||||||
}
|
}
|
||||||
await libraryManager.SaveChanges();
|
await libraryManager.SaveChanges();
|
||||||
|
|
||||||
// await Task.WhenAll(libraries.Select(x => Scan(x, libraryManager, cancellationToken)));
|
await Task.WhenAll(libraries.ToList().Select(x => Scan(x, libraryManager, cancellationToken)));
|
||||||
foreach (Library library in libraries)
|
|
||||||
await Scan(library, libraryManager, cancellationToken);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -76,11 +74,10 @@ namespace Kyoo.Controllers
|
|||||||
Console.WriteLine("Scan finished!");
|
Console.WriteLine("Scan finished!");
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<Task> Scan(Library library, ILibraryManager libraryManager, CancellationToken cancellationToken)
|
private Task Scan(Library library, ILibraryManager libraryManager, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Scanning library {library.Name} at {string.Join(", ", library.Paths)}.");
|
Console.WriteLine($"Scanning library {library.Name} at {string.Join(", ", library.Paths)}.");
|
||||||
// return Task.WhenAll(library.Paths.Select(path =>
|
return Task.WhenAll(library.Paths.Select(async path =>
|
||||||
foreach (string path in library.Paths)
|
|
||||||
{
|
{
|
||||||
if (cancellationToken.IsCancellationRequested)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
@ -119,8 +116,9 @@ namespace Kyoo.Controllers
|
|||||||
string relativePath = file.Substring(path.Length);
|
string relativePath = file.Substring(path.Length);
|
||||||
/*return*/ await RegisterFile(file, relativePath, library, cancellationToken);
|
/*return*/ await RegisterFile(file, relativePath, library, cancellationToken);
|
||||||
}//));
|
}//));
|
||||||
}//));
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task RegisterFile(string path, string relativePath, Library library, CancellationToken token)
|
private async Task RegisterFile(string path, string relativePath, Library library, CancellationToken token)
|
||||||
|
@ -19,7 +19,7 @@ namespace Kyoo.Tasks
|
|||||||
public string Description => "Create the database if it does not exit and initialize it with defaults value.";
|
public string Description => "Create the database if it does not exit and initialize it with defaults value.";
|
||||||
public string HelpMessage => null;
|
public string HelpMessage => null;
|
||||||
public bool RunOnStartup => true;
|
public bool RunOnStartup => true;
|
||||||
public int Priority => Int32.MaxValue;
|
public int Priority => int.MaxValue;
|
||||||
|
|
||||||
public Task Run(IServiceProvider serviceProvider, CancellationToken cancellationToken, string arguments = null)
|
public Task Run(IServiceProvider serviceProvider, CancellationToken cancellationToken, string arguments = null)
|
||||||
{
|
{
|
||||||
@ -28,6 +28,11 @@ namespace Kyoo.Tasks
|
|||||||
IdentityDatabase identityDatabase = serviceScope.ServiceProvider.GetService<IdentityDatabase>();
|
IdentityDatabase identityDatabase = serviceScope.ServiceProvider.GetService<IdentityDatabase>();
|
||||||
ConfigurationDbContext identityContext = serviceScope.ServiceProvider.GetService<ConfigurationDbContext>();
|
ConfigurationDbContext identityContext = serviceScope.ServiceProvider.GetService<ConfigurationDbContext>();
|
||||||
|
|
||||||
|
if (!databaseContext.Database.CanConnect()
|
||||||
|
|| !identityDatabase.Database.CanConnect()
|
||||||
|
|| !identityContext.Database.CanConnect())
|
||||||
|
throw new SystemException("Coudln't connect to the database.");
|
||||||
|
|
||||||
databaseContext.Database.Migrate();
|
databaseContext.Database.Migrate();
|
||||||
identityDatabase.Database.Migrate();
|
identityDatabase.Database.Migrate();
|
||||||
identityContext.Database.Migrate();
|
identityContext.Database.Migrate();
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"Database": "Data Source=kyoo.db"
|
"Database": "Server=127.0.0.1; Port=5432; Database=kyooDB; User Id=kyoo; Password=kyooPassword;"
|
||||||
},
|
},
|
||||||
|
|
||||||
"scheduledTasks": {
|
"scheduledTasks": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user