Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a structure.sql file for Stefan's use

  • Loading branch information...
commit e8b575c7d6c65747f622e56972ba0b75b52b8e8c 1 parent 6a2a559
Rich Daley authored
Showing with 27 additions and 0 deletions.
  1. +27 −0 db/structure.sql
27 db/structure.sql
View
@@ -0,0 +1,27 @@
+CREATE TABLE "choices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "topic_id" integer, "option_a_id" integer, "option_b_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL);
+CREATE TABLE "markov_chains" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "current" varchar(255), "next" varchar(255), "probability" float, "topic_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL);
+CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL);
+CREATE TABLE "topics" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "since_id" varchar);
+CREATE TABLE "tweets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" varchar(255), "fake" boolean, "topic_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "sender" varchar(255));
+CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "provider" varchar(255), "uid" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "position" integer);
+CREATE INDEX "index_choices_on_option_a_id" ON "choices" ("option_a_id");
+CREATE INDEX "index_choices_on_option_b_id" ON "choices" ("option_b_id");
+CREATE INDEX "index_choices_on_topic_id" ON "choices" ("topic_id");
+CREATE INDEX "index_markov_chains_on_topic_id" ON "markov_chains" ("topic_id");
+CREATE INDEX "index_tweets_on_topic_id" ON "tweets" ("topic_id");
+CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version");
+INSERT INTO schema_migrations (version) VALUES ('20120728120328');
+
+INSERT INTO schema_migrations (version) VALUES ('20120728142351');
+
+INSERT INTO schema_migrations (version) VALUES ('20120728142729');
+
+INSERT INTO schema_migrations (version) VALUES ('20120728143242');
+
+INSERT INTO schema_migrations (version) VALUES ('20120728144505');
+
+INSERT INTO schema_migrations (version) VALUES ('20120728151703');
+
+INSERT INTO schema_migrations (version) VALUES ('20120728151926');
+
+INSERT INTO schema_migrations (version) VALUES ('20120728152035');
Please sign in to comment.
Something went wrong with that request. Please try again.