Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Commit

Permalink
idk wtf i'm doing
Browse files Browse the repository at this point in the history
  • Loading branch information
kuroji-fusky committed Aug 11, 2024
1 parent a9d8ecb commit baf57dc
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions server/migrations/initial.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
-- Medium type
CREATE TYPE art_type_enum AS ENUM ("digital", "traditional");

-- Bruh
CREATE TABLE
IF NOT EXISTS artworks (
id SERIAL NOT NULL PRIMARY KEY,
slug VARCHAR NOT NULL,
title VARCHAR NOT NULL,
date TIMESTAMP NOT NULL,
description TEXT NOT NULL,
art_type art_type_enum NOT NULL,
);

CREATE TABLE
characters (
id SERIAL PRIMARY KEY,
artwork_id INTEGER NOT NULL,
slug VARCHAR NOT NULL,
name VARCHAR NOT NULL,
avatar_url VARCHAR NOT NULL,
full_name VARCHAR,
species VARCHAR NOT NULL,
is_hybrid BOOLEAN NOT NULL,
FOREIGN KEY (artwork_id) REFERENCES artworks (id)
);

CREATE TABLE
mediums (
id SERIAL PRIMARY KEY,
artwork_id INTEGER NOT NULL,
medium VARCHAR NOT NULL,
FOREIGN KEY (artwork_id) REFERENCES artworks (id)
);

0 comments on commit baf57dc

Please sign in to comment.