This repository has been archived by the owner on Jan 7, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9d8ecb
commit baf57dc
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
); |