Skip to content

Instantly share code, notes, and snippets.

@slaporte
Created August 22, 2016 04:22
Show Gist options
  • Save slaporte/263835cf5f911a3ff04c2da471b4d9c1 to your computer and use it in GitHub Desktop.
Save slaporte/263835cf5f911a3ff04c2da471b4d9c1 to your computer and use it in GitHub Desktop.
CREATE TABLE campaign(
id INTEGER PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
description __,
url __,
);
CREATE TABLE round(
id INTEGER PRIMARY KEY AUTO_INCREMENT,
campaign_id __,
name VARCHAR(255) NOT NULL,
description __,
status __,
rank_type VARCHAR(64) NOT NULL,
rank_min __
);
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
ca_user VARCHAR(255) NOT NULL
);
CREATE TABLE entry(
id INTEGER PRIMARY KEY AUTO_INCREMENT,
campaign_id INTEGER NOT NULL,
name VARCHAR(1024) NOT NULL,
timestamp __,
url __,
descriptionurl __,
width __,
height __,
licenseshortname __,
author __,
user __,
);
CREATE TABLE vote(
id INTEGER PRIMARY KEY AUTO_INCREMENT,
user_id INTEGER NOT NULL,
round_id,
user_id INTEGER NOT NULL,
vote VARCHAR(1024) NULL,
comment TEXT
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment