Skip to content

Commit

Permalink
[AC-1360] Added EF scripts for MySQL, Postgres and Sqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
r-tome committed Aug 3, 2023
1 parent 2628361 commit 4b47d25
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions util/MySqlMigrations/MySqlMigrations.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions util/PostgresMigrations/PostgresMigrations.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
@@ -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 changes: 4 additions & 0 deletions util/SqliteMigrations/SqliteMigrations.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@
<Compile Include="..\EfShared\MigrationBuilderExtensions.cs" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Scripts\2023-08-03_00_PopulateResellerNames.sql" />
</ItemGroup>

</Project>

0 comments on commit 4b47d25

Please sign in to comment.