-
Notifications
You must be signed in to change notification settings - Fork 0
feat: user photo upload and locatable flag [PPT-2038] #287
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
Conversation
tags for uploads allowing us to filter by upload use cases
-- SQL in section 'Up' is executed when this migration is applied | ||
|
||
-- 1. Add `locatable` with default TRUE and NOT NULL in one step | ||
ALTER TABLE "user" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For readability it would be good to combine these statements into one
ALTER TABLE "user"
ADD COLUMN locatable BOOLEAN NOT NULL DEFAULT true,
ADD COLUMN photo_upload_id TEXT REFERENCES uploads(id) ON DELETE SET NULL;
ALTER TABLE "user" | ||
DROP COLUMN photo_upload_id; | ||
|
||
-- 2. Drop `locatable` | ||
ALTER TABLE "user" | ||
DROP COLUMN locatable; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same applies to these
ALTER TABLE "user"
DROP COLUMN locatable,
DROP COLUMN photo_upload_id;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Would be good to improve readability of DDL schema
tags for uploads allowing us to filter by upload use cases