budgeteer/postgres/schema/0008_categories.sql
2021-12-11 21:55:33 +00:00

9 lines
249 B
SQL

-- +goose Up
CREATE TABLE categories (
id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,
category_group_id uuid NOT NULL REFERENCES category_groups (id) ON DELETE CASCADE,
name varchar(50) NOT NULL
);
-- +goose Down
DROP TABLE categories;