como/como_infrastructure/migrations/20230603152353_items.sql
kjuulh 534b2e4a23
feat: with items
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-06-04 11:02:51 +02:00

18 lines
435 B
SQL

-- Add migration script here
create table if not exists items (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
title varchar not null,
description varchar default null,
state integer not null,
user_id varchar not null,
project_id UUID not null,
created_at timestamp not null,
updated_at timestamp not null,
CONSTRAINT fk_project
FOREIGN KEY(project_id)
REFERENCES projects(id)
ON DELETE CASCADE
)