-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Rename
build_prices
table, make fields non-nullable (#162)
* feat: Rename `build_prices` table, make not null * fix: Update code now that field in non-nullable * fix: Drop redundant warning
- Loading branch information
1 parent
0e9965a
commit 6312e95
Showing
5 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
prisma/migrations/20241206160747_update_build_prices_names/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Alter table | ||
ALTER TABLE "buildprices" RENAME TO "build_prices"; | ||
|
||
-- Alter table | ||
ALTER TABLE "build_prices" RENAME COLUMN "housetype" TO "house_type"; | ||
ALTER TABLE "build_prices" RENAME COLUMN "pricerange" TO "price_range"; | ||
ALTER TABLE "build_prices" RENAME COLUMN "pricemid" TO "price_mid"; |
2 changes: 2 additions & 0 deletions
2
prisma/migrations/20241206161309_rename_constraint/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- AlterTable | ||
ALTER TABLE "build_prices" RENAME CONSTRAINT "buildprices_pkey" TO "build_prices_pkey"; |
14 changes: 14 additions & 0 deletions
14
prisma/migrations/20241206161734_make_build_prices_fields_required/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
Warnings: | ||
- Made the column `house_type_description` on table `build_prices` required. This step will fail if there are existing NULL values in that column. | ||
- Made the column `house_type` on table `build_prices` required. This step will fail if there are existing NULL values in that column. | ||
- Made the column `price_range` on table `build_prices` required. This step will fail if there are existing NULL values in that column. | ||
- Made the column `price_mid` on table `build_prices` required. This step will fail if there are existing NULL values in that column. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "build_prices" ALTER COLUMN "house_type_description" SET NOT NULL, | ||
ALTER COLUMN "house_type" SET NOT NULL, | ||
ALTER COLUMN "price_range" SET NOT NULL, | ||
ALTER COLUMN "price_mid" SET NOT NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters