(1.2ms) CREATE TABLE "document_numbers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document" varchar(255), "number" integer DEFAULT 0 NOT NULL, "created_at" datetime)   (0.5ms) select sqlite_version(*)  (1.0ms) 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.9ms) CREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.8ms) 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.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610090526')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093227')  (0.6ms) begin transaction  (0.1ms) 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.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:10:42.302726"], ["document", "inventory"], ["number", 1]] SQL (0.2ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:10:42.286300"], ["number", "1"], ["updated_at", "2014-06-11 05:10:42.286300"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.9ms) 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-06-11 05:10:42.309687"], ["number", "500"], ["updated_at", "2014-06-11 05:10:42.309687"]]  (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-06-11 05:10:42.314529"], ["number", "5"], ["updated_at", "2014-06-11 05:10:42.314529"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) UPDATE "inventories" SET "updated_at" = '2014-06-11 05:10:42.316185' WHERE "inventories"."id" = 1  (0.1ms) 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" = 'invoice' LIMIT 1 SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:10:42.324535"], ["document", "invoice"], ["number", 1]] SQL (0.2ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:10:42.320777"], ["number", "invoice/1"], ["updated_at", "2014-06-11 05:10:42.320777"]]  (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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:10:42.341682"], ["document", "price_adjustment"], ["number", 501]] SQL (0.2ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:10:42.330892"], ["document_number", "501"], ["updated_at", "2014-06-11 05:10:42.330892"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) 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-06-11 05:10:42.347616"], ["document", "price_adjustment"], ["number", 501]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:10:42.346017"], ["document_number", "501"], ["updated_at", "2014-06-11 05:10:42.346017"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (3.6ms) CREATE TABLE "document_numbers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document" varchar(255), "number" integer DEFAULT 0 NOT NULL, "created_at" datetime)   (0.1ms) select sqlite_version(*)  (1.0ms) 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.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.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.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610080445')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610090526')  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093227')  (0.5ms) 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.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:11:49.911527"], ["document", "price_adjustment"], ["number", 501]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:11:49.898180"], ["document_number", "501"], ["updated_at", "2014-06-11 05:11:49.898180"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (2.0ms) 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.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:11:49.920637"], ["document", "price_adjustment"], ["number", 501]] SQL (0.2ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:11:49.919416"], ["document_number", "501"], ["updated_at", "2014-06-11 05:11:49.919416"]]  (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" = 'invoice' LIMIT 1 SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:11:49.929852"], ["document", "invoice"], ["number", 1]] SQL (0.1ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:11:49.926354"], ["number", "invoice/1"], ["updated_at", "2014-06-11 05:11:49.926354"]]  (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-06-11 05:11:49.938469"], ["number", "5"], ["updated_at", "2014-06-11 05:11:49.938469"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) UPDATE "inventories" SET "updated_at" = '2014-06-11 05:11:49.940143' 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.3ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:11:49.949544"], ["number", "500"], ["updated_at", "2014-06-11 05:11:49.949544"]]  (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.3ms) 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-06-11 05:11:49.953664"], ["document", "inventory"], ["number", 1]] SQL (0.2ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:11:49.952015"], ["number", "1"], ["updated_at", "2014-06-11 05:11:49.952015"]]  (0.1ms) 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" = 'inventory' LIMIT 1 SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:11:49.958651"], ["document", "inventory"], ["number", 1]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:11:49.957575"], ["number", "1"], ["updated_at", "2014-06-11 05:11:49.957575"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (3.2ms) CREATE TABLE "document_numbers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document" varchar(255), "number" integer DEFAULT 0 NOT NULL, "created_at" datetime)   (0.1ms) select sqlite_version(*)  (1.2ms) 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.9ms) CREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.7ms) 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.2ms) 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.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610080445')  (0.8ms) 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-06-11 05:12:05.521034"], ["document", "invoice"], ["number", 1]] SQL (0.1ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:12:05.507464"], ["number", "invoice/1"], ["updated_at", "2014-06-11 05:12:05.507464"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (2.7ms) 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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:12:05.536200"], ["document", "price_adjustment"], ["number", 501]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:12:05.531925"], ["document_number", "501"], ["updated_at", "2014-06-11 05:12:05.531925"]]  (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" = 'price_adjustment' LIMIT 1 SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:12:05.540492"], ["document", "price_adjustment"], ["number", 501]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:12:05.539385"], ["document_number", "501"], ["updated_at", "2014-06-11 05:12:05.539385"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) 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-06-11 05:12:05.547096"], ["number", "500"], ["updated_at", "2014-06-11 05:12:05.547096"]]  (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-06-11 05:12:05.550192"], ["number", "5"], ["updated_at", "2014-06-11 05:12:05.550192"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.2ms) UPDATE "inventories" SET "updated_at" = '2014-06-11 05:12:05.558415' 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.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-06-11 05:12:05.564410"], ["document", "inventory"], ["number", 1]] SQL (0.2ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:12:05.562550"], ["number", "1"], ["updated_at", "2014-06-11 05:12:05.562550"]]  (0.1ms) 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-06-11 05:12:05.569732"], ["document", "inventory"], ["number", 1]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:12:05.568660"], ["number", "1"], ["updated_at", "2014-06-11 05:12:05.568660"]]  (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.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:12:05.571747"], ["number", "2"], ["updated_at", "2014-06-11 05:12:05.571747"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (1.2ms) 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.9ms) 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.2ms) SELECT version FROM "schema_migrations"  (0.9ms) 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" = 'inventory' LIMIT 1 SQL (0.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:14:37.954862"], ["document", "inventory"], ["number", 2]] SQL (0.2ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:14:37.939259"], ["number", "1"], ["updated_at", "2014-06-11 05:14:37.939259"]]  (0.1ms) 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-06-11 05:14:37.961844"], ["number", "500"], ["updated_at", "2014-06-11 05:14:37.961844"]]  (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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:14:37.967307"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:14:37.966046"], ["number", "1"], ["updated_at", "2014-06-11 05:14:37.966046"]]  (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.4ms) 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-06-11 05:14:37.969394"], ["number", ""], ["updated_at", "2014-06-11 05:14:37.969394"]]  (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-06-11 05:14:37.975704"], ["number", "5"], ["updated_at", "2014-06-11 05:14:37.975704"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "inventories" SET "updated_at" = '2014-06-11 05:14:37.976974' WHERE "inventories"."id" = 1  (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" = 'invoice' LIMIT 1 SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:14:37.984696"], ["document", "invoice"], ["number", 2]] SQL (0.2ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:14:37.981068"], ["number", "invoice/1"], ["updated_at", "2014-06-11 05:14:37.981068"]]  (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" = 'price_adjustment' LIMIT 1 SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:14:38.000540"], ["document", "price_adjustment"], ["number", 2]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:14:37.996010"], ["document_number", "500"], ["updated_at", "2014-06-11 05:14:37.996010"]]  (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.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-06-11 05:14:38.004789"], ["document", "price_adjustment"], ["number", 2]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:14:38.003699"], ["document_number", "500"], ["updated_at", "2014-06-11 05:14:38.003699"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (3.6ms) 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.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.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)   (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')  (1.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610080445')  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610090526')  (0.9ms) 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-06-11 05:15:43.864315"], ["document", "invoice"], ["number", 2]] SQL (0.1ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:15:43.851369"], ["number", "invoice/1"], ["updated_at", "2014-06-11 05:15:43.851369"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (2.0ms) 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-06-11 05:15:43.876050"], ["number", "500"], ["updated_at", "2014-06-11 05:15:43.876050"]]  (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" = 'inventory' LIMIT 1 SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:15:43.880434"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:15:43.879220"], ["number", "1"], ["updated_at", "2014-06-11 05:15:43.879220"]]  (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-06-11 05:15:43.883510"], ["number", "5"], ["updated_at", "2014-06-11 05:15:43.883510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "inventories" SET "updated_at" = '2014-06-11 05:15:43.884758' WHERE "inventories"."id" = 1  (0.1ms) 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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:15:43.889469"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:15:43.888057"], ["number", "1"], ["updated_at", "2014-06-11 05:15:43.888057"]]  (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]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:15:43.891502"], ["number", ""], ["updated_at", "2014-06-11 05:15:43.891502"]]  (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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:15:43.908689"], ["document", "price_adjustment"], ["number", 2]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:15:43.904463"], ["document_number", "500"], ["updated_at", "2014-06-11 05:15:43.904463"]]  (0.1ms) 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" = 'price_adjustment' LIMIT 1 SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:15:43.913092"], ["document", "price_adjustment"], ["number", 2]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:15:43.912015"], ["document_number", "500"], ["updated_at", "2014-06-11 05:15:43.912015"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (4.0ms) 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.2ms) 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)  (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.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')  (2.7ms) 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.0ms) 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.9ms) CREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.8ms) 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.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.8ms) 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" = 'price_adjustment' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) 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  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) 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  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) 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  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (2.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(*)  (1.0ms) 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)  (1.0ms) 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.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.4ms) 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.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:21:50.763685"], ["document", "price_adjustment"], ["number", 2]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:21:50.750139"], ["document_number", "500"], ["updated_at", "2014-06-11 05:21:50.750139"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (2.3ms) 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.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:21:50.773691"], ["document", "price_adjustment"], ["number", 2]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:21:50.772376"], ["document_number", "500"], ["updated_at", "2014-06-11 05:21:50.772376"]]  (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" = 'invoice' LIMIT 1 SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:21:50.781928"], ["document", "invoice"], ["number", 2]] SQL (0.1ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:21:50.778395"], ["number", "invoice/1"], ["updated_at", "2014-06-11 05:21:50.778395"]]  (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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:21:50.789816"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:21:50.786157"], ["number", "1"], ["updated_at", "2014-06-11 05:21:50.786157"]]  (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" = '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-06-11 05:21:50.791882"], ["number", "2"], ["updated_at", "2014-06-11 05:21:50.791882"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (3.5ms) 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.2ms) 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)  (1.0ms) CREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.7ms) 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.9ms) 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-06-11 05:22:06.264070"], ["document", "invoice"], ["number", 2]] SQL (0.1ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:22:06.251141"], ["number", "invoice/1"], ["updated_at", "2014-06-11 05:22:06.251141"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (2.2ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:22:06.276393"], ["number", "500"], ["updated_at", "2014-06-11 05:22:06.276393"]]  (0.1ms) 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" = 'inventory' LIMIT 1 SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:22:06.281323"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:22:06.280021"], ["number", "1"], ["updated_at", "2014-06-11 05:22:06.280021"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:22:06.284469"], ["number", "5"], ["updated_at", "2014-06-11 05:22:06.284469"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "inventories" SET "updated_at" = '2014-06-11 05:22:06.285691' 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 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-06-11 05:22:06.290877"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:22:06.289397"], ["number", "1"], ["updated_at", "2014-06-11 05:22:06.289397"]]  (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.4ms) 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-06-11 05:22:06.292651"], ["number", "2"], ["updated_at", "2014-06-11 05:22:06.292651"]]  (0.1ms) 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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:22:06.309528"], ["document", "price_adjustment"], ["number", 2]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:22:06.298850"], ["document_number", "500"], ["updated_at", "2014-06-11 05:22:06.298850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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-06-11 05:22:06.314238"], ["document", "price_adjustment"], ["number", 2]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:22:06.312973"], ["document_number", "500"], ["updated_at", "2014-06-11 05:22:06.312973"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (2.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.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.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)   (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.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610090526')  (0.8ms) 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" = 'price_adjustment' LIMIT 1 SQL (0.5ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.441127"], ["document", "price_adjustment"], ["number", 2]] SQL (0.2ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.423886"], ["document_number", "500"], ["updated_at", "2014-06-11 05:42:40.423886"]]  (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" = 'price_adjustment' LIMIT 1 SQL (1.0ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.447431"], ["document_number", "2"], ["updated_at", "2014-06-11 05:42:40.447431"]]  (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.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.454303"], ["document", "price_adjustment"], ["number", 2]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.453135"], ["document_number", "500"], ["updated_at", "2014-06-11 05:42:40.453135"]]  (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-06-11 05:42:40.459221"], ["document", "price_adjustment"], ["number", 2]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.458065"], ["document_number", "500"], ["updated_at", "2014-06-11 05:42:40.458065"]]  (0.0ms) 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-06-11 05:42:40.465383"], ["number", "5"], ["updated_at", "2014-06-11 05:42:40.465383"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "inventories" SET "updated_at" = '2014-06-11 05:42:40.466829' WHERE "inventories"."id" = 1  (0.1ms) 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-06-11 05:42:40.470749"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.469694"], ["number", "1"], ["updated_at", "2014-06-11 05:42:40.469694"]]  (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]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.472457"], ["number", "2"], ["updated_at", "2014-06-11 05:42:40.472457"]]  (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-06-11 05:42:40.477324"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.476261"], ["number", "1"], ["updated_at", "2014-06-11 05:42:40.476261"]]  (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-06-11 05:42:40.480717"], ["number", "500"], ["updated_at", "2014-06-11 05:42:40.480717"]]  (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" = 'invoice' LIMIT 1 SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.487541"], ["document", "invoice"], ["number", 2]] SQL (0.2ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:42:40.484362"], ["number", "invoice/1"], ["updated_at", "2014-06-11 05:42:40.484362"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (3.7ms) 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.0ms) 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)  (1.0ms) 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.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.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.7ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:06.981532"], ["document", "price_adjustment"], ["number", 501]] SQL (0.2ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:06.968593"], ["document_number", "500"], ["updated_at", "2014-06-11 05:43:06.968593"]]  (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" = 'price_adjustment' LIMIT 1 SQL (0.9ms) 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-06-11 05:43:06.991165"], ["document_number", "501"], ["updated_at", "2014-06-11 05:43:06.991165"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (2.7ms) 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.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.001192"], ["document", "price_adjustment"], ["number", 501]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.000014"], ["document_number", "500"], ["updated_at", "2014-06-11 05:43:07.000014"]]  (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-06-11 05:43:07.005250"], ["document", "price_adjustment"], ["number", 501]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.004198"], ["document_number", "500"], ["updated_at", "2014-06-11 05:43:07.004198"]]  (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" = 'invoice' LIMIT 1 SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.013368"], ["document", "invoice"], ["number", 2]] SQL (0.1ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.009325"], ["number", "invoice/1"], ["updated_at", "2014-06-11 05:43:07.009325"]]  (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-06-11 05:43:07.020049"], ["number", "5"], ["updated_at", "2014-06-11 05:43:07.020049"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "inventories" SET "updated_at" = '2014-06-11 05:43:07.021554' WHERE "inventories"."id" = 1  (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-06-11 05:43:07.023987"], ["number", "500"], ["updated_at", "2014-06-11 05:43:07.023987"]]  (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.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.027768"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.026530"], ["number", "1"], ["updated_at", "2014-06-11 05:43:07.026530"]]  (0.1ms) 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" = 'inventory' LIMIT 1 SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.032071"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 05:43:07.030731"], ["number", "1"], ["updated_at", "2014-06-11 05:43:07.030731"]]  (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.3ms) 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-06-11 05:43:07.033904"], ["number", "2"], ["updated_at", "2014-06-11 05:43:07.033904"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (1.4ms) 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(*)  (2.3ms) 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)  (1.0ms) CREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)   (1.3ms) CREATE TABLE "price_adjustments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document_number" varchar(255), "created_at" datetime, "updated_at" datetime)  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.2ms) SELECT version FROM "schema_migrations"  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093243')  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610080445')  (4.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610090526')  (2.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093227')  (0.4ms) 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.5ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.320226"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.297186"], ["number", "1"], ["updated_at", "2014-06-11 13:29:12.297186"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.1ms) 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-06-11 13:29:12.327147"], ["number", "5"], ["updated_at", "2014-06-11 13:29:12.327147"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.1ms) UPDATE "inventories" SET "updated_at" = '2014-06-11 13:29:12.328408' WHERE "inventories"."id" = 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.333827"], ["number", "500"], ["updated_at", "2014-06-11 13:29:12.333827"]]  (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" = 'inventory' LIMIT 1 SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.338612"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.337366"], ["number", "1"], ["updated_at", "2014-06-11 13:29:12.337366"]]  (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]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.340364"], ["number", "2"], ["updated_at", "2014-06-11 13:29:12.340364"]]  (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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.352991"], ["document", "price_adjustment"], ["number", 501]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.347165"], ["document_number", "500"], ["updated_at", "2014-06-11 13:29:12.347165"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) 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.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.359277"], ["document", "price_adjustment"], ["number", 501]] SQL (0.2ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.357100"], ["document_number", "500"], ["updated_at", "2014-06-11 13:29:12.357100"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (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.6ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 502]] SQL (0.2ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.363507"], ["document_number", "501"], ["updated_at", "2014-06-11 13:29:12.363507"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) 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.5ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.372668"], ["document", "price_adjustment"], ["number", 501]] SQL (0.2ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.370718"], ["document_number", "500"], ["updated_at", "2014-06-11 13:29:12.370718"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.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.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.387591"], ["document", "invoice"], ["number", 2]] SQL (0.2ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-11 13:29:12.383907"], ["number", "invoice/1"], ["updated_at", "2014-06-11 13:29:12.383907"]]  (0.1ms) 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.5ms) select sqlite_version(*)  (1.3ms) 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.8ms) CREATE TABLE "price_adjustments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document_number" varchar(255), "created_at" datetime, "updated_at" datetime)  (1.2ms) 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.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093243')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610080445')  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610090526')  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093227')  (0.6ms) begin transaction  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-19 09:45:52.532033"], ["number", "500"], ["updated_at", "2014-06-19 09:45:52.532033"]]  (1.4ms) RELEASE SAVEPOINT active_record_1  (1.3ms) rollback transaction  (0.2ms) begin transaction  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) 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-06-19 09:45:52.574653"], ["number", "5"], ["updated_at", "2014-06-19 09:45:52.574653"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (3.3ms) UPDATE "inventories" SET "updated_at" = '2014-06-19 09:45:52.577050' WHERE "inventories"."id" = 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers"  (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.1ms) select sqlite_version(*)  (0.9ms) 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.9ms) CREATE TABLE "invoices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.8ms) 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 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-06-19 10:02:23.756785"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-19 10:02:23.741461"], ["number", "1"], ["updated_at", "2014-06-19 10:02:23.741461"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-19 10:02:23.763356"], ["number", "5"], ["updated_at", "2014-06-19 10:02:23.763356"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.7ms) UPDATE "inventories" SET "updated_at" = '2014-06-19 10:02:23.764612' WHERE "inventories"."id" = 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.2ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-19 10:02:23.773049"], ["number", "500"], ["updated_at", "2014-06-19 10:02:23.773049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.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.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-19 10:02:23.777767"], ["document", "inventory"], ["number", 2]] SQL (0.1ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-19 10:02:23.776580"], ["number", "1"], ["updated_at", "2014-06-19 10:02:23.776580"]]  (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.3ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 3]] SQL (0.2ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-19 10:02:23.779496"], ["number", "2"], ["updated_at", "2014-06-19 10:02:23.779496"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) 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-06-19 10:02:23.790823"], ["document", "price_adjustment"], ["number", 501]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-19 10:02:23.787125"], ["document_number", "500"], ["updated_at", "2014-06-19 10:02:23.787125"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) 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.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-19 10:02:23.796875"], ["document", "price_adjustment"], ["number", 501]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-19 10:02:23.794896"], ["document_number", "500"], ["updated_at", "2014-06-19 10:02:23.794896"]]  (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.4ms) 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-06-19 10:02:23.799333"], ["document_number", "501"], ["updated_at", "2014-06-19 10:02:23.799333"]]  (0.1ms) 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" = 'price_adjustment' LIMIT 1 SQL (0.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2014-06-19 10:02:23.804615"], ["document", "price_adjustment"], ["number", 501]] SQL (0.1ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-06-19 10:02:23.803554"], ["document_number", "500"], ["updated_at", "2014-06-19 10:02:23.803554"]]  (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" = '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  (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.7ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 13:21:07.682368"], ["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 (1.0ms) 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" = 'invoice' LIMIT 1 SQL (0.0ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 4]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) 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", "2015-07-06 13:21:07.695937"], ["document", "invoice"], ["number", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) 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.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 13:21:07.699772"], ["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", "2015-07-06 13:21:07.698763"], ["number", "invoice/1"], ["updated_at", "2015-07-06 13:21:07.698763"]]  (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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 13:21:07.706180"], ["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", "2015-07-06 13:21:07.703308"], ["document_number", "500"], ["updated_at", "2015-07-06 13:21:07.703308"]]  (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" = 'price_adjustment' LIMIT 1 SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 13:21:07.710018"], ["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", "2015-07-06 13:21:07.709096"], ["document_number", "500"], ["updated_at", "2015-07-06 13:21:07.709096"]]  (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.2ms) 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", "2015-07-06 13:21:07.711468"], ["document_number", "501"], ["updated_at", "2015-07-06 13:21:07.711468"]]  (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" = 'price_adjustment' LIMIT 1 SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 13:21:07.715129"], ["document", "price_adjustment"], ["number", 501]]  (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.2ms) 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.0ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 503]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.0ms) 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", "2015-07-06 13:21:07.721198"], ["document", "price_adjustment"], ["number", 501]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) 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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 13:21:07.724190"], ["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", "2015-07-06 13:21:07.723242"], ["document_number", "500"], ["updated_at", "2015-07-06 13:21:07.723242"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 'inventory' LIMIT 1 SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 13:21:07.730544"], ["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", "2015-07-06 13:21:07.727928"], ["number", "1"], ["updated_at", "2015-07-06 13:21:07.727928"]]  (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.2ms) 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", "2015-07-06 13:21:07.732235"], ["number", "2"], ["updated_at", "2015-07-06 13:21:07.732235"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-07-06 13:21:07.735537"], ["number", "500"], ["updated_at", "2015-07-06 13:21:07.735537"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-07-06 13:21:07.737932"], ["number", "5"], ["updated_at", "2015-07-06 13:21:07.737932"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "inventories" SET "updated_at" = '2015-07-06 13:21:07.739560' WHERE "inventories"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) 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.2ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 13:21:07.742789"], ["document", "inventory"], ["number", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) 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", "2015-07-06 13:21:07.745852"], ["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.2ms) 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.0ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 4]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) 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", "2015-07-06 13:21:07.750944"], ["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", "2015-07-06 13:21:07.750048"], ["number", "1"], ["updated_at", "2015-07-06 13:21:07.750048"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_2 DocumentNumber::DocumentNumber Load (0.4ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1 SQL (0.9ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 15:20:04.457603"], ["document", "price_adjustment"], ["number", 501]]  (0.1ms) RELEASE SAVEPOINT active_record_2 SQL (0.5ms) INSERT INTO "price_adjustments" ("created_at", "document_number", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-07-06 15:20:04.444371"], ["document_number", "500"], ["updated_at", "2015-07-06 15:20:04.444371"]]  (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.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", "2015-07-06 15:20:04.466831"], ["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", "2015-07-06 15:20:04.465565"], ["document_number", "500"], ["updated_at", "2015-07-06 15:20:04.465565"]]  (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 (1.2ms) 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", "2015-07-06 15:20:04.468714"], ["document_number", "501"], ["updated_at", "2015-07-06 15:20:04.468714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) 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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 15:20:04.474890"], ["document", "price_adjustment"], ["number", 501]]  (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.2ms) 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.0ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 503]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) 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", "2015-07-06 15:20:04.480110"], ["document", "price_adjustment"], ["number", 501]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) 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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 15:20:04.484466"], ["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", "2015-07-06 15:20:04.483442"], ["document_number", "500"], ["updated_at", "2015-07-06 15:20:04.483442"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) 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", "2015-07-06 15:20:04.490078"], ["document", "invoice"], ["number", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) 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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 15:20:04.493822"], ["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.2ms) 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.0ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 4]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) 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" = 'invoice' LIMIT 1 SQL (0.4ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 15:20:04.500002"], ["document", "invoice"], ["number", 2]]  (0.1ms) RELEASE SAVEPOINT active_record_2 SQL (0.5ms) INSERT INTO "invoices" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-07-06 15:20:04.498455"], ["number", "invoice/1"], ["updated_at", "2015-07-06 15:20:04.498455"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "inventories" ("created_at", "number", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-07-06 15:20:04.507219"], ["number", "500"], ["updated_at", "2015-07-06 15:20:04.507219"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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", "2015-07-06 15:20:04.510145"], ["number", "5"], ["updated_at", "2015-07-06 15:20:04.510145"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "inventories" SET "updated_at" = '2015-07-06 15:20:04.511136' WHERE "inventories"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) 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.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 15:20:04.514120"], ["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", "2015-07-06 15:20:04.513150"], ["number", "1"], ["updated_at", "2015-07-06 15:20:04.513150"]]  (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.5ms) 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", "2015-07-06 15:20:04.515919"], ["number", "2"], ["updated_at", "2015-07-06 15:20:04.515919"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) 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", "2015-07-06 15:20:04.521427"], ["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.2ms) 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.0ms) UPDATE "document_numbers" SET "number" = ? WHERE "document_numbers"."id" = 1 [["number", 4]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) 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", "2015-07-06 15:20:04.527663"], ["document", "inventory"], ["number", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) 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" = 'inventory' LIMIT 1 SQL (0.3ms) INSERT INTO "document_numbers" ("created_at", "document", "number") VALUES (?, ?, ?) [["created_at", "2015-07-06 15:20:04.531303"], ["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", "2015-07-06 15:20:04.529753"], ["number", "1"], ["updated_at", "2015-07-06 15:20:04.529753"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 DocumentNumber::DocumentNumber Load (0.2ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 SQLite3::SQLException: no such table: document_numbers: SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) 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 SQLite3::SQLException: no such table: document_numbers: SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.1ms) 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 SQLite3::SQLException: no such table: document_numbers: SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 DocumentNumber::DocumentNumber Load (0.3ms) SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1 SQLite3::SQLException: no such table: document_numbers: SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'invoice' LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) 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 SQLite3::SQLException: no such table: document_numbers: SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'price_adjustment' LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) 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 SQLite3::SQLException: no such table: document_numbers: SELECT "document_numbers".* FROM "document_numbers" WHERE "document_numbers"."document" = 'inventory' LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (1.2ms) 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.9ms) 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.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.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.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093243')  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610080445')  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610090526')  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140610093227')