Browse Source

[AC-1360] Added EF scripts for MySQL, Postgres and Sqlite

pull/3149/head
Rui Tome 2 years ago
parent
commit
4b47d25755
No known key found for this signature in database
GPG Key ID: 526239D96A8EC066
  1. 1
      util/MySqlMigrations/MySqlMigrations.csproj
  2. 5
      util/MySqlMigrations/Scripts/2023-08-03_00_PopulateResellerNames.sql
  3. 1
      util/PostgresMigrations/PostgresMigrations.csproj
  4. 5
      util/PostgresMigrations/Scripts/2023-08-03_00_PopulateResellerNames.sql
  5. 5
      util/SqliteMigrations/Scripts/2023-08-03_00_PopulateResellerNames.sql
  6. 4
      util/SqliteMigrations/SqliteMigrations.csproj

1
util/MySqlMigrations/MySqlMigrations.csproj

@ -29,5 +29,6 @@ @@ -29,5 +29,6 @@
<EmbeddedResource Include="HelperScripts\2021-10-21_00_SetMaxAutoscaleSeatCount.sql" />
<EmbeddedResource Include="HelperScripts\2022-03-01_00_Up_MigrateOrganizationApiKeys.sql" />
<EmbeddedResource Include="HelperScripts\2022-03-01_00_Down_MigrateOrganizationApiKeys.sql" />
<EmbeddedResource Include="Scripts\2023-08-03_00_PopulateResellerNames.sql" />
</ItemGroup>
</Project>

5
util/MySqlMigrations/Scripts/2023-08-03_00_PopulateResellerNames.sql

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
-- Reseller Providers were being created with a NULL value in the `Name` column.
-- This script will populate them with the value from `BusinessName` which was already required.
UPDATE `Provider`
SET `Name` = `BusinessName`
WHERE `Name` IS NULL;

1
util/PostgresMigrations/PostgresMigrations.csproj

@ -24,5 +24,6 @@ @@ -24,5 +24,6 @@
<EmbeddedResource Include="HelperScripts\2021-10-21_00_SetMaxAutoscaleSeatCount.psql" />
<EmbeddedResource Include="HelperScripts\2022-03-01_00_Up_MigrateOrganizationApiKeys.psql" />
<EmbeddedResource Include="HelperScripts\2022-03-01_00_Down_MigrateOrganizationApiKeys.psql" />
<EmbeddedResource Include="Scripts\2023-08-03_00_PopulateResellerNames.sql" />
</ItemGroup>
</Project>

5
util/PostgresMigrations/Scripts/2023-08-03_00_PopulateResellerNames.sql

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
-- Reseller Providers were being created with a NULL value in the "Name" column.
-- This script will populate them with the value from "BusinessName" which was already required.
UPDATE "Provider"
SET "Name" = "BusinessName"
WHERE "Name" IS NULL;

5
util/SqliteMigrations/Scripts/2023-08-03_00_PopulateResellerNames.sql

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
-- Reseller Providers were being created with a NULL value in the "Name" column.
-- This script will populate them with the value from "BusinessName" which was already required.
UPDATE "Provider"
SET "Name" = "BusinessName"
WHERE "Name" IS NULL;

4
util/SqliteMigrations/SqliteMigrations.csproj

@ -22,4 +22,8 @@ @@ -22,4 +22,8 @@
<Compile Include="..\EfShared\MigrationBuilderExtensions.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Scripts\2023-08-03_00_PopulateResellerNames.sql" />
</ItemGroup>
</Project>

Loading…
Cancel
Save