12        protected override void BuildModel(ModelBuilder modelBuilder)
 
   14#pragma warning disable 612, 618 
   16                .HasAnnotation(
"ProductVersion", 
"8.0.13")
 
   17                .HasAnnotation(
"Relational:MaxIdentifierLength", 63);
 
   19            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
 
   21            modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
 
   23                b.Property<
long?>(
"Id")
 
   24                    .ValueGeneratedOnAdd()
 
   25                    .HasColumnType(
"bigint");
 
   27                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
 
   29                b.Property<
int>(
"ChannelLimit")
 
   30                    .HasColumnType(
"integer");
 
   32                b.Property<
string>(
"ConnectionString")
 
   35                    .HasColumnType(
"character varying(10000)");
 
   37                b.Property<
bool?>(
"Enabled")
 
   38                    .HasColumnType(
"boolean");
 
   40                b.Property<
long>(
"InstanceId")
 
   41                    .HasColumnType(
"bigint");
 
   43                b.Property<
string>(
"Name")
 
   46                    .HasColumnType(
"character varying(100)");
 
   48                b.Property<
int>(
"Provider")
 
   49                    .HasColumnType(
"integer");
 
   51                b.Property<
long>(
"ReconnectionInterval")
 
   52                    .HasColumnType(
"bigint");
 
   56                b.HasIndex(
"InstanceId", 
"Name")
 
   59                b.ToTable(
"ChatBots");
 
   62            modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
 
   64                b.Property<
long>(
"Id")
 
   65                    .ValueGeneratedOnAdd()
 
   66                    .HasColumnType(
"bigint");
 
   68                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
 
   70                b.Property<
long>(
"ChatSettingsId")
 
   71                    .HasColumnType(
"bigint");
 
   73                b.Property<decimal?>(
"DiscordChannelId")
 
   74                    .HasColumnType(
"numeric(20,0)");
 
   76                b.Property<
string>(
"IrcChannel")
 
   78                    .HasColumnType(
"character varying(100)");
 
   80                b.Property<
bool?>(
"IsAdminChannel")
 
   82                    .HasColumnType(
"boolean");
 
   84                b.Property<
bool?>(
"IsSystemChannel")
 
   86                    .HasColumnType(
"boolean");
 
   88                b.Property<
bool?>(
"IsUpdatesChannel")
 
   90                    .HasColumnType(
"boolean");
 
   92                b.Property<
bool?>(
"IsWatchdogChannel")
 
   94                    .HasColumnType(
"boolean");
 
   96                b.Property<
string>(
"Tag")
 
   98                    .HasColumnType(
"character varying(10000)");
 
  102                b.HasIndex(
"ChatSettingsId", 
"DiscordChannelId")
 
  105                b.HasIndex(
"ChatSettingsId", 
"IrcChannel")
 
  108                b.ToTable(
"ChatChannels");
 
  111            modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
 
  113                b.Property<
long?>(
"Id")
 
  114                    .ValueGeneratedOnAdd()
 
  115                    .HasColumnType(
"bigint");
 
  117                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
 
  119                b.Property<
int?>(
"DMApiMajorVersion")
 
  120                    .HasColumnType(
"integer");
 
  122                b.Property<
int?>(
"DMApiMinorVersion")
 
  123                    .HasColumnType(
"integer");
 
  125                b.Property<
int?>(
"DMApiPatchVersion")
 
  126                    .HasColumnType(
"integer");
 
  128                b.Property<Guid?>(
"DirectoryName")
 
  130                    .HasColumnType(
"uuid");
 
  132                b.Property<
string>(
"DmeName")
 
  134                    .HasColumnType(
"text");
 
  136                b.Property<
string>(
"EngineVersion")
 
  138                    .HasColumnType(
"text");
 
  140                b.Property<
long?>(
"GitHubDeploymentId")
 
  141                    .HasColumnType(
"bigint");
 
  143                b.Property<
long?>(
"GitHubRepoId")
 
  144                    .HasColumnType(
"bigint");
 
  146                b.Property<
long>(
"JobId")
 
  147                    .HasColumnType(
"bigint");
 
  149                b.Property<
