16 lines
344 B
SQL
16 lines
344 B
SQL
CREATE TABLE users (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
username TEXT NOT NULL,
|
|
password TEXT NOT NULL
|
|
);
|
|
|
|
CREATE TABLE videos (
|
|
id TEXT PRIMARY KEY NOT NULL,
|
|
user_id INTEGER,
|
|
title TEXT NOT NULL,
|
|
description TEXT NOT NULL,
|
|
created_at TEXT NOT NULL,
|
|
FOREIGN KEY(user_id) REFERENCES users(id)
|
|
);
|
|
|