beacon/migrations/20250210231615_add_pinned.sql

9 lines
317 B
SQL

-- Add migration script here
CREATE TABLE pinned_fish (
id SERIAL PRIMARY KEY,
account_id VARCHAR(10) NOT NULL,
fish_id INTEGER NOT NULL,
FOREIGN KEY (account_id) REFERENCES accounts (account_id) ON DELETE CASCADE ON UPDATE NO ACTION
);
CREATE INDEX pinned_fish_accounts ON pinned_fish (account_id);