int?>(
"MinimumSecurityLevel")
 
  150                    .HasColumnType(
"integer");
 
  152                b.Property<
string>(
"Output")
 
  154                    .HasColumnType(
"text");
 
  156                b.Property<
string>(
"RepositoryOrigin")
 
  157                    .HasColumnType(
"text");
 
  159                b.Property<
long>(
"RevisionInformationId")
 
  160                    .HasColumnType(
"bigint");
 
  164                b.HasIndex(
"DirectoryName");
 
  169                b.HasIndex(
"RevisionInformationId");
 
  171                b.ToTable(
"CompileJobs");
 
  174            modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
 
  176                b.Property<
long>(
"Id")
 
  177                    .ValueGeneratedOnAdd()
 
  178                    .HasColumnType(
"bigint");
 
  180                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
 
  182                b.Property<
string>(
"AdditionalParameters")
 
  185                    .HasColumnType(
"character varying(10000)");
 
  187                b.Property<
bool?>(
"AllowWebClient")
 
  189                    .HasColumnType(
"boolean");
 
  191                b.Property<
bool?>(
"AutoStart")
 
  193                    .HasColumnType(
"boolean");
 
  195                b.Property<
bool?>(
"DumpOnHealthCheckRestart")
 
  197                    .HasColumnType(
"boolean");
 
  199                b.Property<
long>(
"HealthCheckSeconds")
 
  200                    .HasColumnType(
"bigint");
 
  202                b.Property<
long>(
"InstanceId")
 
  203                    .HasColumnType(
"bigint");
 
  205                b.Property<
bool?>(
"LogOutput")
 
  207                    .HasColumnType(
"boolean");
 
  209                b.Property<
long>(
"MapThreads")
 
  210                    .HasColumnType(
"bigint");
 
  212                b.Property<
bool?>(
"Minidumps")
 
  214                    .HasColumnType(
"boolean");
 
  216                b.Property<
int>(
"OpenDreamTopicPort")
 
  217                    .HasColumnType(
"integer");
 
  219                b.Property<
int>(
"Port")
 
  220                    .HasColumnType(
"integer");
 
  222                b.Property<
int>(
"SecurityLevel")
 
  223                    .HasColumnType(
"integer");
 
  225                b.Property<
bool?>(
"StartProfiler")
 
  227                    .HasColumnType(
"boolean");
 
  229                b.Property<
long>(
"StartupTimeout")
 
  230                    .HasColumnType(
"bigint");
 
  232                b.Property<
long>(
"TopicRequestTimeout")
 
  233                    .HasColumnType(
"bigint");
 
  235                b.Property<
int>(
"Visibility")
 
  236                    .HasColumnType(
"integer");
 
  240                b.HasIndex(
"InstanceId")
 
  243                b.ToTable(
"DreamDaemonSettings");
 
  246            modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
 
  248                b.Property<
long>(
"Id")
 
  249                    .ValueGeneratedOnAdd()
 
  250                    .HasColumnType(
"bigint");
 
  252                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
 
  254                b.Property<
int>(
"ApiValidationPort")
 
  255                    .HasColumnType(
"integer");
 
  257                b.Property<
int>(
"ApiValidationSecurityLevel")
 
  258                    .HasColumnType(
"integer");
 
  260                b.Property<
string>(
"CompilerAdditionalArguments")
 
  262                    .HasColumnType(
"character varying(10000)");
 
  264                b.Property<
int>(
"DMApiValidationMode")
 
  265                    .HasColumnType(
"integer");
 
  267                b.Property<
long>(
"InstanceId")
 
  268                    .HasColumnType(
"bigint");
 
  270                b.Property<
string>(
"ProjectName")
 
  272                    .HasColumnType(
"character varying(10000)");
 
  274                b.Property<TimeSpan?>(
"Timeout")
 
  276                    .HasColumnType(
"interval");
 
  280                b.HasIndex(
"InstanceId")
 
  283                b.ToTable(
"DreamMakerSettings");
 
  286            modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
 
  288                b.Property<
long?>(
"Id")
 
  289                    .ValueGeneratedOnAdd()
 
  290                    .HasColumnType(
"bigint");
 
  292                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
 
  294                b.Property<
string>(
"AutoStartCron")
 
  297                    .HasColumnType(
"character varying(1000)");
 
  299                b.Property<
string>(
"AutoStopCron")
 
  302                    .HasColumnType(
"character varying(1000)");
 
  304                b.Property<
string>(
"AutoUpdateCron")
 
  307                    .HasColumnType(
"character varying(1000)");
 
  309                b.Property<
long>(
"AutoUpdateInterval")
 
  310                    .HasColumnType(
"bigint");
 
  312                b.Property<
int>(
"ChatBotLimit")
 
  313                    .HasColumnType(
"integer");
 
  315                b.Property<
int>(
"ConfigurationType")
 
  316                    .HasColumnType(
"integer");
 
  318                b.Property<
string>(
"Name")
 
  321                    .HasColumnType(
"character varying(100)");
 
  323                b.Property<
bool?>(
"Online")
 
  325                    .HasColumnType(
"boolean");
 
  327                b.Property<
string>(
"Path")
 
  329                    .HasColumnType(
"text");
 
  331                b.Property<
string>(
"SwarmIdentifer")
 
  332                    .HasColumnType(
"text");
 
  336                b.HasIndex(
"Path", 
"SwarmIdentifer")
 
  339                b.ToTable(
"Instances");
 
  342            modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
 
  344                b.Property<
long>(
"Id")
 
  345                    .ValueGeneratedOnAdd()
 
  346                    .HasColumnType(
"bigint");
 
  348                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
 
  350                b.Property<decimal>(
"ChatBotRights")
 
  351                    .HasColumnType(
"numeric(20,0)");
 
  353                b.Property<decimal>(
"ConfigurationRights")
 
  354                    .HasColumnType(
"numeric(20,0)");
 
  356                b.Property<decimal>(
"DreamDaemonRights")
 
  357                    .HasColumnType(
"numeric(20,0)");
 
  359                b.Property<decimal>(
"DreamMakerRights")
 
  360                    .HasColumnType(
"numeric(20,0)");
 
  362                b.Property<decimal>(
"EngineRights")
 
  363                    .HasColumnType(
"numeric(20,0)");
 
  365                b.Property<
long>(
"InstanceId")
 
  366                    .HasColumnType(
"bigint");
 
  368                b.Property<decimal>(
"InstancePermissionSetRights")
 
  369                    .HasColumnType(
"numeric(20,0)");
 
  371                b.Property<
long>(
"PermissionSetId")
 
  372                    .HasColumnType(
"bigint");
 
  374                b.Property<decimal>(
"RepositoryRights")
 
  375                    .HasColumnType(
"numeric(20,0)");
 
  379                b.HasIndex(
"InstanceId");
 
  381                b.HasIndex(
"PermissionSetId", 
"InstanceId")
 
  384                b.ToTable(
"InstancePermissionSets");
 
  387            modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
 
  389                b.Property<
long?>(
"Id")
 
  390                    .ValueGeneratedOnAdd()
 
  391                    .HasColumnType(
"bigint");
 
  393                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
 
  395                b.Property<decimal?>(
"CancelRight")
 
  396                    .HasColumnType(
"numeric(20,0)");
 
  398                b.Property<decimal?>(
"CancelRightsType")
 
  399                    .HasColumnType(
"numeric(20,0)");
 
  401                b.Property<
bool?>(
"Cancelled")
 
  403                    .HasColumnType(
"boolean");
 
  405                b.Property<
long?>(
"CancelledById")
 
  406                    .HasColumnType(
"bigint");
 
  408                b.Property<
string>(
"Description")
 
  410                    .HasColumnType(
"text");
 
  412                b.Property<
long?>(
"ErrorCode")
 
  413                    .HasColumnType(
"bigint");
 
  415                b.Property<
string>(
"ExceptionDetails")
 
  416                    .HasColumnType(
"text");
 
  418                b.Property<
long>(
"InstanceId")
 
  419                    .HasColumnType(
"bigint");
 
  421                b.Property<
