maotube/migration.sql

16 lines
344 B
MySQL
Raw Permalink Normal View History

2024-02-10 22:30:03 +00:00
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,
2024-02-10 22:30:03 +00:00
FOREIGN KEY(user_id) REFERENCES users(id)
);