eq2go/sql/guild_colors.sql

12 lines
387 B
SQL
Executable File

DROP TABLE IF EXISTS guild_colors;
CREATE TABLE guild_colors (
id INTEGER PRIMARY KEY,
guild_id INTEGER NOT NULL DEFAULT 0,
color_type TEXT,
red REAL NOT NULL DEFAULT 0,
green REAL NOT NULL DEFAULT 0,
blue REAL NOT NULL DEFAULT 0,
UNIQUE(guild_id, color_type),
FOREIGN KEY (guild_id) REFERENCES guilds(id) ON DELETE CASCADE ON UPDATE CASCADE
);