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