1
0
Fork 0

feat!(migrations): init migration has unique constraint on column slug

This commit is contained in:
Vojtěch Mareš 2024-06-26 22:38:57 +02:00
parent 278c1ffd32
commit 91adc7f414
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D

View file

@ -5,7 +5,7 @@ CREATE SCHEMA IF NOT EXISTS training;
CREATE TABLE IF NOT EXISTS training.trainings ( CREATE TABLE IF NOT EXISTS training.trainings (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
name varchar(255) NOT NULL, name varchar(255) NOT NULL,
slug varchar(255) NOT NULL, slug varchar(255) UNIQUE NOT NULL,
description text NOT NULL, description text NOT NULL,
days smallint NOT NULL days smallint NOT NULL
); );