Last active
August 29, 2015 14:02
-
-
Save bradfordw/c7fa988dc420892d57c9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
MySQL | |
create table webmasters ( | |
id int(11) unsigned primary key auto_increment not null, | |
email varchar(255) not null, | |
password varchar(255) not null); | |
create table stats ( | |
id int(11) unsigned primary key auto_increment not null, | |
webmaster_id int(11) unsigned not null, | |
widget_id int(11) unsigned not null, | |
uniq int(11) unsigned null default 0, | |
raw int(11) unsigned null default 0, | |
sales int(11) unsigned null default 0, | |
date date not null); | |
PostgreSQL | |
CREATE TABLE webmasters | |
( | |
id serial NOT NULL, | |
password character varying(255) NOT NULL, | |
email character varying(255) NOT NULL, | |
CONSTRAINT webmasters_pkey PRIMARY KEY (id), | |
CONSTRAINT webmasters_email_key UNIQUE (email) | |
) | |
CREATE TABLE stats | |
( | |
id serial NOT NULL, | |
webmaster_id integer NOT NULL, | |
widget_id integer NOT NULL, | |
uniq integer NOT NULL, | |
"raw" integer NOT NULL, | |
sales integer NOT NULL, | |
date date NOT NULL, | |
CONSTRAINT stats_pkey PRIMARY KEY (id) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment