using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Yavsc.Migrations
{
///
public partial class init : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Activities",
columns: table => new
{
Code = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
ParentCode = table.Column(type: "text", nullable: true),
Description = table.Column(type: "text", nullable: false),
Photo = table.Column(type: "text", nullable: true),
ModeratorGroupName = table.Column(type: "text", nullable: true),
Rate = table.Column(type: "integer", nullable: false),
SettingsClassName = table.Column(type: "text", nullable: true),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
UserCreated = table.Column(type: "text", nullable: true),
DateModified = table.Column(type: "timestamp with time zone", nullable: false),
UserModified = table.Column(type: "text", nullable: true),
Hidden = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Activities", x => x.Code);
table.ForeignKey(
name: "FK_Activities_Activities_ParentCode",
column: x => x.ParentCode,
principalTable: "Activities",
principalColumn: "Code");
});
migrationBuilder.CreateTable(
name: "ApiResources",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column(type: "boolean", nullable: false),
Name = table.Column(type: "text", nullable: true),
DisplayName = table.Column(type: "text", nullable: true),
Description = table.Column(type: "text", nullable: true),
AllowedAccessTokenSigningAlgorithms = table.Column(type: "text", nullable: true),
ShowInDiscoveryDocument = table.Column(type: "boolean", nullable: false),
Created = table.Column(type: "timestamp with time zone", nullable: false),
Updated = table.Column(type: "timestamp with time zone", nullable: true),
LastAccessed = table.Column(type: "timestamp with time zone", nullable: true),
NonEditable = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResources", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ApiScopes",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column(type: "boolean", nullable: false),
Name = table.Column(type: "text", nullable: true),
DisplayName = table.Column(type: "text", nullable: true),
Description = table.Column(type: "text", nullable: true),
Required = table.Column(type: "boolean", nullable: false),
Emphasize = table.Column(type: "boolean", nullable: false),
ShowInDiscoveryDocument = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiScopes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AspNetRoles",
columns: table => new
{
Id = table.Column(type: "text", nullable: false),
Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: true),
NormalizedName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true),
ConcurrencyStamp = table.Column(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetRoles", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ClientProviderInfo",
columns: table => new
{
UserId = table.Column(type: "text", nullable: false),
UserName = table.Column(type: "text", nullable: false),
Avatar = table.Column(type: "text", nullable: false),
EMail = table.Column(type: "text", nullable: false),
Phone = table.Column(type: "text", nullable: false),
BillingAddressId = table.Column(type: "bigint", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientProviderInfo", x => x.UserId);
});
migrationBuilder.CreateTable(
name: "Clients",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column(type: "boolean", nullable: false),
ClientId = table.Column(type: "text", nullable: true),
ProtocolType = table.Column(type: "text", nullable: true),
RequireClientSecret = table.Column(type: "boolean", nullable: false),
ClientName = table.Column(type: "text", nullable: true),
Description = table.Column(type: "text", nullable: true),
ClientUri = table.Column(type: "text", nullable: true),
LogoUri = table.Column(type: "text", nullable: true),
RequireConsent = table.Column(type: "boolean", nullable: false),
AllowRememberConsent = table.Column(type: "boolean", nullable: false),
AlwaysIncludeUserClaimsInIdToken = table.Column(type: "boolean", nullable: false),
RequirePkce = table.Column(type: "boolean", nullable: false),
AllowPlainTextPkce = table.Column(type: "boolean", nullable: false),
RequireRequestObject = table.Column(type: "boolean", nullable: false),
AllowAccessTokensViaBrowser = table.Column(type: "boolean", nullable: false),
FrontChannelLogoutUri = table.Column(type: "text", nullable: true),
FrontChannelLogoutSessionRequired = table.Column(type: "boolean", nullable: false),
BackChannelLogoutUri = table.Column(type: "text", nullable: true),
BackChannelLogoutSessionRequired = table.Column(type: "boolean", nullable: false),
AllowOfflineAccess = table.Column(type: "boolean", nullable: false),
IdentityTokenLifetime = table.Column(type: "integer", nullable: false),
AllowedIdentityTokenSigningAlgorithms = table.Column(type: "text", nullable: true),
AccessTokenLifetime = table.Column(type: "integer", nullable: false),
AuthorizationCodeLifetime = table.Column(type: "integer", nullable: false),
ConsentLifetime = table.Column(type: "integer", nullable: true),
AbsoluteRefreshTokenLifetime = table.Column(type: "integer", nullable: false),
SlidingRefreshTokenLifetime = table.Column(type: "integer", nullable: false),
RefreshTokenUsage = table.Column(type: "integer", nullable: false),
UpdateAccessTokenClaimsOnRefresh = table.Column(type: "boolean", nullable: false),
RefreshTokenExpiration = table.Column(type: "integer", nullable: false),
AccessTokenType = table.Column(type: "integer", nullable: false),
EnableLocalLogin = table.Column(type: "boolean", nullable: false),
IncludeJwtId = table.Column(type: "boolean", nullable: false),
AlwaysSendClientClaims = table.Column(type: "boolean", nullable: false),
ClientClaimsPrefix = table.Column(type: "text", nullable: true),
PairWiseSubjectSalt = table.Column(type: "text", nullable: true),
Created = table.Column(type: "timestamp with time zone", nullable: false),
Updated = table.Column(type: "timestamp with time zone", nullable: true),
LastAccessed = table.Column(type: "timestamp with time zone", nullable: true),
UserSsoLifetime = table.Column(type: "integer", nullable: true),
UserCodeType = table.Column(type: "text", nullable: true),
DeviceCodeLifetime = table.Column(type: "integer", nullable: false),
NonEditable = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Clients", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Color",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Red = table.Column(type: "smallint", nullable: false),
Green = table.Column(type: "smallint", nullable: false),
Blue = table.Column(type: "smallint", nullable: false),
Name = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Color", x => x.Id);
});
migrationBuilder.CreateTable(
name: "DjSettings",
columns: table => new
{
UserId = table.Column(type: "text", nullable: false),
SoundCloudId = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DjSettings", x => x.UserId);
});
migrationBuilder.CreateTable(
name: "EstimateTemplates",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Description = table.Column(type: "text", nullable: false),
Title = table.Column(type: "text", nullable: false),
OwnerId = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_EstimateTemplates", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ExceptionsSIREN",
columns: table => new
{
SIREN = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ExceptionsSIREN", x => x.SIREN);
});
migrationBuilder.CreateTable(
name: "Feature",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ShortName = table.Column(type: "text", nullable: false),
Description = table.Column(type: "text", nullable: false),
Status = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Feature", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Form",
columns: table => new
{
Id = table.Column(type: "text", nullable: false),
Summary = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Form", x => x.Id);
});
migrationBuilder.CreateTable(
name: "FormationSettings",
columns: table => new
{
UserId = table.Column(type: "text", nullable: false),
DisplayName = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_FormationSettings", x => x.UserId);
});
migrationBuilder.CreateTable(
name: "GeneralSettings",
columns: table => new
{
UserId = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_GeneralSettings", x => x.UserId);
});
migrationBuilder.CreateTable(
name: "HairPrestation",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Length = table.Column(type: "integer", nullable: false),
Gender = table.Column(type: "integer", nullable: false),
Cut = table.Column(type: "boolean", nullable: false),
Dressing = table.Column(type: "integer", nullable: false),
Tech = table.Column(type: "integer", nullable: false),
Shampoo = table.Column(type: "boolean", nullable: false),
Cares = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_HairPrestation", x => x.Id);
});
migrationBuilder.CreateTable(
name: "IdentityResources",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column(type: "boolean", nullable: false),
Name = table.Column(type: "text", nullable: true),
DisplayName = table.Column(type: "text", nullable: true),
Description = table.Column(type: "text", nullable: true),
Required = table.Column(type: "boolean", nullable: false),
Emphasize = table.Column(type: "boolean", nullable: false),
ShowInDiscoveryDocument = table.Column(type: "boolean", nullable: false),
Created = table.Column(type: "timestamp with time zone", nullable: false),
Updated = table.Column(type: "timestamp with time zone", nullable: true),
NonEditable = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityResources", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Instrument",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column(type: "character varying(255)", maxLength: 255, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Instrument", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Locations",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Address = table.Column(type: "character varying(512)", maxLength: 512, nullable: false),
Longitude = table.Column(type: "double precision", nullable: false),
Latitude = table.Column(type: "double precision", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Locations", x => x.Id);
});
migrationBuilder.CreateTable(
name: "MailingTemplate",
columns: table => new
{
Id = table.Column(type: "text", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateModified = table.Column(type: "timestamp with time zone", nullable: false),
Topic = table.Column(type: "text", nullable: false),
Body = table.Column(type: "character varying(65536)", maxLength: 65536, nullable: false),
ReplyToAddress = table.Column(type: "text", nullable: false),
ToSend = table.Column(type: "integer", nullable: false),
UserCreated = table.Column(type: "text", nullable: false),
UserModified = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MailingTemplate", x => x.Id);
});
migrationBuilder.CreateTable(
name: "MusicalTendency",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column(type: "character varying(255)", maxLength: 255, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MusicalTendency", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Notification",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
title = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false),
body = table.Column(type: "character varying(512)", maxLength: 512, nullable: false),
icon = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, defaultValue: "exclam"),
sound = table.Column(type: "character varying(512)", maxLength: 512, nullable: true),
tag = table.Column(type: "character varying(512)", maxLength: 512, nullable: true),
color = table.Column(type: "character varying(512)", maxLength: 512, nullable: true),
click_action = table.Column(type: "character varying(512)", maxLength: 512, nullable: false),
Target = table.Column(type: "character varying(512)", maxLength: 512, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Notification", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Option",
columns: table => new
{
CodeScrutin = table.Column(type: "text", nullable: false),
Code = table.Column(type: "text", nullable: false),
Description = table.Column(type: "text", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
UserCreated = table.Column(type: "text", nullable: false),
DateModified = table.Column(type: "timestamp with time zone", nullable: false),
UserModified = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Option", x => new { x.Code, x.CodeScrutin });
});
migrationBuilder.CreateTable(
name: "Period",
columns: table => new
{
Start = table.Column(type: "timestamp with time zone", nullable: false),
End = table.Column(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Period", x => new { x.Start, x.End });
});
migrationBuilder.CreateTable(
name: "PostalAddress",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Street1 = table.Column(type: "text", nullable: false),
Street2 = table.Column(type: "text", nullable: false),
PostalCode = table.Column(type: "text", nullable: false),
City = table.Column(type: "text", nullable: false),
State = table.Column(type: "text", nullable: false),
Province = table.Column(type: "text", nullable: false),
Country = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PostalAddress", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Products",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Weight = table.Column(type: "numeric", nullable: false),
Height = table.Column(type: "numeric", nullable: false),
Width = table.Column(type: "numeric", nullable: false),
Depth = table.Column(type: "numeric", nullable: false),
Price = table.Column(type: "numeric", nullable: true),
Name = table.Column(type: "text", nullable: false),
Description = table.Column(type: "text", nullable: false),
Public = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Products", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Scopes",
columns: table => new
{
Id = table.Column(type: "text", nullable: false),
Description = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Scopes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "SiteSkills",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column(type: "text", nullable: false),
Rate = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SiteSkills", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Tags",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Tags", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CommandForm",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ActionName = table.Column(type: "text", nullable: false),
Title = table.Column(type: "text", nullable: false),
ActivityCode = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CommandForm", x => x.Id);
table.ForeignKey(
name: "FK_CommandForm_Activities_ActivityCode",
column: x => x.ActivityCode,
principalTable: "Activities",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Services",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ContextId = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
Description = table.Column(type: "text", nullable: false),
Public = table.Column(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Services", x => x.Id);
table.ForeignKey(
name: "FK_Services_Activities_ContextId",
column: x => x.ContextId,
principalTable: "Activities",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiResourceClaim",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ApiResourceId = table.Column(type: "integer", nullable: false),
Type = table.Column(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResourceClaim", x => x.Id);
table.ForeignKey(
name: "FK_ApiResourceClaim_ApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiResourceProperty",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ApiResourceId = table.Column(type: "integer", nullable: false),
Key = table.Column(type: "text", nullable: true),
Value = table.Column(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResourceProperty", x => x.Id);
table.ForeignKey(
name: "FK_ApiResourceProperty_ApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiResourceScope",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Scope = table.Column(type: "text", nullable: true),
ApiResourceId = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResourceScope", x => x.Id);
table.ForeignKey(
name: "FK_ApiResourceScope_ApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiResourceSecret",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ApiResourceId = table.Column(type: "integer", nullable: false),
Description = table.Column(type: "text", nullable: true),
Value = table.Column(type: "text", nullable: true),
Expiration = table.Column(type: "timestamp with time zone", nullable: true),
Type = table.Column(type: "text", nullable: true),
Created = table.Column(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResourceSecret", x => x.Id);
table.ForeignKey(
name: "FK_ApiResourceSecret_ApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiScopeClaim",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ScopeId = table.Column(type: "integer", nullable: false),
Type = table.Column(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiScopeClaim", x => x.Id);
table.ForeignKey(
name: "FK_ApiScopeClaim_ApiScopes_ScopeId",
column: x => x.ScopeId,
principalTable: "ApiScopes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiScopeProperty",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ScopeId = table.Column(type: "integer", nullable: false),
Key = table.Column(type: "text", nullable: true),
Value = table.Column(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiScopeProperty", x => x.Id);
table.ForeignKey(
name: "FK_ApiScopeProperty_ApiScopes_ScopeId",
column: x => x.ScopeId,
principalTable: "ApiScopes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AspNetRoleClaims",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
RoleId = table.Column(type: "text", nullable: false),
ClaimType = table.Column(type: "text", nullable: true),
ClaimValue = table.Column(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
table.ForeignKey(
name: "FK_AspNetRoleClaims_AspNetRoles_RoleId",
column: x => x.RoleId,
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientClaim",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Type = table.Column(type: "text", nullable: true),
Value = table.Column(type: "text", nullable: true),
ClientId = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientClaim", x => x.Id);
table.ForeignKey(
name: "FK_ClientClaim_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientCorsOrigins",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Origin = table.Column(type: "text", nullable: true),
ClientId = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientCorsOrigins", x => x.Id);
table.ForeignKey(
name: "FK_ClientCorsOrigins_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientGrantType",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
GrantType = table.Column(type: "text", nullable: true),
ClientId = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientGrantType", x => x.Id);
table.ForeignKey(
name: "FK_ClientGrantType_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientIdPRestriction",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Provider = table.Column(type: "text", nullable: true),
ClientId = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientIdPRestriction", x => x.Id);
table.ForeignKey(
name: "FK_ClientIdPRestriction_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientPostLogoutRedirectUri",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
PostLogoutRedirectUri = table.Column(type: "text", nullable: true),
ClientId = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientPostLogoutRedirectUri", x => x.Id);
table.ForeignKey(
name: "FK_ClientPostLogoutRedirectUri_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientProperty",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ClientId = table.Column(type: "integer", nullable: false),
Key = table.Column(type: "text", nullable: true),
Value = table.Column(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientProperty", x => x.Id);
table.ForeignKey(
name: "FK_ClientProperty_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientRedirectUri",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
RedirectUri = table.Column(type: "text", nullable: true),
ClientId = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientRedirectUri", x => x.Id);
table.ForeignKey(
name: "FK_ClientRedirectUri_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientScope",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Scope = table.Column(type: "text", nullable: true),
ClientId = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientScope", x => x.Id);
table.ForeignKey(
name: "FK_ClientScope_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientSecret",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ClientId = table.Column(type: "integer", nullable: false),
Description = table.Column(type: "text", nullable: true),
Value = table.Column(type: "text", nullable: true),
Expiration = table.Column(type: "timestamp with time zone", nullable: true),
Type = table.Column(type: "text", nullable: true),
Created = table.Column