8000 feat: user photo upload and locatable flag [PPT-2038] by stakach · Pull Request #287 · PlaceOS/models · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 4 commits into from
Jun 6, 2025

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;

8000
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.

2 participants
0