forked from future4code/Shaw-LAMA2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtables.sql
More file actions
26 lines (23 loc) · 752 Bytes
/
tables.sql
File metadata and controls
26 lines (23 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
-- Active: 1657806752877@@35.226.146.116@3306@shaw-21814956-amancio
CREATE TABLE IF NOT EXISTS lama_bands (
id VARCHAR(255) PRIMARY KEY,
name VARCHAR(255) UNIQUE NOT NULL,
music_genre VARCHAR(255) NOT NULL,
responsible VARCHAR(255) UNIQUE NOT NULL
);
CREATE TABLE IF NOT EXISTS lama_shows (
id VARCHAR(255) PRIMARY KEY,
week_day VARCHAR(255) NOT NULL,
start_time INT NOT NULL,
end_time INT NOT NULL,
band_id VARCHAR(255) NOT NULL,
FOREIGN KEY(band_id) REFERENCES lama_bands(id)
);
CREATE TABLE IF NOT EXISTS lama_users (
id VARCHAR(255) PRIMARY KEY,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
role VARCHAR(255) NOT NULL DEFAULT "NORMAL"
);
SELECT * FROM lama_bands;