· 8 years ago · Jul 10, 2018, 01:02 AM
1~ (0.000124) SET sql_auto_is_null = 0
2 ~ (0.000111) SET SESSION sql_mode = 'ANSI,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION,NO_UNSIGNED_SUBTRACTION,TRADITIONAL'
3 ~ (0.000496) SHOW TABLES LIKE 'people'
4 ~ (0.000298) SHOW TABLES LIKE 'post_types'
5 ~ (0.000283) SHOW TABLES LIKE 'posts'
6 ~ (0.000295) SHOW TABLES LIKE 'follow_up_posts'
7 ~ (0.000285) SHOW TABLES LIKE 'post_tags'
8 ~ (0.000282) SHOW TABLES LIKE 'tags'
9 ~ (0.000281) SHOW TABLES LIKE 'votes'
10 ~ (0.000209) DROP TABLE IF EXISTS "people"
11 ~ (0.000195) DROP TABLE IF EXISTS "post_types"
12 ~ (0.000176) DROP TABLE IF EXISTS "posts"
13 ~ (0.000174) DROP TABLE IF EXISTS "follow_up_posts"
14 ~ (0.000179) DROP TABLE IF EXISTS "post_tags"
15 ~ (0.000157) DROP TABLE IF EXISTS "tags"
16 ~ (0.000170) DROP TABLE IF EXISTS "votes"
17 ~ (0.000316) SHOW TABLES LIKE 'people'
18 ~ (0.000824) SHOW VARIABLES LIKE 'character_set_connection'
19 ~ (0.000759) SHOW VARIABLES LIKE 'collation_connection'
20 ~ (0.098652) CREATE TABLE "people" ("id" INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, "name" VARCHAR(50) NOT NULL, "twitter_login" VARCHAR(50), "email_address" VARCHAR(50), "gravatar" BOOLEAN, "created_at" DATETIME, PRIMARY KEY("id")) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
21 ~ (0.287740) CREATE UNIQUE INDEX "unique_people_name" ON "people" ("name")
22 ~ (0.000434) SHOW TABLES LIKE 'post_types'
23 ~ (0.125394) CREATE TABLE "post_types" ("id" INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, "name" VARCHAR(50) NOT NULL, "description" TEXT, PRIMARY KEY("id")) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
24 ~ (0.114488) CREATE UNIQUE INDEX "unique_post_types_name" ON "post_types" ("name")
25 ~ (0.000379) SHOW TABLES LIKE 'posts'
26 ~ (0.126916) CREATE TABLE "posts" ("id" INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, "person_id" INTEGER NOT NULL, "post_type_id" INTEGER NOT NULL, "vote_sum" INTEGER DEFAULT 0 NOT NULL, "vote_count" INT(10) UNSIGNED DEFAULT 0 NOT NULL, "body" TEXT NOT NULL, "created_at" DATETIME, PRIMARY KEY("id")) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
27 ~ (0.000482) SHOW TABLES LIKE 'follow_up_posts'
28 ~ (0.130937) CREATE TABLE "follow_up_posts" ("source_id" INTEGER NOT NULL, "target_id" INTEGER NOT NULL, PRIMARY KEY("source_id", "target_id")) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
29 ~ (0.000397) SHOW TABLES LIKE 'post_tags'
30 ~ (0.131483) CREATE TABLE "post_tags" ("post_id" INTEGER NOT NULL, "tag_id" INTEGER NOT NULL, PRIMARY KEY("post_id", "tag_id")) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
31 ~ (0.000460) SHOW TABLES LIKE 'tags'
32 ~ (0.131906) CREATE TABLE "tags" ("id" INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, "name" VARCHAR(50) NOT NULL, "created_at" DATETIME, PRIMARY KEY("id")) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
33 ~ (0.136017) CREATE UNIQUE INDEX "unique_tags_name" ON "tags" ("name")
34 ~ (0.000436) SHOW TABLES LIKE 'votes'
35 ~ (0.127848) CREATE TABLE "votes" ("id" INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, "post_id" INTEGER NOT NULL, "person_id" INTEGER NOT NULL, "impact" INTEGER NOT NULL, "created_at" DATETIME, PRIMARY KEY("id")) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
36 ~ (0.136479) CREATE UNIQUE INDEX "unique_votes_post_id" ON "votes" ("post_id")
37 ~ (0.133430) CREATE UNIQUE INDEX "unique_votes_person_id" ON "votes" ("person_id")
38 ~ (0.000615) SELECT COUNT(*) FROM "information_schema"."table_constraints" WHERE "constraint_type" = 'FOREIGN KEY' AND "table_schema" = 'alfred' AND "table_name" = 'posts' AND "constraint_name" = 'posts_person_fk'
39 ~ Can't create table 'alfred.#sql-217_dd' (errno: 150) (code: 1005, sql state: HY000, query: ALTER TABLE "posts" ADD CONSTRAINT "posts_person_fk" FOREIGN KEY ("person_id") REFERENCES "people" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION, uri: mysql://root@localhostalfred)
40DataObjects::SQLError: Can't create table 'alfred.#sql-217_dd' (errno: 150) (code: 1005, sql state: HY000, query: ALTER TABLE "posts" ADD CONSTRAINT "posts_person_fk" FOREIGN KEY ("person_id") REFERENCES "people" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION, uri: mysql://root@localhostalfred)
41 from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.10.0/lib/dm-core/adapters/data_objects_adapter.rb:163:in `execute_non_query'
42 from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.10.0/lib/dm-core/adapters/data_objects_adapter.rb:163:in `execute'
43 from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.10.0/lib/dm-core/adapters/data_objects_adapter.rb:267:in `with_connection'
44 from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.10.0/lib/dm-core/adapters/data_objects_adapter.rb:161:in `execute'
45 from /opt/local/lib/ruby/gems/1.8/gems/dm-constraints-0.10.0/lib/dm-constraints/migrations.rb:86:in `create_relationship_constraint'
46 from /opt/local/lib/ruby/gems/1.8/gems/dm-constraints-0.10.0/lib/dm-constraints/migrations.rb:268:in `send'
47 from /opt/local/lib/ruby/gems/1.8/gems/dm-constraints-0.10.0/lib/dm-constraints/migrations.rb:268:in `execute_each_relationship'
48 from /opt/local/lib/ruby/gems/1.8/gems/dm-constraints-0.10.0/lib/dm-constraints/migrations.rb:267:in `each_value'
49 from /opt/local/lib/ruby/gems/1.8/gems/dm-constraints-0.10.0/lib/dm-constraints/migrations.rb:267:in `execute_each_relationship'
50 from /opt/local/lib/ruby/gems/1.8/gems/dm-constraints-0.10.0/lib/dm-constraints/migrations.rb:258:in `auto_migrate_up_with_constraints!'
51 from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.10.0/lib/dm-core/migrations.rb:51:in `send'
52 from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.10.0/lib/dm-core/migrations.rb:51:in `repository_execute'
53 from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.10.0/lib/dm-core/model/descendant_set.rb:35:in `each'
54 from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.10.0/lib/dm-core/model/descendant_set.rb:35:in `each'
55 from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.10.0/lib/dm-core/migrations.rb:50:in `repository_execute'
56 from /opt/local/lib/ruby/gems/1.8/gems/dm-constraints-0.10.0/lib/dm-constraints/migrations.rb:23:in `auto_migrate_up!'
57 from /opt/local/lib/ruby/gems/1.8/gems/dm-core-0.10.0/lib/dm-core/migrations.rb:24:in `auto_migrate!'
58 from (irb):5irb(main):006:0>