realms-wiki/srv/salt/postgres/init.sql
Matthew Scragg d68c6f1d4e devops stuff
2013-12-02 16:23:43 -06:00

26 lines
451 B
SQL

DROP TABLE IF EXISTS users;
CREATE TABLE users (
id SERIAL,
username VARCHAR(100),
password VARCHAR(255),
email VARCHAR(255),
joined TIMESTAMP
);
DROP TABLE IF EXISTS sites;
CREATE TABLE sites (
name VARCHAR(255),
pages INT,
views INT,
created TIMESTAMP
);
DROP TABLE IF EXISTS pages;
CREATE TABLE pages (
id VARCHAR(255), -- <site name>/<path>
edits INT,
views INT,
author INT,
created TIMESTAMP,
modified TIMESTAMP
);