· 8 years ago · May 03, 2018, 08:36 PM
1 ~ Using DataMapper::VERSION=[0.10.2]
2 ~ begin bootstraps #====================#
3 ~ (0.000033) SELECT sqlite_version(*)
4 ~ (0.000049) DROP TABLE IF EXISTS "faq_categories"
5 ~ (0.000014) DROP TABLE IF EXISTS "faqs"
6 ~ (0.000009) PRAGMA table_info("faq_categories")
7 ~ (0.000243) CREATE TABLE "faq_categories" ("id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "parent_id" INTEGER DEFAULT 0, "name" VARCHAR(100), "description" VARCHAR(50) DEFAULT '', "url_slug" VARCHAR(50), "position" INTEGER)
8 ~ (0.000006) PRAGMA table_info("faqs")
9 ~ (0.000097) CREATE TABLE "faqs" ("id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "faq_category_id" INTEGER, "question" VARCHAR(250), "answer" TEXT, "position" INTEGER)
10 ~ (0.000038) INSERT INTO "faq_categories" ("parent_id", "name", "description", "position") VALUES (0, 'A', 'A description', 1)
11 ~ (0.000035) INSERT INTO "faq_categories" ("parent_id", "name", "description", "position") VALUES (0, 'B', 'B description', 1)
12 ~ (0.000030) INSERT INTO "faq_categories" ("parent_id", "name", "description", "position") VALUES (1, 'C', 'C description', 1)
13 ~ (0.000034) INSERT INTO "faq_categories" ("parent_id", "name", "description", "position") VALUES (1, 'D', 'D description', 2)
14 ~ (0.000035) INSERT INTO "faqs" ("faq_category_id", "question", "answer", "position") VALUES (1, 'A1', 'A1 answer', 1)
15 ~ (0.000034) INSERT INTO "faqs" ("faq_category_id", "question", "answer", "position") VALUES (1, 'A2', 'A2 answer', 2)
16 ~ end bootstraps #====================#
17 ~ begin sanity checks #====================#
18 ~ (0.000025) SELECT "id", "faq_category_id", "question", "position" FROM "faqs" ORDER BY "id"
19 ~ end sanity checks #====================#
20 ~ begin destroy #====================#
21 ~ (0.000039) SELECT "id", "parent_id", "name", "description", "url_slug", "position" FROM "faq_categories" WHERE ("position" > 1 AND "parent_id" = 0) ORDER BY "id"
22 ~ (0.000038) UPDATE "faq_categories" SET "position" = "position" + -1 WHERE ("position" > 1 AND "parent_id" = 0)
23 ~ (0.000041) SELECT "id", "faq_category_id", "question", "position" FROM "faqs" WHERE "faq_category_id" = 1 ORDER BY "id"
24 ~ (0.000048) UPDATE "faq_categories" SET "position" = NULL WHERE "id" = 1
25 ~ (0.000024) SELECT "id", "answer" FROM "faqs" WHERE "faq_category_id" = 1 ORDER BY "id"
26 ~ (0.000031) DELETE FROM "faq_categories" WHERE "id" = 1
27 ~ end destroy #====================#
28 ~ begin checks after #====================#
29 ~ (0.000027) SELECT "id", "faq_category_id", "question", "position" FROM "faqs" ORDER BY "id"
30 ~ end checks after #====================#