From 3aa082bd9a2828cd09d1f4a47a02ba7aa23c4058 Mon Sep 17 00:00:00 2001 From: violet Date: Mon, 14 Oct 2024 13:07:07 +0900 Subject: [PATCH] database code changes for postgres --- ...5dDiplomacyWithMultiverseTimeTravel.csproj | 1 + .../20240722230109_Initial.Designer.cs | 44 ++++++++--------- server/Migrations/20240722230109_Initial.cs | 46 +++++++++--------- ...4_SpecifySandboxAndAdjacencies.Designer.cs | 48 +++++++++---------- ...0806104414_SpecifySandboxAndAdjacencies.cs | 4 +- ...240820212048_FixConnectionData.Designer.cs | 48 +++++++++---------- ...5546_RemoveRegionsFromDatabase.Designer.cs | 36 +++++++------- ...0240827215546_RemoveRegionsFromDatabase.cs | 12 ++--- ...240913120828_FixOneToManyUnits.Designer.cs | 36 +++++++------- ...5220218_PersistAdvancingBoards.Designer.cs | 38 +++++++-------- .../20240915220218_PersistAdvancingBoards.cs | 2 +- server/Migrations/GameContextModelSnapshot.cs | 38 +++++++-------- server/Program.cs | 2 +- 13 files changed, 178 insertions(+), 177 deletions(-) diff --git a/server/5dDiplomacyWithMultiverseTimeTravel.csproj b/server/5dDiplomacyWithMultiverseTimeTravel.csproj index 4808c5e..cd09e11 100644 --- a/server/5dDiplomacyWithMultiverseTimeTravel.csproj +++ b/server/5dDiplomacyWithMultiverseTimeTravel.csproj @@ -16,6 +16,7 @@ + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/server/Migrations/20240722230109_Initial.Designer.cs b/server/Migrations/20240722230109_Initial.Designer.cs index 40c8520..f322e0e 100644 --- a/server/Migrations/20240722230109_Initial.Designer.cs +++ b/server/Migrations/20240722230109_Initial.Designer.cs @@ -29,10 +29,10 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) modelBuilder.Entity("ConnectionMappings", b => { b.Property("ConnectionsId") - .HasColumnType("nvarchar(11)"); + .HasColumnType("varchar(11)"); b.Property("RegionsId") - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b.HasKey("ConnectionsId", "RegionsId"); @@ -2231,9 +2231,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - b.Property("ChildTimelines") + b.Property("ChildTimelines") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.Property("Phase") .HasColumnType("int"); @@ -2278,7 +2278,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -2298,7 +2298,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { b.Property("Id") .HasMaxLength(11) - .HasColumnType("nvarchar(11)"); + .HasColumnType("varchar(11)"); b.Property("Type") .HasColumnType("int"); @@ -3408,13 +3408,13 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - b.Property("Players") + b.Property("Players") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); - b.Property("PlayersSubmitted") + b.Property("PlayersSubmitted") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.HasKey("Id"); @@ -3432,7 +3432,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Property("Discriminator") .IsRequired() .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + .HasColumnType("varchar(8)"); b.Property("Status") .HasColumnType("int"); @@ -3453,7 +3453,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -3481,14 +3481,14 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { b.Property("Id") .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("varchar"); b.Property("ParentId") - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b.Property("Type") .HasColumnType("int"); @@ -4006,7 +4006,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("MustRetreat") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("Owner") .HasColumnType("int"); @@ -4024,7 +4024,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -4088,7 +4088,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -4111,7 +4111,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -4155,7 +4155,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -4185,7 +4185,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -4208,7 +4208,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() diff --git a/server/Migrations/20240722230109_Initial.cs b/server/Migrations/20240722230109_Initial.cs index 6c679c2..1fb2f11 100644 --- a/server/Migrations/20240722230109_Initial.cs +++ b/server/Migrations/20240722230109_Initial.cs @@ -16,7 +16,7 @@ protected override void Up(MigrationBuilder migrationBuilder) name: "Connections", columns: table => new { - Id = table.Column(type: "nvarchar(11)", maxLength: 11, nullable: false), + Id = table.Column(type: "varchar(11)", maxLength: 11, nullable: false), Type = table.Column(type: "int", nullable: false) }, constraints: table => @@ -28,10 +28,10 @@ protected override void Up(MigrationBuilder migrationBuilder) name: "Games", columns: table => new { - Id = table.Column(type: "int", nullable: false) + Id = table.Column(type: "serial", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), - Players = table.Column(type: "nvarchar(max)", nullable: false), - PlayersSubmitted = table.Column(type: "nvarchar(max)", nullable: false) + Players = table.Column(type: "int[]", nullable: false), + PlayersSubmitted = table.Column(type: "int[]", nullable: false) }, constraints: table => { @@ -42,10 +42,10 @@ protected override void Up(MigrationBuilder migrationBuilder) name: "Regions", columns: table => new { - Id = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: false), - ParentId = table.Column(type: "nvarchar(5)", nullable: true), + Id = table.Column(type: "varchar(5)", maxLength: 5, nullable: false), + ParentId = table.Column(type: "varchar(5)", nullable: true), Type = table.Column(type: "int", nullable: false), - Name = table.Column(type: "nvarchar(max)", nullable: false) + Name = table.Column(type: "varchar", nullable: false) }, constraints: table => { @@ -61,7 +61,7 @@ protected override void Up(MigrationBuilder migrationBuilder) name: "Worlds", columns: table => new { - Id = table.Column(type: "int", nullable: false) + Id = table.Column(type: "serial", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), GameId = table.Column(type: "int", nullable: false), Iteration = table.Column(type: "int", nullable: false), @@ -82,8 +82,8 @@ protected override void Up(MigrationBuilder migrationBuilder) name: "ConnectionMappings", columns: table => new { - ConnectionsId = table.Column(type: "nvarchar(11)", nullable: false), - RegionsId = table.Column(type: "nvarchar(5)", nullable: false) + ConnectionsId = table.Column(type: "varchar(11)", nullable: false), + RegionsId = table.Column(type: "varchar(5)", nullable: false) }, constraints: table => { @@ -106,13 +106,13 @@ protected override void Up(MigrationBuilder migrationBuilder) name: "Boards", columns: table => new { - Id = table.Column(type: "int", nullable: false) + Id = table.Column(type: "serial", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WorldId = table.Column(type: "int", nullable: false), Timeline = table.Column(type: "int", nullable: false), Year = table.Column(type: "int", nullable: false), Phase = table.Column(type: "int", nullable: false), - ChildTimelines = table.Column(type: "nvarchar(max)", nullable: false) + ChildTimelines = table.Column(type: "int[]", nullable: false) }, constraints: table => { @@ -129,12 +129,12 @@ protected override void Up(MigrationBuilder migrationBuilder) name: "Centres", columns: table => new { - Id = table.Column(type: "int", nullable: false) + Id = table.Column(type: "serial", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), BoardId = table.Column(type: "int", nullable: false), Owner = table.Column(type: "int", nullable: true), Location_Phase = table.Column(type: "int", nullable: false), - Location_RegionId = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: false), + Location_RegionId = table.Column(type: "varchar(5)", maxLength: 5, nullable: false), Location_Timeline = table.Column(type: "int", nullable: false), Location_Year = table.Column(type: "int", nullable: false) }, @@ -153,14 +153,14 @@ protected override void Up(MigrationBuilder migrationBuilder) name: "Units", columns: table => new { - Id = table.Column(type: "int", nullable: false) + Id = table.Column(type: "serial", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), BoardId = table.Column(type: "int", nullable: false), Owner = table.Column(type: "int", nullable: false), Type = table.Column(type: "int", nullable: false), - MustRetreat = table.Column(type: "bit", nullable: false), + MustRetreat = table.Column(type: "bool", nullable: false), Location_Phase = table.Column(type: "int", nullable: false), - Location_RegionId = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: false), + Location_RegionId = table.Column(type: "varchar(5)", maxLength: 5, nullable: false), Location_Timeline = table.Column(type: "int", nullable: false), Location_Year = table.Column(type: "int", nullable: false) }, @@ -179,22 +179,22 @@ protected override void Up(MigrationBuilder migrationBuilder) name: "Orders", columns: table => new { - Id = table.Column(type: "int", nullable: false) + Id = table.Column(type: "serial", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WorldId = table.Column(type: "int", nullable: false), Status = table.Column(type: "int", nullable: false), UnitId = table.Column(type: "int", nullable: true), - Discriminator = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), + Discriminator = table.Column(type: "varchar(8)", maxLength: 8, nullable: false), Location_Phase = table.Column(type: "int", nullable: false), - Location_RegionId = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: false), + Location_RegionId = table.Column(type: "varchar(5)", maxLength: 5, nullable: false), Location_Timeline = table.Column(type: "int", nullable: false), Location_Year = table.Column(type: "int", nullable: false), Destination_Phase = table.Column(type: "int", nullable: true), - Destination_RegionId = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + Destination_RegionId = table.Column(type: "varchar(5)", maxLength: 5, nullable: true), Destination_Timeline = table.Column(type: "int", nullable: true), Destination_Year = table.Column(type: "int", nullable: true), Midpoint_Phase = table.Column(type: "int", nullable: true), - Midpoint_RegionId = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + Midpoint_RegionId = table.Column(type: "varchar(5)", maxLength: 5, nullable: true), Midpoint_Timeline = table.Column(type: "int", nullable: true), Midpoint_Year = table.Column(type: "int", nullable: true) }, @@ -1004,7 +1004,7 @@ protected override void Up(MigrationBuilder migrationBuilder) table: "Orders", column: "UnitId", unique: true, - filter: "[UnitId] IS NOT NULL"); + filter: "\"UnitId\" IS NOT NULL"); migrationBuilder.CreateIndex( name: "IX_Orders_WorldId", diff --git a/server/Migrations/20240806104414_SpecifySandboxAndAdjacencies.Designer.cs b/server/Migrations/20240806104414_SpecifySandboxAndAdjacencies.Designer.cs index ebd9955..e6fcaf5 100644 --- a/server/Migrations/20240806104414_SpecifySandboxAndAdjacencies.Designer.cs +++ b/server/Migrations/20240806104414_SpecifySandboxAndAdjacencies.Designer.cs @@ -29,10 +29,10 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) modelBuilder.Entity("ConnectionMappings", b => { b.Property("ConnectionsId") - .HasColumnType("nvarchar(11)"); + .HasColumnType("varchar(11)"); b.Property("RegionsId") - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b.HasKey("ConnectionsId", "RegionsId"); @@ -2231,9 +2231,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - b.Property("ChildTimelines") + b.Property("ChildTimelines") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.Property("Phase") .HasColumnType("int"); @@ -2278,7 +2278,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -2298,7 +2298,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { b.Property("Id") .HasMaxLength(11) - .HasColumnType("nvarchar(11)"); + .HasColumnType("varchar(11)"); b.Property("Type") .HasColumnType("int"); @@ -3409,18 +3409,18 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("HasStrictAdjacencies") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("IsSandbox") - .HasColumnType("bit"); + .HasColumnType("bool"); - b.Property("Players") + b.Property("Players") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); - b.Property("PlayersSubmitted") + b.Property("PlayersSubmitted") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.HasKey("Id"); @@ -3438,7 +3438,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Property("Discriminator") .IsRequired() .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + .HasColumnType("varchar(8)"); b.Property("Status") .HasColumnType("int"); @@ -3459,7 +3459,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -3487,14 +3487,14 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { b.Property("Id") .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("varchar"); b.Property("ParentId") - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b.Property("Type") .HasColumnType("int"); @@ -4012,7 +4012,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("MustRetreat") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("Owner") .HasColumnType("int"); @@ -4030,7 +4030,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -4094,7 +4094,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -4117,7 +4117,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -4161,7 +4161,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -4191,7 +4191,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -4214,7 +4214,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() diff --git a/server/Migrations/20240806104414_SpecifySandboxAndAdjacencies.cs b/server/Migrations/20240806104414_SpecifySandboxAndAdjacencies.cs index d2d8e48..c0b75c7 100644 --- a/server/Migrations/20240806104414_SpecifySandboxAndAdjacencies.cs +++ b/server/Migrations/20240806104414_SpecifySandboxAndAdjacencies.cs @@ -13,14 +13,14 @@ protected override void Up(MigrationBuilder migrationBuilder) migrationBuilder.AddColumn( name: "HasStrictAdjacencies", table: "Games", - type: "bit", + type: "bool", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "IsSandbox", table: "Games", - type: "bit", + type: "bool", nullable: false, defaultValue: false); } diff --git a/server/Migrations/20240820212048_FixConnectionData.Designer.cs b/server/Migrations/20240820212048_FixConnectionData.Designer.cs index f417cad..7568d42 100644 --- a/server/Migrations/20240820212048_FixConnectionData.Designer.cs +++ b/server/Migrations/20240820212048_FixConnectionData.Designer.cs @@ -29,10 +29,10 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) modelBuilder.Entity("ConnectionMappings", b => { b.Property("ConnectionsId") - .HasColumnType("nvarchar(11)"); + .HasColumnType("varchar(11)"); b.Property("RegionsId") - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b.HasKey("ConnectionsId", "RegionsId"); @@ -2231,9 +2231,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - b.Property("ChildTimelines") + b.Property("ChildTimelines") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.Property("Phase") .HasColumnType("int"); @@ -2278,7 +2278,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -2298,7 +2298,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { b.Property("Id") .HasMaxLength(11) - .HasColumnType("nvarchar(11)"); + .HasColumnType("varchar(11)"); b.Property("Type") .HasColumnType("int"); @@ -3409,18 +3409,18 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("HasStrictAdjacencies") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("IsSandbox") - .HasColumnType("bit"); + .HasColumnType("bool"); - b.Property("Players") + b.Property("Players") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); - b.Property("PlayersSubmitted") + b.Property("PlayersSubmitted") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.HasKey("Id"); @@ -3438,7 +3438,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Property("Discriminator") .IsRequired() .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + .HasColumnType("varchar(8)"); b.Property("Status") .HasColumnType("int"); @@ -3459,7 +3459,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -3487,14 +3487,14 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { b.Property("Id") .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("varchar"); b.Property("ParentId") - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b.Property("Type") .HasColumnType("int"); @@ -4012,7 +4012,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("MustRetreat") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("Owner") .HasColumnType("int"); @@ -4030,7 +4030,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -4094,7 +4094,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -4117,7 +4117,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -4161,7 +4161,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -4191,7 +4191,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -4214,7 +4214,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() diff --git a/server/Migrations/20240827215546_RemoveRegionsFromDatabase.Designer.cs b/server/Migrations/20240827215546_RemoveRegionsFromDatabase.Designer.cs index d7e2735..ea8caf8 100644 --- a/server/Migrations/20240827215546_RemoveRegionsFromDatabase.Designer.cs +++ b/server/Migrations/20240827215546_RemoveRegionsFromDatabase.Designer.cs @@ -34,9 +34,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - b.Property("ChildTimelines") + b.Property("ChildTimelines") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.Property("Phase") .HasColumnType("int"); @@ -81,7 +81,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -106,18 +106,18 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("HasStrictAdjacencies") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("IsSandbox") - .HasColumnType("bit"); + .HasColumnType("bool"); - b.Property("Players") + b.Property("Players") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); - b.Property("PlayersSubmitted") + b.Property("PlayersSubmitted") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.HasKey("Id"); @@ -135,7 +135,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Property("Discriminator") .IsRequired() .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + .HasColumnType("varchar(8)"); b.Property("Status") .HasColumnType("int"); @@ -156,7 +156,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -192,7 +192,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("MustRetreat") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("Owner") .HasColumnType("int"); @@ -210,7 +210,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -274,7 +274,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -297,7 +297,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -341,7 +341,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -371,7 +371,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -394,7 +394,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() diff --git a/server/Migrations/20240827215546_RemoveRegionsFromDatabase.cs b/server/Migrations/20240827215546_RemoveRegionsFromDatabase.cs index e9a20a0..6d6eb67 100644 --- a/server/Migrations/20240827215546_RemoveRegionsFromDatabase.cs +++ b/server/Migrations/20240827215546_RemoveRegionsFromDatabase.cs @@ -29,7 +29,7 @@ protected override void Down(MigrationBuilder migrationBuilder) name: "Connections", columns: table => new { - Id = table.Column(type: "nvarchar(11)", maxLength: 11, nullable: false), + Id = table.Column(type: "varchar(11)", maxLength: 11, nullable: false), Type = table.Column(type: "int", nullable: false) }, constraints: table => @@ -41,9 +41,9 @@ protected override void Down(MigrationBuilder migrationBuilder) name: "Regions", columns: table => new { - Id = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: false), - ParentId = table.Column(type: "nvarchar(5)", nullable: true), - Name = table.Column(type: "nvarchar(max)", nullable: false), + Id = table.Column(type: "varchar(5)", maxLength: 5, nullable: false), + ParentId = table.Column(type: "varchar(5)", nullable: true), + Name = table.Column(type: "varchar", nullable: false), Type = table.Column(type: "int", nullable: false) }, constraints: table => @@ -60,8 +60,8 @@ protected override void Down(MigrationBuilder migrationBuilder) name: "ConnectionMappings", columns: table => new { - ConnectionsId = table.Column(type: "nvarchar(11)", nullable: false), - RegionsId = table.Column(type: "nvarchar(5)", nullable: false) + ConnectionsId = table.Column(type: "varchar(11)", nullable: false), + RegionsId = table.Column(type: "varchar(5)", nullable: false) }, constraints: table => { diff --git a/server/Migrations/20240913120828_FixOneToManyUnits.Designer.cs b/server/Migrations/20240913120828_FixOneToManyUnits.Designer.cs index 6c27eb7..ba3ca08 100644 --- a/server/Migrations/20240913120828_FixOneToManyUnits.Designer.cs +++ b/server/Migrations/20240913120828_FixOneToManyUnits.Designer.cs @@ -33,9 +33,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - b.Property("ChildTimelines") + b.Property("ChildTimelines") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.Property("Phase") .HasColumnType("int"); @@ -80,7 +80,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -105,18 +105,18 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("HasStrictAdjacencies") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("IsSandbox") - .HasColumnType("bit"); + .HasColumnType("bool"); - b.Property("Players") + b.Property("Players") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); - b.Property("PlayersSubmitted") + b.Property("PlayersSubmitted") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.HasKey("Id"); @@ -134,7 +134,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Property("Discriminator") .IsRequired() .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + .HasColumnType("varchar(8)"); b.Property("Status") .HasColumnType("int"); @@ -155,7 +155,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -189,7 +189,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("MustRetreat") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("Owner") .HasColumnType("int"); @@ -207,7 +207,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -271,7 +271,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -294,7 +294,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -338,7 +338,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -368,7 +368,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -391,7 +391,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() diff --git a/server/Migrations/20240915220218_PersistAdvancingBoards.Designer.cs b/server/Migrations/20240915220218_PersistAdvancingBoards.Designer.cs index 4365f59..1a7537a 100644 --- a/server/Migrations/20240915220218_PersistAdvancingBoards.Designer.cs +++ b/server/Migrations/20240915220218_PersistAdvancingBoards.Designer.cs @@ -33,12 +33,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - b.Property("ChildTimelines") + b.Property("ChildTimelines") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.Property("MightAdvance") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("Phase") .HasColumnType("int"); @@ -83,7 +83,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -108,18 +108,18 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("HasStrictAdjacencies") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("IsSandbox") - .HasColumnType("bit"); + .HasColumnType("bool"); - b.Property("Players") + b.Property("Players") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); - b.Property("PlayersSubmitted") + b.Property("PlayersSubmitted") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.HasKey("Id"); @@ -137,7 +137,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Property("Discriminator") .IsRequired() .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + .HasColumnType("varchar(8)"); b.Property("Status") .HasColumnType("int"); @@ -158,7 +158,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -192,7 +192,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("MustRetreat") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("Owner") .HasColumnType("int"); @@ -210,7 +210,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -274,7 +274,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -297,7 +297,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -341,7 +341,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -371,7 +371,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -394,7 +394,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() diff --git a/server/Migrations/20240915220218_PersistAdvancingBoards.cs b/server/Migrations/20240915220218_PersistAdvancingBoards.cs index 642544c..9b3e10a 100644 --- a/server/Migrations/20240915220218_PersistAdvancingBoards.cs +++ b/server/Migrations/20240915220218_PersistAdvancingBoards.cs @@ -13,7 +13,7 @@ protected override void Up(MigrationBuilder migrationBuilder) migrationBuilder.AddColumn( name: "MightAdvance", table: "Boards", - type: "bit", + type: "bool", nullable: false, defaultValue: false); } diff --git a/server/Migrations/GameContextModelSnapshot.cs b/server/Migrations/GameContextModelSnapshot.cs index 2d82634..9bb5210 100644 --- a/server/Migrations/GameContextModelSnapshot.cs +++ b/server/Migrations/GameContextModelSnapshot.cs @@ -30,12 +30,12 @@ protected override void BuildModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - b.Property("ChildTimelines") + b.Property("ChildTimelines") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.Property("MightAdvance") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("Phase") .HasColumnType("int"); @@ -80,7 +80,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -105,18 +105,18 @@ protected override void BuildModel(ModelBuilder modelBuilder) SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("HasStrictAdjacencies") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("IsSandbox") - .HasColumnType("bit"); + .HasColumnType("bool"); - b.Property("Players") + b.Property("Players") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); - b.Property("PlayersSubmitted") + b.Property("PlayersSubmitted") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("int[]"); b.HasKey("Id"); @@ -134,7 +134,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Discriminator") .IsRequired() .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + .HasColumnType("varchar(8)"); b.Property("Status") .HasColumnType("int"); @@ -155,7 +155,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -189,7 +189,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("MustRetreat") - .HasColumnType("bit"); + .HasColumnType("bool"); b.Property("Owner") .HasColumnType("int"); @@ -207,7 +207,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b1.Property("RegionId") .IsRequired() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .HasColumnType("int"); @@ -271,7 +271,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -294,7 +294,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -338,7 +338,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -368,7 +368,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() @@ -391,7 +391,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .IsRequired() .ValueGeneratedOnUpdateSometimes() .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); + .HasColumnType("varchar(5)"); b1.Property("Timeline") .ValueGeneratedOnUpdateSometimes() diff --git a/server/Program.cs b/server/Program.cs index 34cb194..81c7499 100644 --- a/server/Program.cs +++ b/server/Program.cs @@ -10,7 +10,7 @@ builder.Services.AddControllers().AddJsonOptions(options => options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter())); builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); -builder.Services.AddDbContext(options => options.UseSqlServer(builder.Configuration.GetConnectionString("Database"))); +builder.Services.AddDbContext(options => options.UseNpgsql(builder.Configuration.GetConnectionString("Database"))); builder.Services.AddScoped(); builder.Services.AddScoped();