byte>(
"JobCode")
 
  422                    .HasColumnType(
"smallint");
 
  424                b.Property<DateTimeOffset?>(
"StartedAt")
 
  426                    .HasColumnType(
"timestamp with time zone");
 
  428                b.Property<
long>(
"StartedById")
 
  429                    .HasColumnType(
"bigint");
 
  431                b.Property<DateTimeOffset?>(
"StoppedAt")
 
  432                    .HasColumnType(
"timestamp with time zone");
 
  436                b.HasIndex(
"CancelledById");
 
  438                b.HasIndex(
"InstanceId");
 
  440                b.HasIndex(
"StartedById");
 
  445            modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
 
  447                b.Property<
long>(
"Id")
 
  448                    .ValueGeneratedOnAdd()
 
  449                    .HasColumnType(
"bigint");
 
  451                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
 
  453                b.Property<
string>(
"ExternalUserId")
 
  456                    .HasColumnType(
"character varying(100)");
 
  458                b.Property<
int>(
"Provider")
 
  459                    .HasColumnType(
"integer");
 
  461                b.Property<
long>(
"UserId")
 
  462                    .HasColumnType(
"bigint");
 
  466                b.HasIndex(
"UserId");
 
  468                b.HasIndex(
"Provider", 
"ExternalUserId")
 
  471                b.ToTable(
"OAuthConnections");
 
  474            modelBuilder.Entity(
"Tgstation.Server.Host.Models.OidcConnection", b =>
 
  476                b.Property<
long>(
"Id")
 
  477                    .ValueGeneratedOnAdd()
 
  478                    .HasColumnType(
"bigint");
 
  480                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
 
  482                b.Property<
string>(
"ExternalUserId")
 
  485                    .HasColumnType(
"character varying(100)");
 
  487                b.Property<
string>(
"SchemeKey")
 
  490                    .HasColumnType(
"character varying(100)");
 
  492                b.Property<
long>(
"UserId")
 
  493                    .HasColumnType(
"bigint");
 
  497                b.HasIndex(
"UserId");
 
  499                b.HasIndex(
"SchemeKey", 
"ExternalUserId")
 
  502                b.ToTable(
"OidcConnections");
 
  505            modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
 
  507                b.Property<
long?>(
"Id")
 
  508                    .ValueGeneratedOnAdd()
 
  509                    .HasColumnType(
"bigint");
 
  511                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
 
  513                b.Property<decimal>(
"AdministrationRights")
 
  514                    .HasColumnType(
"numeric(20,0)");
 
  516                b.Property<
long?>(
"GroupId")
 
  517                    .HasColumnType(
"bigint");
 
  519                b.Property<decimal>(
"InstanceManagerRights")
 
  520                    .HasColumnType(
"numeric(20,0)");
 
  522                b.Property<
long?>(
"UserId")
 
  523                    .HasColumnType(
"bigint");
 
  527                b.HasIndex(
"GroupId")
 
  533                b.ToTable(
"PermissionSets");
 
  536            modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
 
  538                b.Property<
long?>(
"Id")
 
  539                    .ValueGeneratedOnAdd()
 
  540                    .HasColumnType(
"bigint");
 
  542                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
 
  544                b.Property<
string>(
"AccessIdentifier")
 
  546                    .HasColumnType(
"text");
 
  548                b.Property<
long>(
"CompileJobId")
 
  549                    .HasColumnType(
"bigint");
 
  551                b.Property<
long?>(
"InitialCompileJobId")
 
  552                    .HasColumnType(
"bigint");
 
  554                b.Property<
int>(
"LaunchSecurityLevel")
 
  555                    .HasColumnType(
"integer");
 
  557                b.Property<
int>(
"LaunchVisibility")
 
  558                    .HasColumnType(
"integer");
 
  560                b.Property<
int>(
"Port")
 
  561                    .HasColumnType(
"integer");
 
  563                b.Property<
int>(
"ProcessId")
 
  564                    .HasColumnType(
"integer");
 
  566                b.Property<
int>(
"RebootState")
 
  567                    .HasColumnType(
"integer");
 
  569                b.Property<
int?>(
"TopicPort")
 
  570                    .HasColumnType(
"integer");
 
  574                b.HasIndex(
"CompileJobId");
 
  576                b.HasIndex(
"InitialCompileJobId");
 
  578                b.ToTable(
"ReattachInformations");
 
  581            modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
 
  583                b.Property<
long>(
"Id")
 
  584                    .ValueGeneratedOnAdd()
 
  585                    .HasColumnType(
"bigint");
 
  587                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
 
  589                b.Property<
string>(
"AccessToken")
 
  591                    .HasColumnType(
"character varying(10000)");
 
  593                b.Property<
string>(
"AccessUser")
 
  595                    .HasColumnType(
"character varying(10000)");
 
  597                b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
 
  599                    .HasColumnType(
"boolean");
 
  601                b.Property<
bool?>(
"AutoUpdatesSynchronize")
 
  603                    .HasColumnType(
"boolean");
 
  605                b.Property<
string>(
"CommitterEmail")
 
  608                    .HasColumnType(
"character varying(10000)");
 
  610                b.Property<
string>(
"CommitterName")
 
  613                    .HasColumnType(
"character varying(10000)");
 
  615                b.Property<
bool?>(
"CreateGitHubDeployments")
 
  617                    .HasColumnType(
"boolean");
 
  619                b.Property<
long>(
"InstanceId")
 
  620                    .HasColumnType(
"bigint");
 
  622                b.Property<
bool?>(
"PostTestMergeComment")
 
  624                    .HasColumnType(
"boolean");
 
  626                b.Property<
bool?>(
"PushTestMergeCommits")
 
  628                    .HasColumnType(
"boolean");
 
  630                b.Property<
bool?>(
"ShowTestMergeCommitters")
 
  632                    .HasColumnType(
"boolean");
 
  634                b.Property<
bool?>(
"UpdateSubmodules")
 
  636                    .HasColumnType(
"boolean");
 
  640                b.HasIndex(
"InstanceId")
 
  643                b.ToTable(
"RepositorySettings");
 
  646            modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
 
  648                b.Property<
long>(
"Id")
 
  649                    .ValueGeneratedOnAdd()
 
  650                    .HasColumnType(
"bigint");
 
  652                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
 
  654                b.Property<
long>(
"RevisionInformationId")
 
  655                    .HasColumnType(
"bigint");
 
  657                b.Property<
long>(
"TestMergeId")
 
  658                    .HasColumnType(
"bigint");
 
  662                b.HasIndex(
"RevisionInformationId");
 
  664                b.HasIndex(
"TestMergeId");
 
  666                b.ToTable(
"RevInfoTestMerges");
 
  669            modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
 
  671                b.Property<
long>(
"Id")
 
  672                    .ValueGeneratedOnAdd()
 
  673                    .HasColumnType(
"bigint");
 
  675                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
 
  677                b.Property<
string>(
"CommitSha")
 
  680                    .HasColumnType(
"character varying(40)");
 
  682                b.Property<
long>(
"InstanceId")
 
  683                    .HasColumnType(
"bigint");
 
  685                b.Property<
string>(
"OriginCommitSha")
 
  688                    .HasColumnType(
"character varying(40)");
 
  690                b.Property<DateTimeOffset>(
"Timestamp")
 
  691                    .HasColumnType(
"timestamp with time zone");
 
  695                b.HasIndex(
"InstanceId", 
"CommitSha")
 
  698                b.ToTable(
"RevisionInformations");
 
  701            modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
 
  703                b.Property<
long>(
"Id")
 
  704                    .ValueGeneratedOnAdd()
 
  705                    .HasColumnType(
"bigint");
 
  707                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long>(
"Id"));
 
  709                b.Property<
