From c65ebce9e69e19651abfefb6e2eadf0192738568 Mon Sep 17 00:00:00 2001 From: Adam Sommer Date: Mon, 12 May 2014 16:15:04 -0400 Subject: [PATCH 1/2] Created PostgreSQL schema. --- schema/postgres.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 schema/postgres.sql diff --git a/schema/postgres.sql b/schema/postgres.sql new file mode 100644 index 0000000..747afdf --- /dev/null +++ b/schema/postgres.sql @@ -0,0 +1,19 @@ + +CREATE TABLE IF NOT EXISTS "Tasks" ( + id serial primary key, + content varchar(1000) NOT NULL, + timestamp integer, + parent_id integer, + parent char(30), + is_completed boolean, + "updatedAt" TIMESTAMP WITH TIME ZONE, + "createdAt" TIMESTAMP WITH TIME ZONE +); + +INSERT INTO tasks (id, content, timestamp, parent_id) VALUES +(96, 'Welcome to HackFlowy!', 1365610846, 0), +(99, 'An open-source WorkFlowy clone', 1365610837, 0), +(101, 'Built using Backbone + Socket.IO', 1365610824, 0), +(102, 'I pulled this together in a few hours to learn Backbone', 1365610861, 0), +(104, 'Feel free to try it out and hack on it', 1365610859, 0), +(106, 'Good Luck!', 1365610865, 0); From c3db287aeb856ee5d7e4b891d191d960c039f4d2 Mon Sep 17 00:00:00 2001 From: Adam Sommer Date: Mon, 12 May 2014 16:26:45 -0400 Subject: [PATCH 2/2] Fixed default data insert. --- .gitignore | 1 + schema/postgres.sql | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 361d200..11f1994 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .sass-cache config.js lib-cov +*.swp *.seed *.log *.csv diff --git a/schema/postgres.sql b/schema/postgres.sql index 747afdf..5d2823b 100644 --- a/schema/postgres.sql +++ b/schema/postgres.sql @@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS "Tasks" ( "createdAt" TIMESTAMP WITH TIME ZONE ); -INSERT INTO tasks (id, content, timestamp, parent_id) VALUES +INSERT INTO "Tasks" (id, content, timestamp, parent_id) VALUES (96, 'Welcome to HackFlowy!', 1365610846, 0), (99, 'An open-source WorkFlowy clone', 1365610837, 0), (101, 'Built using Backbone + Socket.IO', 1365610824, 0),