(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