Created
July 1, 2013 18:08
-
-
Save phlco/5903156 to your computer and use it in GitHub Desktop.
got
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
DROP TABLE people; | |
DROP TABLE houses; | |
CREATE TABLE houses | |
( | |
id SERIAL PRIMARY KEY, | |
name VARCHAR(255), | |
sigil VARCHAR(255), | |
motto VARCHAR(255) | |
); | |
CREATE TABLE people | |
( | |
id SERIAL PRIMARY KEY, | |
name VARCHAR(255), | |
weapon VARCHAR(255), | |
age INT, | |
living BOOLEAN DEFAULT TRUE, | |
image TEXT, | |
house_id INT REFERENCES houses(id) | |
); | |
-- add three houses | |
INSERT INTO houses (name, sigil, motto) VALUES ('Stark', 'http://fc07.deviantart.net/fs70/f/2012/141/d/3/game_of_thrones_house_stark_sigil_render_by_titch_ix-d50m12c.png', 'Winter is Coming'); | |
-- add 5 people | |
INSERT INTO people (name, weapon, age, image, house_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment