forked from Code-4-Community/scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 0
[SSF-71] Frontend: Pantry application form #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
9e74ada
rebase main
amywng d8fc4dc
remove console logs
amywng b7c6466
review comments and changing db schema
amywng f7596a1
prettier
amywng a773aa7
prettier
amywng 21e5d07
pantry app pt. 2
amywng 0f6c288
prettier
amywng de76192
remove duplicate jest-mock-extended
amywng 7379ca5
review comments
amywng 30e382f
prettier
amywng 33120e1
review comments
amywng 24a758c
review comments
amywng a4cb1a5
fix text colors
amywng 1786323
add back migration
amywng e49ef20
review comments
amywng 7b72285
merge main
amywng ef9ec15
fix phone logic
amywng efee6f4
switch multi-checkbox components
amywng 8e85457
prettier
amywng 1a42d84
add comment about phone logic
amywng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
81 changes: 81 additions & 0 deletions
81
apps/backend/src/migrations/1763762628431-UpdatePantryFields.ts
This file contains hidden or 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,81 @@ | ||
| import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
|
||
| export class UpdatePantryFields1763762628431 implements MigrationInterface { | ||
| public async up(queryRunner: QueryRunner): Promise<void> { | ||
| await queryRunner.query(` | ||
| ALTER TABLE pantries | ||
| ADD COLUMN accept_food_deliveries boolean NOT NULL DEFAULT false, | ||
| ADD COLUMN delivery_window_instructions text, | ||
| ADD COLUMN mailing_address_line_1 varchar(255) NOT NULL DEFAULT 'A', | ||
| ADD COLUMN mailing_address_line_2 varchar(255), | ||
| ADD COLUMN mailing_address_city varchar(255) NOT NULL DEFAULT 'A', | ||
| ADD COLUMN mailing_address_state varchar(255) NOT NULL DEFAULT 'A', | ||
| ADD COLUMN mailing_address_zip varchar(255) NOT NULL DEFAULT 'A', | ||
| ADD COLUMN mailing_address_country varchar(255), | ||
| ALTER COLUMN newsletter_subscription DROP NOT NULL, | ||
| ADD COLUMN has_email_contact BOOLEAN NOT NULL DEFAULT false, | ||
| ADD COLUMN email_contact_other TEXT, | ||
| ADD COLUMN secondary_contact_first_name VARCHAR(255), | ||
| ADD COLUMN secondary_contact_last_name VARCHAR(255), | ||
| ADD COLUMN secondary_contact_email VARCHAR(255), | ||
| ADD COLUMN secondary_contact_phone VARCHAR(20); | ||
|
|
||
| ALTER TABLE pantries | ||
| RENAME COLUMN address_line_1 TO shipment_address_line_1; | ||
|
|
||
| ALTER TABLE pantries | ||
| RENAME COLUMN address_line_2 TO shipment_address_line_2; | ||
|
|
||
| ALTER TABLE pantries | ||
| RENAME COLUMN address_city TO shipment_address_city; | ||
|
|
||
| ALTER TABLE pantries | ||
| RENAME COLUMN address_state TO shipment_address_state; | ||
|
|
||
| ALTER TABLE pantries | ||
| RENAME COLUMN address_zip TO shipment_address_zip; | ||
|
|
||
| ALTER TABLE pantries | ||
| RENAME COLUMN address_country TO shipment_address_country; | ||
| `); | ||
| } | ||
|
|
||
| public async down(queryRunner: QueryRunner): Promise<void> { | ||
| await queryRunner.query(` | ||
| ALTER TABLE "pantries" | ||
| DROP COLUMN IF EXISTS delivery_window_instructions, | ||
| DROP COLUMN IF EXISTS accept_food_deliveries, | ||
| DROP COLUMN IF EXISTS mailing_address_line_1, | ||
| DROP COLUMN IF EXISTS mailing_address_line_2, | ||
| DROP COLUMN IF EXISTS mailing_address_city, | ||
| DROP COLUMN IF EXISTS mailing_address_state, | ||
| DROP COLUMN IF EXISTS mailing_address_zip, | ||
| DROP COLUMN IF EXISTS mailing_address_country, | ||
| ALTER COLUMN newsletter_subscription SET NOT NULL, | ||
| DROP COLUMN IF EXISTS has_email_contact, | ||
| DROP COLUMN IF EXISTS email_contact_other, | ||
| DROP COLUMN IF EXISTS secondary_contact_first_name, | ||
| DROP COLUMN IF EXISTS secondary_contact_last_name, | ||
| DROP COLUMN IF EXISTS secondary_contact_email, | ||
| DROP COLUMN IF EXISTS secondary_contact_phone; | ||
|
|
||
| ALTER TABLE pantries | ||
| RENAME COLUMN shipment_address_line_1 TO address_line_1; | ||
|
|
||
| ALTER TABLE pantries | ||
| RENAME COLUMN shipment_address_line_2 TO address_line_2; | ||
|
|
||
| ALTER TABLE pantries | ||
| RENAME COLUMN shipment_address_city TO address_city; | ||
|
|
||
| ALTER TABLE pantries | ||
| RENAME COLUMN shipment_address_state TO address_state; | ||
|
|
||
| ALTER TABLE pantries | ||
| RENAME COLUMN shipment_address_zip TO address_zip; | ||
|
|
||
| ALTER TABLE pantries | ||
| RENAME COLUMN shipment_address_country TO address_country; | ||
| `); | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.