updated migrations
This commit is contained in:
parent
4a183b6820
commit
a96867d1b9
@ -1,6 +1,8 @@
|
||||
CREATE TYPE role AS ENUM ('student', 'teacher', 'admin');
|
||||
|
||||
CREATE TABLE users (
|
||||
id SERIAL PRIMARY KEY,
|
||||
role role NOT NULL,
|
||||
username varchar(255) UNIQUE NOT NULL,
|
||||
password bytea
|
||||
password bytea NOT NULL
|
||||
);
|
||||
|
||||
|
||||
@ -2,13 +2,14 @@ CREATE TYPE event_type AS ENUM ('sports', 'meetings', 'drama', 'music', 'other')
|
||||
|
||||
CREATE TABLE events (
|
||||
id SERIAL PRIMARY KEY,
|
||||
title VARCHAR(255),
|
||||
time_start TIMESTAMP,
|
||||
time_end TIMESTAMP,
|
||||
event_type event_type,
|
||||
points INTEGER,
|
||||
description TEXT NOT NULL,
|
||||
title VARCHAR(255) NOT NULL,
|
||||
time_start TIMESTAMP NOT NULL,
|
||||
time_end TIMESTAMP NOT NULL,
|
||||
event_type event_type NOT NULL,
|
||||
points INTEGER NOT NULL,
|
||||
place VARCHAR(255),
|
||||
price DECIMAL(10, 2),
|
||||
price DECIMAL(10, 2) NOT NULL,
|
||||
created_by INTEGER REFERENCES users(id)
|
||||
);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user