Half-done collections and UI changes

Minor tweaks and refactors. A half-baked collection support and several UI tweaks.

Just committing these are they are "old" changes and the current state turns out to be pretty stable.
master
Peery 2 years ago
parent 7a0b0dfc88
commit 4d9059b557

@ -3,7 +3,7 @@
CREATE TABLE IF NOT EXISTS Art ( CREATE TABLE IF NOT EXISTS Art (
ID INTEGER PRIMARY KEY generated always as identity, ID INTEGER PRIMARY KEY generated always as identity,
md5_hash CHAR(32) NOT NULL UNIQUE, md5_hash VARCHAR NOT NULL UNIQUE,
path VARCHAR NOT NULL UNIQUE, path VARCHAR NOT NULL UNIQUE,
title VARCHAR, title VARCHAR,
link VARCHAR, link VARCHAR,
@ -17,13 +17,13 @@ CREATE TABLE IF NOT EXISTS Artist (
CREATE TABLE IF NOT EXISTS Topic ( -- as of yet unimplemented, see Art_Topic CREATE TABLE IF NOT EXISTS Topic ( -- as of yet unimplemented, see Art_Topic
ID INTEGER PRIMARY KEY generated always as identity, ID INTEGER PRIMARY KEY generated always as identity,
name CHAR(20) UNIQUE NOT NULL, name VARCHAR UNIQUE NOT NULL,
description VARCHAR description VARCHAR
); );
CREATE TABLE IF NOT EXISTS Presence ( CREATE TABLE IF NOT EXISTS Presence (
name CHAR(30) NOT NULL, name VARCHAR NOT NULL,
domain CHAR(20) NOT NULL, domain VARCHAR NOT NULL,
link VARCHAR, link VARCHAR,
artist_ID INTEGER NOT NULL, artist_ID INTEGER NOT NULL,
PRIMARY KEY (name, domain), PRIMARY KEY (name, domain),
@ -46,8 +46,8 @@ CREATE TABLE IF NOT EXISTS Art_to_Art_Collection (
); );
CREATE TABLE IF NOT EXISTS Art_to_Presence ( CREATE TABLE IF NOT EXISTS Art_to_Presence (
presence_name CHAR(20) NOT NULL, presence_name VARCHAR NOT NULL,
presence_domain CHAR(20) NOT NULL, presence_domain VARCHAR NOT NULL,
art_ID INTEGER NOT NULL, art_ID INTEGER NOT NULL,
PRIMARY KEY (presence_name, presence_domain, art_ID), PRIMARY KEY (presence_name, presence_domain, art_ID),
FOREIGN KEY (presence_name, presence_domain) REFERENCES Presence(name, domain) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (presence_name, presence_domain) REFERENCES Presence(name, domain) ON UPDATE CASCADE ON DELETE CASCADE,
@ -64,12 +64,12 @@ CREATE TABLE IF NOT EXISTS Artist_to_Topic ( -- TODO implement, meant to indica
CREATE TABLE IF NOT EXISTS Tag_Category ( CREATE TABLE IF NOT EXISTS Tag_Category (
category_id INTEGER PRIMARY KEY generated always as identity, category_id INTEGER PRIMARY KEY generated always as identity,
name CHAR(20) NOT NULL name VARCHAR NOT NULL
); );
CREATE TABLE IF NOT EXISTS Tag ( CREATE TABLE IF NOT EXISTS Tag (
tag_ID INTEGER PRIMARY KEY generated always as identity, ID INTEGER PRIMARY KEY generated always as identity,
name CHAR(50) UNIQUE, name VARCHAR UNIQUE,
description VARCHAR, description VARCHAR,
category_id SERIAL, category_id SERIAL,
FOREIGN KEY (category_id) REFERENCES tag_category(category_id) FOREIGN KEY (category_id) REFERENCES tag_category(category_id)

Loading…
Cancel
Save