string>(
"Author")
 
  711                    .HasColumnType(
"text");
 
  713                b.Property<
string>(
"BodyAtMerge")
 
  715                    .HasColumnType(
"text");
 
  717                b.Property<
string>(
"Comment")
 
  719                    .HasColumnType(
"character varying(10000)");
 
  721                b.Property<DateTimeOffset>(
"MergedAt")
 
  722                    .HasColumnType(
"timestamp with time zone");
 
  724                b.Property<
long>(
"MergedById")
 
  725                    .HasColumnType(
"bigint");
 
  727                b.Property<
int>(
"Number")
 
  728                    .HasColumnType(
"integer");
 
  730                b.Property<
long?>(
"PrimaryRevisionInformationId")
 
  732                    .HasColumnType(
"bigint");
 
  734                b.Property<
string>(
"TargetCommitSha")
 
  737                    .HasColumnType(
"character varying(40)");
 
  739                b.Property<
string>(
"TitleAtMerge")
 
  741                    .HasColumnType(
"text");
 
  743                b.Property<
string>(
"Url")
 
  745                    .HasColumnType(
"text");
 
  749                b.HasIndex(
"MergedById");
 
  751                b.HasIndex(
"PrimaryRevisionInformationId")
 
  754                b.ToTable(
"TestMerges");
 
  757            modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
 
  759                b.Property<
