9 lines
No EOL
298 B
SQL
9 lines
No EOL
298 B
SQL
CREATE TABLE IF NOT EXISTS projects (
|
|
id INTEGER PRIMARY KEY,
|
|
name VARCHAR(255) NOT NULL UNIQUE,
|
|
description TEXT NOT NULL,
|
|
owner_user_id INTEGER NOT NULL,
|
|
FOREIGN KEY (owner_user_id) REFERENCES users (id)
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS projects_user_id_index ON projects (owner_user_id); |