-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- cherry-pick migration from IN-831-edit-organization-page - update bool defaults <!--- Please provide a general summary of your changes in the title above --> # Pull Request type <!-- Please try to limit your pull request to one type; submit multiple pull requests if needed. --> Please check the type of change your PR introduces: - [x] Bugfix - [ ] Feature - [ ] Code style update (formatting, renaming) - [ ] Refactoring (no functional changes, no API changes) - [ ] Build-related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior? <!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> Issue Number: N/A ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> OrgLocation api query was excluding results due to boolean value allowed to be null. ## Does this introduce a breaking change? - [ ] Yes - [ ] No <!-- If this does introduce a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR, such as screenshots of how the component looks before and after the change. -->
- Loading branch information
Showing
5 changed files
with
87 additions
and
22 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
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 "OrgPhone" ADD COLUMN "countryCode" TEXT; |
37 changes: 37 additions & 0 deletions
37
packages/db/prisma/migrations/20231211210937_boolean_defaults_for_location/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,37 @@ | ||
/* | ||
Warnings: | ||
- Made the column `mailOnly` on table `OrgLocation` required. This step will fail if there are existing NULL values in that column. | ||
- Made the column `mapCityOnly` on table `OrgLocation` required. This step will fail if there are existing NULL values in that column. | ||
- Made the column `notVisitable` on table `OrgLocation` required. This step will fail if there are existing NULL values in that column. | ||
*/ | ||
-- Update values for Location | ||
UPDATE | ||
"OrgLocation" | ||
SET | ||
"mailOnly" = FALSE | ||
WHERE | ||
"mailOnly" IS NULL; | ||
|
||
UPDATE | ||
"OrgLocation" | ||
SET | ||
"mapCityOnly" = FALSE | ||
WHERE | ||
"mapCityOnly" IS NULL; | ||
|
||
UPDATE | ||
"OrgLocation" | ||
SET | ||
"notVisitable" = FALSE | ||
WHERE | ||
"notVisitable" IS NULL; | ||
|
||
-- AlterTable | ||
ALTER TABLE "OrgLocation" | ||
ALTER COLUMN "mailOnly" SET NOT NULL, | ||
ALTER COLUMN "mailOnly" SET DEFAULT FALSE, | ||
ALTER COLUMN "mapCityOnly" SET NOT NULL, | ||
ALTER COLUMN "mapCityOnly" SET DEFAULT FALSE, | ||
ALTER COLUMN "notVisitable" SET NOT NULL, | ||
ALTER COLUMN "notVisitable" SET DEFAULT FALSE; |
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
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