long?>(
"Id")
 
  760                    .ValueGeneratedOnAdd()
 
  761                    .HasColumnType(
"bigint");
 
  763                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
 
  765                b.Property<
string>(
"CanonicalName")
 
  768                    .HasColumnType(
"character varying(100)");
 
  770                b.Property<DateTimeOffset?>(
"CreatedAt")
 
  772                    .HasColumnType(
"timestamp with time zone");
 
  774                b.Property<
long?>(
"CreatedById")
 
  775                    .HasColumnType(
"bigint");
 
  777                b.Property<
bool?>(
"Enabled")
 
  779                    .HasColumnType(
"boolean");
 
  781                b.Property<
long?>(
"GroupId")
 
  782                    .HasColumnType(
"bigint");
 
  784                b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
 
  785                    .HasColumnType(
"timestamp with time zone");
 
  787                b.Property<
string>(
"Name")
 
  790                    .HasColumnType(
"character varying(100)");
 
  792                b.Property<
string>(
"PasswordHash")
 
  793                    .HasColumnType(
"text");
 
  795                b.Property<
string>(
"SystemIdentifier")
 
  797                    .HasColumnType(
"character varying(100)");
 
  801                b.HasIndex(
"CanonicalName")
 
  804                b.HasIndex(
"CreatedById");
 
  806                b.HasIndex(
"GroupId");
 
  808                b.HasIndex(
"SystemIdentifier")
 
  814            modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
 
  816                b.Property<
long?>(
"Id")
 
  817                    .ValueGeneratedOnAdd()
 
  818                    .HasColumnType(
"bigint");
 
  820                NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<
long?>(
"Id"));
 
  822                b.Property<
string>(
"Name")
 
  825                    .HasColumnType(
"character varying(100)");
 
  835            modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
 
  837                b.HasOne(
"Tgstation.Server.Host.Models.Instance", 
"Instance")
 
  838                    .WithMany(
"ChatSettings")
 
  839                    .HasForeignKey(
"InstanceId")
 
  840                    .OnDelete(DeleteBehavior.Cascade)
 
  843                b.Navigation(
"Instance");
 
  846            modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
 
  848                b.HasOne(
"Tgstation.Server.Host.Models.ChatBot", 
"ChatSettings")
 
  849                    .WithMany(
"Channels")
 
  850                    .HasForeignKey(
"ChatSettingsId")
 
  851                    .OnDelete(DeleteBehavior.Cascade)
 
  854                b.Navigation(
"ChatSettings");
 
  857            modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
 
  859                b.HasOne(
"Tgstation.Server.Host.Models.Job", 
"Job")
 
  861                    .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob", 
"JobId")
 
  862                    .OnDelete(DeleteBehavior.Cascade)
 
  865                b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation", 
"RevisionInformation")
 
  866                    .WithMany(
"CompileJobs")
 
  867                    .HasForeignKey(
"RevisionInformationId")
 
  868                    .OnDelete(DeleteBehavior.Cascade)
 
  873                b.Navigation(
"RevisionInformation");
 
  876            modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
 
  878                b.HasOne(
"Tgstation.Server.Host.Models.Instance", 
"Instance")
 
  879                    .WithOne(
"DreamDaemonSettings")
 
  880                    .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings", 
"InstanceId")
 
  881                    .OnDelete(DeleteBehavior.Cascade)
 
  884                b.Navigation(
"Instance");
 
  887            modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
 
  889                b.HasOne(
"Tgstation.Server.Host.Models.Instance", 
"Instance")
 
  890                    .WithOne(
"DreamMakerSettings")
 
  891                    .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings", 
"InstanceId")
 
  892                    .OnDelete(DeleteBehavior.Cascade)
 
  895                b.Navigation(
"Instance");
 
  898            modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
 
  900                b.HasOne(
"Tgstation.Server.Host.Models.Instance", 
"Instance")
 
  901                    .WithMany(
"InstancePermissionSets")
 
  902                    .HasForeignKey(
"InstanceId")
 
  903                    .OnDelete(DeleteBehavior.Cascade)
 
  906                b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet", 
"PermissionSet")
 
  907                    .WithMany(
"InstancePermissionSets")
 
  908                    .HasForeignKey(
"PermissionSetId")
 
  909                    .OnDelete(DeleteBehavior.Cascade)
 
  912                b.Navigation(
"Instance");
 
  914                b.Navigation(
"PermissionSet");
 
  917            modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
 
  919                b.HasOne(
"Tgstation.Server.Host.Models.User", 
"CancelledBy")
 
  921                    .HasForeignKey(
"CancelledById");
 
  923                b.HasOne(
"Tgstation.Server.Host.Models.Instance", 
"Instance")
 
  925                    .HasForeignKey(
"InstanceId")
 
  926                    .OnDelete(DeleteBehavior.Cascade)
 
  929                b.HasOne(
"Tgstation.Server.Host.Models.User", 
"StartedBy")
 
  931                    .HasForeignKey(
"StartedById")
 
  932                    .OnDelete(DeleteBehavior.Cascade)
 
  935                b.Navigation(
"CancelledBy");
 
  937                b.Navigation(
"Instance");
 
  939                b.Navigation(
"StartedBy");
 
  942            modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
 
  944                b.HasOne(
"Tgstation.Server.Host.Models.User", 
"User")
 
  945                    .WithMany(
"OAuthConnections")
 
  946                    .HasForeignKey(
"UserId")
 
  947                    .OnDelete(DeleteBehavior.Cascade)
 
  950                b.Navigation(
"User");
 
  953            modelBuilder.Entity(
"Tgstation.Server.Host.Models.OidcConnection", b =>
 
  955                b.HasOne(
"Tgstation.Server.Host.Models.User", 
"User")
 
  956                    .WithMany(
"OidcConnections")
 
  957                    .HasForeignKey(
"UserId")
 
  958                    .OnDelete(DeleteBehavior.Cascade)
 
  961                b.Navigation(
"User");
 
  964            modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
 
  966                b.HasOne(
"Tgstation.Server.Host.Models.UserGroup", 
"Group")
 
  967                    .WithOne(
"PermissionSet")
 
  968                    .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet", 
"GroupId")
 
  969                    .OnDelete(DeleteBehavior.Cascade);
 
  971                b.HasOne(
"Tgstation.Server.Host.Models.User", 
"User")
 
  972                    .WithOne(
"PermissionSet")
 
  973                    .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet", 
"UserId")
 
  974                    .OnDelete(DeleteBehavior.Cascade);
 
  976                b.Navigation(
"Group");
 
  978                b.Navigation(
"User");
 
  981            modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
 
  983                b.HasOne(
"Tgstation.Server.Host.Models.CompileJob", 
"CompileJob")
 
  985                    .HasForeignKey(
"CompileJobId")
 
  986                    .OnDelete(DeleteBehavior.Cascade)
 
  989                b.HasOne(
"Tgstation.Server.Host.Models.CompileJob", 
"InitialCompileJob")
 
  991                    .HasForeignKey(
"InitialCompileJobId");
 
  993                b.Navigation(
"CompileJob");
 
  995                b.Navigation(
"InitialCompileJob");
 
  998            modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
 
 1000                b.HasOne(
"Tgstation.Server.Host.Models.Instance", 
"Instance")
 
 1001                    .WithOne(
"RepositorySettings")
 
 1002                    .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings", 
