Skip to content

Conversation

@stakach
Copy link
Member

@stakach stakach commented Jun 6, 2025

tags for uploads allowing us to filter by upload use cases

tags for uploads allowing us to filter by upload use cases
@stakach stakach requested a review from naqvis June 6, 2025 00:06
@github-actions github-actions bot added the type: enhancement new feature or request label Jun 6, 2025
@stakach stakach changed the title feat: user photo upload and locatable flag feat: user photo upload and locatable flag [PPT-2038] Jun 6, 2025
@github-actions github-actions bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Jun 6, 2025
@github-actions github-actions bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Jun 6, 2025
-- 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"
Copy link
Contributor

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;

Comment on lines 25 to 30
ALTER TABLE "user"
DROP COLUMN photo_upload_id;

-- 2. Drop `locatable`
ALTER TABLE "user"
DROP COLUMN locatable;
Copy link
Contributor

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;

Copy link
Contributor

@naqvis naqvis left a 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

@github-actions github-actions bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Jun 6, 2025
@stakach stakach merged commit 194237b into master Jun 6, 2025
9 checks passed
@stakach stakach deleted the add-photo-locatable-user branch June 6, 2025 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement new feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants