initial commit
This commit is contained in:
23
scripts/schema.sql
Normal file
23
scripts/schema.sql
Normal file
@ -0,0 +1,23 @@
|
||||
CREATE TABLE IF NOT EXISTS movie (
|
||||
id TEXT PRIMARY KEY,
|
||||
name TEXT NOT NULL,
|
||||
aka TEXT,
|
||||
nationality TEXT,
|
||||
age INTEGER,
|
||||
shoot_location TEXT,
|
||||
shoot_date TEXT,
|
||||
duration_seconds INTEGER,
|
||||
description TEXT,
|
||||
rating REAL,
|
||||
web_url TEXT,
|
||||
thumbnail TEXT,
|
||||
published TEXT,
|
||||
updated TEXT,
|
||||
|
||||
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
modified_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CHECK (age IS NULL OR age >= 0),
|
||||
CHECK (rating IS NULL OR rating BETWEEN 0 AND 10),
|
||||
CHECK (duration_seconds IS NULL OR duration_seconds >= 0)
|
||||
);
|
||||
Reference in New Issue
Block a user