"InstanceId")
 
 1003                    .OnDelete(DeleteBehavior.Cascade)
 
 1006                b.Navigation(
"Instance");
 
 1009            modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
 
 1011                b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation", 
"RevisionInformation")
 
 1012                    .WithMany(
"ActiveTestMerges")
 
 1013                    .HasForeignKey(
"RevisionInformationId")
 
 1014                    .OnDelete(DeleteBehavior.Cascade)
 
 1017                b.HasOne(
"Tgstation.Server.Host.Models.TestMerge", 
"TestMerge")
 
 1018                    .WithMany(
"RevisonInformations")
 
 1019                    .HasForeignKey(
"TestMergeId")
 
 1020                    .OnDelete(DeleteBehavior.ClientNoAction)
 
 1023                b.Navigation(
"RevisionInformation");
 
 1025                b.Navigation(
"TestMerge");
 
 1028            modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
 
 1030                b.HasOne(
"Tgstation.Server.Host.Models.Instance", 
"Instance")
 
 1031                    .WithMany(
"RevisionInformations")
 
 1032                    .HasForeignKey(
"InstanceId")
 
 1033                    .OnDelete(DeleteBehavior.Cascade)
 
 1036                b.Navigation(
"Instance");
 
 1039            modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
 
 1041                b.HasOne(
"Tgstation.Server.Host.Models.User", 
"MergedBy")
 
 1042                    .WithMany(
"TestMerges")
 
 1043                    .HasForeignKey(
"MergedById")
 
 1044                    .OnDelete(DeleteBehavior.Restrict)
 
 1047                b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation", 
"PrimaryRevisionInformation")
 
 1048                    .WithOne(
"PrimaryTestMerge")
 
 1049                    .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge", 
"PrimaryRevisionInformationId")
 
 1050                    .OnDelete(DeleteBehavior.Cascade)
 
 1053                b.Navigation(
"MergedBy");
 
 1055                b.Navigation(
"PrimaryRevisionInformation");
 
 1058            modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
 
 1060                b.HasOne(
"Tgstation.Server.Host.Models.User", 
"CreatedBy")
 
 1061                    .WithMany(
"CreatedUsers")
 
 1062                    .HasForeignKey(
"CreatedById");
 
 1064                b.HasOne(
"Tgstation.Server.Host.Models.UserGroup", 
"Group")
 
 1066                    .HasForeignKey(
"GroupId");
 
 1068                b.Navigation(
"CreatedBy");
 
 1070                b.Navigation(
"Group");
 
 1073            modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
 
 1075                b.Navigation(
"Channels");
 
 1078            modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
 
 1080                b.Navigation(
"ChatSettings");
 
 1082                b.Navigation(
"DreamDaemonSettings");
 
 1084                b.Navigation(
"DreamMakerSettings");
 
 1086                b.Navigation(
"InstancePermissionSets");
 
 1088                b.Navigation(
"Jobs");
 
 1090                b.Navigation(
"RepositorySettings");
 
 1092                b.Navigation(
"RevisionInformations");
 
 1095            modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
 
 1097                b.Navigation(
"InstancePermissionSets");
 
 1100            modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
 
 1102                b.Navigation(
"ActiveTestMerges");
 
 1104                b.Navigation(
"CompileJobs");
 
 1106                b.Navigation(
"PrimaryTestMerge");
 
 1109            modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
 
 1111                b.Navigation(
"RevisonInformations");
 
 1114            modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
 
 1116                b.Navigation(
"CreatedUsers");
 
 1118                b.Navigation(
"OAuthConnections");
 
 1120                b.Navigation(
"OidcConnections");
 
 1122                b.Navigation(
"PermissionSet");
 
 1124                b.Navigation(
"TestMerges");
 
 1127            modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
 
 1129                b.Navigation(
"PermissionSet")
 
 1132                b.Navigation(
"Users");
 
 1134#pragma warning restore 612, 618