]>
Commit | Line | Data |
---|---|---|
1659638a MG |
1 | CREATE TABLE items ( |
2 | item SERIAL PRIMARY KEY, | |
3 | title TEXT NOT NULL, | |
4 | category TEXT NOT NULL, | |
5 | description TEXT, | |
6 | ||
7 | begin_hour INT NOT NULL DEFAULT 5, | |
8 | end_hour INT NOT NULL DEFAULT 23, | |
9 | min_hours INT NOT NULL DEFAULT 1, | |
10 | max_hours INT NOT NULL DEFAULT 24 | |
11 | ); | |
12 | ||
13 | CREATE TABLE bookings ( | |
14 | item INT NOT NULL REFERENCES items, | |
15 | name TEXT NOT NULL, | |
16 | begin_time BIGINT NOT NULL, | |
17 | end_time BIGINT NOT NULL | |
18 | ); |