spec/dummy/log/test.log in document_number-0.9.4 vs spec/dummy/log/test.log in document_number-0.9.5

- old
+ new

@@ -837,5 +837,791 @@ DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-19 10:02:23.812642"], ["document", "invoice"], ["number", 2]] SQL (0.1ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-19 10:02:23.808669"], ["number", "invoice/1"], ["updated_at", "2014-06-19 10:02:23.808669"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction +  (4.9ms) CREATE TABLE "document_numbers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document" varchar(255), "number" integer DEFAULT 1 NOT NULL, "created_at" datetime)  +  (1.2ms) select sqlite_version(*) +  (6.6ms) CREATE UNIQUE INDEX "index_document_numbers_on_document" ON "document_numbers" ("document") +  (1.1ms) CREATE TABLE "inventories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) +  (0.9ms) CREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)  +  (0.9ms) CREATE TABLE "price_adjustments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document_number" varchar(255), "created_at" datetime, "updated_at" datetime) +  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  +  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093243') +  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610080445') +  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610090526') +  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093227') +  (0.4ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.831725"], ["document", "invoice"], ["number", 2]] + SQL (0.1ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.816393"], ["number", "invoice/1"], ["updated_at", "2014-07-15 20:11:25.816393"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (1.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.845955"], ["document", "inventory"], ["number", 2]] + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.842219"], ["number", "1"], ["updated_at", "2014-07-15 20:11:25.842219"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.849688"], ["number", "500"], ["updated_at", "2014-07-15 20:11:25.849688"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.853375"], ["document", "inventory"], ["number", 2]] + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.852195"], ["number", "1"], ["updated_at", "2014-07-15 20:11:25.852195"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (1.0ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.855214"], ["number", "2"], ["updated_at", "2014-07-15 20:11:25.855214"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.868765"], ["number", "5"], ["updated_at", "2014-07-15 20:11:25.868765"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) UPDATE "inventories" SET "updated_at" = '2014-07-15 20:11:25.870776' WHERE "inventories"."id" = 1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.879910"], ["document", "price_adjustment"], ["number", 501]] + SQL (0.3ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.875744"], ["document_number", "500"], ["updated_at", "2014-07-15 20:11:25.875744"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.886035"], ["document", "price_adjustment"], ["number", 501]] + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.884715"], ["document_number", "500"], ["updated_at", "2014-07-15 20:11:25.884715"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.891014"], ["document", "price_adjustment"], ["number", 501]] + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.889677"], ["document_number", "500"], ["updated_at", "2014-07-15 20:11:25.889677"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 502]] + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-15 20:11:25.893640"], ["document_number", "501"], ["updated_at", "2014-07-15 20:11:25.893640"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (1.3ms) CREATE TABLE "document_numbers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document" varchar(255), "number" integer DEFAULT 1 NOT NULL, "created_at" datetime)  +  (0.5ms) select sqlite_version(*) +  (0.9ms) CREATE UNIQUE INDEX "index_document_numbers_on_document" ON "document_numbers" ("document") +  (0.8ms) CREATE TABLE "inventories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) +  (0.8ms) CREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)  +  (0.9ms) CREATE TABLE "price_adjustments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document_number" varchar(255), "created_at" datetime, "updated_at" datetime) +  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  +  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") +  (0.1ms) SELECT version FROM "schema_migrations" +  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093243') +  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610080445') +  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610090526') +  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093227') +  (0.3ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.019886"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.002761"], ["document_number", "500"], ["updated_at", "2014-07-18 19:39:46.002761"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (1.0ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 502]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.025904"], ["document_number", "501"], ["updated_at", "2014-07-18 19:39:46.025904"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (1.0ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.033691"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.032403"], ["document_number", "500"], ["updated_at", "2014-07-18 19:39:46.032403"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.040113"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.038382"], ["document_number", "500"], ["updated_at", "2014-07-18 19:39:46.038382"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.049829"], ["document", "invoice"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.045690"], ["number", "invoice/1"], ["updated_at", "2014-07-18 19:39:46.045690"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.055224"], ["document", "inventory"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.4ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 4]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.066028"], ["number", "5"], ["updated_at", "2014-07-18 19:39:46.066028"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) UPDATE "inventories" SET "updated_at" = '2014-07-18 19:39:46.067978' WHERE "inventories"."id" = 1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.070992"], ["number", "500"], ["updated_at", "2014-07-18 19:39:46.070992"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.075535"], ["document", "inventory"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.074049"], ["number", "1"], ["updated_at", "2014-07-18 19:39:46.074049"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.077718"], ["number", "2"], ["updated_at", "2014-07-18 19:39:46.077718"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.6ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.084936"], ["document", "inventory"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:39:46.082262"], ["number", "1"], ["updated_at", "2014-07-18 19:39:46.082262"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (1.8ms) CREATE TABLE "document_numbers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document" varchar(255), "number" integer DEFAULT 1 NOT NULL, "created_at" datetime)  +  (0.1ms) select sqlite_version(*) +  (0.8ms) CREATE UNIQUE INDEX "index_document_numbers_on_document" ON "document_numbers" ("document") +  (0.9ms) CREATE TABLE "inventories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) +  (0.8ms) CREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)  +  (0.9ms) CREATE TABLE "price_adjustments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document_number" varchar(255), "created_at" datetime, "updated_at" datetime) +  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  +  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") +  (0.1ms) SELECT version FROM "schema_migrations" +  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093243') +  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610080445') +  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610090526') +  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093227') +  (0.4ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.032262"], ["document", "inventory"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.008009"], ["number", "1"], ["updated_at", "2014-07-18 19:42:34.008009"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.039310"], ["document", "inventory"], ["number", 2]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (1.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 4]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.049004"], ["document", "inventory"], ["number", 2]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.047728"], ["number", "1"], ["updated_at", "2014-07-18 19:42:34.047728"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.050883"], ["number", "2"], ["updated_at", "2014-07-18 19:42:34.050883"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.055956"], ["number", "500"], ["updated_at", "2014-07-18 19:42:34.055956"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.059505"], ["number", "5"], ["updated_at", "2014-07-18 19:42:34.059505"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) UPDATE "inventories" SET "updated_at" = '2014-07-18 19:42:34.060774' WHERE "inventories"."id" = 1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.064049"], ["document", "invoice"], ["number", 2]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 4]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.074983"], ["document", "invoice"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.2ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.070676"], ["number", "invoice/1"], ["updated_at", "2014-07-18 19:42:34.070676"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.083640"], ["document", "price_adjustment"], ["number", 501]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.080073"], ["document_number", "500"], ["updated_at", "2014-07-18 19:42:34.080073"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.087927"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 502]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 503]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.094857"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.093358"], ["document_number", "500"], ["updated_at", "2014-07-18 19:42:34.093358"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.099175"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.098017"], ["document_number", "500"], ["updated_at", "2014-07-18 19:42:34.098017"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 502]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:42:34.101558"], ["document_number", "501"], ["updated_at", "2014-07-18 19:42:34.101558"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (1.9ms) CREATE TABLE "document_numbers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document" varchar(255), "number" integer DEFAULT 1 NOT NULL, "created_at" datetime)  +  (0.1ms) select sqlite_version(*) +  (0.8ms) CREATE UNIQUE INDEX "index_document_numbers_on_document" ON "document_numbers" ("document") +  (0.9ms) CREATE TABLE "inventories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) +  (0.8ms) CREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)  +  (0.9ms) CREATE TABLE "price_adjustments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document_number" varchar(255), "created_at" datetime, "updated_at" datetime) +  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  +  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") +  (0.1ms) SELECT version FROM "schema_migrations" +  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093243') +  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610080445') +  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610090526') +  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093227') +  (0.4ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.499619"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.477169"], ["document_number", "500"], ["updated_at", "2014-07-18 19:44:46.477169"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (1.0ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 502]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.505583"], ["document_number", "501"], ["updated_at", "2014-07-18 19:44:46.505583"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.512055"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 502]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 503]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.519264"], ["document", "price_adjustment"], ["number", 501]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.518127"], ["document_number", "500"], ["updated_at", "2014-07-18 19:44:46.518127"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.523470"], ["document", "price_adjustment"], ["number", 501]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.522302"], ["document_number", "500"], ["updated_at", "2014-07-18 19:44:46.522302"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.527790"], ["document", "invoice"], ["number", 2]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 4]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.537847"], ["document", "invoice"], ["number", 2]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.533997"], ["number", "invoice/1"], ["updated_at", "2014-07-18 19:44:46.533997"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.544672"], ["number", "500"], ["updated_at", "2014-07-18 19:44:46.544672"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.549187"], ["document", "inventory"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.547553"], ["number", "1"], ["updated_at", "2014-07-18 19:44:46.547553"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.551231"], ["number", "2"], ["updated_at", "2014-07-18 19:44:46.551231"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.555759"], ["number", "5"], ["updated_at", "2014-07-18 19:44:46.555759"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) UPDATE "inventories" SET "updated_at" = '2014-07-18 19:44:46.556930' WHERE "inventories"."id" = 1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.561026"], ["document", "inventory"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.4ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 4]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.568001"], ["document", "inventory"], ["number", 2]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.571582"], ["document", "inventory"], ["number", 2]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:44:46.570456"], ["number", "1"], ["updated_at", "2014-07-18 19:44:46.570456"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (2.8ms) CREATE TABLE "document_numbers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document" varchar(255), "number" integer DEFAULT 1 NOT NULL, "created_at" datetime)  +  (0.1ms) select sqlite_version(*) +  (1.1ms) CREATE UNIQUE INDEX "index_document_numbers_on_document" ON "document_numbers" ("document") +  (1.0ms) CREATE TABLE "inventories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) +  (0.9ms) CREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)  +  (0.9ms) CREATE TABLE "price_adjustments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document_number" varchar(255), "created_at" datetime, "updated_at" datetime) +  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  +  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") +  (0.1ms) SELECT version FROM "schema_migrations" +  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093243') +  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610080445') +  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610090526') +  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093227') +  (0.3ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.423829"], ["number", "5"], ["updated_at", "2014-07-18 19:45:34.423829"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.3ms) UPDATE "inventories" SET "updated_at" = '2014-07-18 19:45:34.427631' WHERE "inventories"."id" = 1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (2.9ms) rollback transaction +  (0.2ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.5ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.448045"], ["document", "inventory"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.439803"], ["number", "1"], ["updated_at", "2014-07-18 19:45:34.439803"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.452989"], ["document", "inventory"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.456321"], ["number", "500"], ["updated_at", "2014-07-18 19:45:34.456321"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.460925"], ["document", "inventory"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.4ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 4]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.470313"], ["document", "inventory"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.2ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.468149"], ["number", "1"], ["updated_at", "2014-07-18 19:45:34.468149"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.473525"], ["number", "2"], ["updated_at", "2014-07-18 19:45:34.473525"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.483148"], ["document", "invoice"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.479814"], ["number", "invoice/1"], ["updated_at", "2014-07-18 19:45:34.479814"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.487373"], ["document", "invoice"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 4]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.495363"], ["document", "invoice"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (0.0ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.504589"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.2ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.500535"], ["document_number", "500"], ["updated_at", "2014-07-18 19:45:34.500535"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.4ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 502]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.507315"], ["document_number", "501"], ["updated_at", "2014-07-18 19:45:34.507315"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.513320"], ["document", "price_adjustment"], ["number", 501]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.512110"], ["document_number", "500"], ["updated_at", "2014-07-18 19:45:34.512110"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.518609"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.517375"], ["document_number", "500"], ["updated_at", "2014-07-18 19:45:34.517375"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.523449"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.3ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:34.528601"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 502]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 503]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (105.9ms) CREATE TABLE "document_numbers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document" varchar(255), "number" integer DEFAULT 1 NOT NULL, "created_at" datetime)  +  (0.2ms) select sqlite_version(*) +  (3.0ms) CREATE UNIQUE INDEX "index_document_numbers_on_document" ON "document_numbers" ("document") +  (1.3ms) CREATE TABLE "inventories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) +  (0.9ms) CREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)  +  (1.0ms) CREATE TABLE "price_adjustments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document_number" varchar(255), "created_at" datetime, "updated_at" datetime) +  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  +  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") +  (0.1ms) SELECT version FROM "schema_migrations" +  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093243') +  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610080445') +  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610090526') +  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093227') +  (0.3ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.581513"], ["document", "invoice"], ["number", 2]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (1.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 4]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (2.7ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.601759"], ["document", "invoice"], ["number", 2]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.605645"], ["document", "invoice"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.2ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.604336"], ["number", "invoice/1"], ["updated_at", "2014-07-18 19:45:49.604336"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.615540"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 502]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 503]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.624197"], ["document", "price_adjustment"], ["number", 501]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.2ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.622172"], ["document_number", "500"], ["updated_at", "2014-07-18 19:45:49.622172"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.628892"], ["document", "price_adjustment"], ["number", 501]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.632920"], ["document", "price_adjustment"], ["number", 501]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.631790"], ["document_number", "500"], ["updated_at", "2014-07-18 19:45:49.631790"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 502]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.634735"], ["document_number", "501"], ["updated_at", "2014-07-18 19:45:49.634735"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.639880"], ["document", "price_adjustment"], ["number", 501]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.638690"], ["document_number", "500"], ["updated_at", "2014-07-18 19:45:49.638690"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.648121"], ["document", "inventory"], ["number", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.644296"], ["number", "1"], ["updated_at", "2014-07-18 19:45:49.644296"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.650547"], ["number", "2"], ["updated_at", "2014-07-18 19:45:49.650547"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.655994"], ["document", "inventory"], ["number", 2]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.1ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 4]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.661520"], ["number", "500"], ["updated_at", "2014-07-18 19:45:49.661520"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + DocumentNumber::DocumentNumber Load (0.1ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.664993"], ["document", "inventory"], ["number", 2]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.667548"], ["number", "5"], ["updated_at", "2014-07-18 19:45:49.667548"]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) UPDATE "inventories" SET "updated_at" = '2014-07-18 19:45:49.668814' WHERE "inventories"."id" = 1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_2 + DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1 + SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.672963"], ["document", "inventory"], ["number", 2]] +  (0.0ms) RELEASE SAVEPOINT active_record_2 + SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-07-18 19:45:49.671615"], ["number", "1"], ["updated_at", "2014-07-18 19:45:49.671615"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction