diff options
| author | Emma Terzioglu <emreterzioglu49@gmail.com> | 2026-03-13 13:49:15 -0700 |
|---|---|---|
| committer | Emma Terzioglu <emreterzioglu49@gmail.com> | 2026-03-13 13:49:15 -0700 |
| commit | 7a33856a527aebbd8d2a624c6d5937c25c9a1d90 (patch) | |
| tree | 855c642394e7ba1de40b8bb8737be12bec0aedaf /migrations/20260220_initial_up_54f544.sql | |
initial commit
new website repo yay!!!
Diffstat (limited to 'migrations/20260220_initial_up_54f544.sql')
| -rw-r--r-- | migrations/20260220_initial_up_54f544.sql | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/migrations/20260220_initial_up_54f544.sql b/migrations/20260220_initial_up_54f544.sql new file mode 100644 index 0000000..2aa3686 --- /dev/null +++ b/migrations/20260220_initial_up_54f544.sql @@ -0,0 +1,22 @@ +CREATE TABLE IF NOT EXISTS posts ( + id UUID PRIMARY KEY DEFAULT uuidv7(), + text TEXT NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); + +CREATE TABLE IF NOT EXISTS videos ( + id UUID PRIMARY KEY DEFAULT uuidv7(), + source TEXT NOT NULL, + title TEXT NOT NULL, + description TEXT, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); + +CREATE TABLE IF NOT EXISTS comments ( + id UUID PRIMARY KEY DEFAULT uuidv7(), + post_id UUID REFERENCES posts, + video_id UUID REFERENCES videos, + author TEXT NOT NULL, + text TEXT NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); |
