init push
This commit is contained in:
14
migrations/20260416_users_profile_picture_attachment.sql
Normal file
14
migrations/20260416_users_profile_picture_attachment.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- +goose Up
|
||||
ALTER TABLE users
|
||||
ADD COLUMN image_attachment_id BINARY(16) NULL,
|
||||
ADD KEY idx_users_image_attachment_id (image_attachment_id),
|
||||
ADD CONSTRAINT fk_users_image_attachment
|
||||
FOREIGN KEY (image_attachment_id) REFERENCES attachments(id)
|
||||
ON UPDATE CASCADE
|
||||
ON DELETE SET NULL;
|
||||
|
||||
-- +goose Down
|
||||
ALTER TABLE users
|
||||
DROP FOREIGN KEY fk_users_image_attachment,
|
||||
DROP KEY idx_users_image_attachment_id,
|
||||
DROP COLUMN image_attachment_id;
|
||||
Reference in New Issue
Block a user