each_batched 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +88 -0
  3. data/Rakefile +55 -0
  4. data/lib/each_batched/version.rb +3 -0
  5. data/lib/each_batched.rb +65 -0
  6. data/lib/tasks/each_batched_tasks.rake +4 -0
  7. data/test/dummy/Rakefile +7 -0
  8. data/test/dummy/app/controllers/application_controller.rb +3 -0
  9. data/test/dummy/app/helpers/application_helper.rb +2 -0
  10. data/test/dummy/app/models/company.rb +7 -0
  11. data/test/dummy/app/models/customer.rb +6 -0
  12. data/test/dummy/app/models/product.rb +5 -0
  13. data/test/dummy/app/models/purchase.rb +5 -0
  14. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  15. data/test/dummy/config/application.rb +45 -0
  16. data/test/dummy/config/boot.rb +10 -0
  17. data/test/dummy/config/database.yml +25 -0
  18. data/test/dummy/config/environment.rb +5 -0
  19. data/test/dummy/config/environments/development.rb +30 -0
  20. data/test/dummy/config/environments/production.rb +60 -0
  21. data/test/dummy/config/environments/test.rb +42 -0
  22. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  23. data/test/dummy/config/initializers/inflections.rb +10 -0
  24. data/test/dummy/config/initializers/mime_types.rb +5 -0
  25. data/test/dummy/config/initializers/secret_token.rb +7 -0
  26. data/test/dummy/config/initializers/session_store.rb +8 -0
  27. data/test/dummy/config/locales/en.yml +5 -0
  28. data/test/dummy/config/routes.rb +2 -0
  29. data/test/dummy/config.ru +4 -0
  30. data/test/dummy/db/development.sqlite3 +0 -0
  31. data/test/dummy/db/migrate/0001_initialize_models.rb +36 -0
  32. data/test/dummy/db/schema.rb +48 -0
  33. data/test/dummy/db/test.sqlite3 +0 -0
  34. data/test/dummy/log/development.log +408 -0
  35. data/test/dummy/log/test.log +44659 -0
  36. data/test/dummy/public/404.html +26 -0
  37. data/test/dummy/public/422.html +26 -0
  38. data/test/dummy/public/500.html +26 -0
  39. data/test/dummy/public/favicon.ico +0 -0
  40. data/test/dummy/script/rails +6 -0
  41. data/test/each_batched_test.rb +235 -0
  42. data/test/test_helper.rb +24 -0
  43. metadata +176 -0
@@ -0,0 +1,48 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 1) do
15
+
16
+ create_table "companies", :force => true do |t|
17
+ t.integer "sort", :default => 0, :null => false
18
+ end
19
+
20
+ add_index "companies", ["sort"], :name => "index_companies_on_sort"
21
+
22
+ create_table "customers", :force => true do |t|
23
+ t.integer "sort", :default => 0, :null => false
24
+ t.integer "company_id", :null => false
25
+ end
26
+
27
+ add_index "customers", ["company_id"], :name => "index_customers_on_company_id"
28
+ add_index "customers", ["sort"], :name => "index_customers_on_sort"
29
+
30
+ create_table "products", :force => true do |t|
31
+ t.integer "sort", :default => 0, :null => false
32
+ t.integer "company_id", :null => false
33
+ end
34
+
35
+ add_index "products", ["company_id"], :name => "index_products_on_company_id"
36
+ add_index "products", ["sort"], :name => "index_products_on_sort"
37
+
38
+ create_table "purchases", :force => true do |t|
39
+ t.date "ordered_on", :default => '2011-01-01', :null => false
40
+ t.integer "product_id", :null => false
41
+ t.integer "customer_id", :null => false
42
+ end
43
+
44
+ add_index "purchases", ["customer_id"], :name => "index_purchases_on_customer_id"
45
+ add_index "purchases", ["ordered_on"], :name => "index_purchases_on_ordered_on"
46
+ add_index "purchases", ["product_id"], :name => "index_purchases_on_product_id"
47
+
48
+ end
Binary file
@@ -0,0 +1,408 @@
1
+  (1.5ms) select sqlite_version(*)
2
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
3
+  (0.0ms) PRAGMA index_list("schema_migrations")
4
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
6
+ Migrating to InitializeModels (1)
7
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
8
+ Migrating to InitializeModels (1)
9
+  (0.0ms) select sqlite_version(*)
10
+  (0.6ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL) 
11
+  (0.2ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL, "company_id" integer)
12
+  (0.2ms) CREATE TABLE "pruducts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL, "company_id" integer) 
13
+  (0.2ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "product_id" integer, "customer_id" integer)
14
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')
15
+  (0.4ms) select sqlite_version(*)
16
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
17
+  (0.0ms) PRAGMA index_list("companies")
18
+  (0.0ms) PRAGMA index_list("customers")
19
+  (0.0ms) PRAGMA index_list("pruducts")
20
+  (0.0ms) PRAGMA index_list("purchases")
21
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
22
+  (0.3ms) select sqlite_version(*)
23
+  (1.4ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL) 
24
+  (1.1ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL, "company_id" integer)
25
+  (1.2ms) CREATE TABLE "pruducts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL, "company_id" integer) 
26
+  (1.1ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "product_id" integer, "customer_id" integer)
27
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
28
+  (0.0ms) PRAGMA index_list("schema_migrations")
29
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
30
+  (0.1ms) SELECT version FROM "schema_migrations"
31
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
32
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
33
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
34
+ Migrating to InitializeModels (1)
35
+  (0.0ms) select sqlite_version(*)
36
+  (0.6ms) DROP TABLE "purchases"
37
+  (0.2ms) DROP TABLE "products"
38
+ SQLite3::SQLException: no such table: products: DROP TABLE "products"
39
+  (0.1ms) select sqlite_version(*)
40
+  (2.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
41
+  (0.0ms) PRAGMA index_list("schema_migrations")
42
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
43
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
44
+ Migrating to InitializeModels (1)
45
+  (0.6ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL)
46
+  (0.1ms) select sqlite_version(*)
47
+  (1.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
48
+  (0.0ms) PRAGMA index_list("schema_migrations")
49
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
50
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
51
+ Migrating to InitializeModels (1)
52
+  (0.5ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL)
53
+  (0.1ms) select sqlite_version(*)
54
+  (2.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
55
+  (0.1ms) PRAGMA index_list("schema_migrations")
56
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
57
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
58
+ Migrating to InitializeModels (1)
59
+  (0.5ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL)
60
+  (0.2ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL, "company_id" integer) 
61
+  (0.2ms) CREATE TABLE "pruducts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL, "company_id" integer)
62
+  (0.2ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "product_id" integer, "customer_id" integer) 
63
+  (0.1ms) select sqlite_version(*)
64
+  (2.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
65
+  (0.0ms) PRAGMA index_list("schema_migrations")
66
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
67
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
68
+ Migrating to InitializeModels (1)
69
+  (0.5ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL)
70
+  (0.2ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL, "company_id" integer) 
71
+  (0.2ms) CREATE TABLE "pruducts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL, "company_id" integer)
72
+  (0.2ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "product_id" integer, "customer_id" integer) 
73
+  (0.0ms) PRAGMA index_list("customers")
74
+  (0.1ms) CREATE INDEX "index_customers_on_company_id" ON "customers" ("company_id")
75
+  (0.0ms) PRAGMA index_list("products")
76
+  (0.2ms) CREATE INDEX "index_products_on_company_id" ON "products" ("company_id")
77
+ SQLite3::SQLException: no such table: main.products: CREATE INDEX "index_products_on_company_id" ON "products" ("company_id")
78
+  (0.1ms) select sqlite_version(*)
79
+  (2.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
80
+  (0.0ms) PRAGMA index_list("schema_migrations")
81
+  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
82
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
83
+ Migrating to InitializeModels (1)
84
+  (0.5ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL)
85
+  (0.2ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL, "company_id" integer) 
86
+  (0.2ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL, "company_id" integer)
87
+  (0.2ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "product_id" integer, "customer_id" integer) 
88
+  (0.0ms) PRAGMA index_list("customers")
89
+  (0.1ms) CREATE INDEX "index_customers_on_company_id" ON "customers" ("company_id")
90
+  (0.0ms) PRAGMA index_list("products")
91
+  (0.1ms) CREATE INDEX "index_products_on_company_id" ON "products" ("company_id")
92
+  (0.0ms) PRAGMA index_list("purchases")
93
+  (0.1ms) CREATE INDEX "index_purchases_on_product_id" ON "purchases" ("product_id")
94
+  (0.0ms) PRAGMA index_list("purchases")
95
+  (0.0ms) PRAGMA index_info('index_purchases_on_product_id')
96
+  (0.1ms) CREATE INDEX "index_purchases_on_customer_id" ON "purchases" ("customer_id")
97
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')
98
+  (0.5ms) select sqlite_version(*)
99
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
100
+  (0.0ms) PRAGMA index_list("companies")
101
+  (0.1ms) PRAGMA index_list("customers")
102
+  (0.0ms) PRAGMA index_info('index_customers_on_company_id')
103
+  (0.0ms) PRAGMA index_list("products")
104
+  (0.0ms) PRAGMA index_info('index_products_on_company_id')
105
+  (0.0ms) PRAGMA index_list("purchases")
106
+  (0.0ms) PRAGMA index_info('index_purchases_on_customer_id')
107
+  (0.0ms) PRAGMA index_info('index_purchases_on_product_id')
108
+  (0.1ms) select sqlite_version(*)
109
+  (1.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
110
+  (0.1ms) PRAGMA index_list("schema_migrations")
111
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
112
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
113
+ Migrating to InitializeModels (1)
114
+  (0.7ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL)
115
+  (0.1ms) select sqlite_version(*)
116
+  (2.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
117
+  (0.1ms) PRAGMA index_list("schema_migrations")
118
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
119
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
120
+ Migrating to InitializeModels (1)
121
+  (0.5ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL)
122
+  (0.2ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL, "company_id" integer) 
123
+  (0.2ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(100) DEFAULT '' NOT NULL, "company_id" integer)
124
+  (0.2ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "product_id" integer, "customer_id" integer) 
125
+  (0.0ms) PRAGMA index_list("customers")
126
+  (0.1ms) CREATE INDEX "index_customers_on_company_id" ON "customers" ("company_id")
127
+  (0.0ms) PRAGMA index_list("products")
128
+  (0.1ms) CREATE INDEX "index_products_on_company_id" ON "products" ("company_id")
129
+  (0.0ms) PRAGMA index_list("purchases")
130
+  (0.1ms) CREATE INDEX "index_purchases_on_product_id" ON "purchases" ("product_id")
131
+  (0.0ms) PRAGMA index_list("purchases")
132
+  (0.0ms) PRAGMA index_info('index_purchases_on_product_id')
133
+  (0.1ms) CREATE INDEX "index_purchases_on_customer_id" ON "purchases" ("customer_id")
134
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')
135
+  (0.4ms) select sqlite_version(*)
136
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
137
+  (0.0ms) PRAGMA index_list("companies")
138
+  (0.0ms) PRAGMA index_list("customers")
139
+  (0.0ms) PRAGMA index_info('index_customers_on_company_id')
140
+  (0.0ms) PRAGMA index_list("products")
141
+  (0.0ms) PRAGMA index_info('index_products_on_company_id')
142
+  (0.0ms) PRAGMA index_list("purchases")
143
+  (0.0ms) PRAGMA index_info('index_purchases_on_customer_id')
144
+  (0.0ms) PRAGMA index_info('index_purchases_on_product_id')
145
+  (0.1ms) select sqlite_version(*)
146
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
147
+  (0.0ms) PRAGMA index_list("schema_migrations")
148
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
149
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
150
+ Migrating to InitializeModels (1)
151
+  (0.5ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL)
152
+  (0.2ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "company_id" integer NOT NULL) 
153
+  (0.2ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "company_id" integer NOT NULL)
154
+  (0.2ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "ordered_on" date NOT NULL, "product_id" integer NOT NULL, "customer_id" integer NOT NULL) 
155
+  (0.0ms) PRAGMA index_list("companies")
156
+  (0.1ms) CREATE INDEX "index_companies_on_name" ON "companies" ("name")
157
+  (0.0ms) PRAGMA index_list("customers")
158
+  (0.1ms) CREATE INDEX "index_customers_on_name" ON "customers" ("name")
159
+  (0.0ms) PRAGMA index_list("customers")
160
+  (0.0ms) PRAGMA index_info('index_customers_on_name')
161
+  (0.1ms) CREATE INDEX "index_customers_on_company_id" ON "customers" ("company_id")
162
+  (0.0ms) PRAGMA index_list("products")
163
+  (0.1ms) CREATE INDEX "index_products_on_name" ON "products" ("name")
164
+  (0.0ms) PRAGMA index_list("products")
165
+  (0.0ms) PRAGMA index_info('index_products_on_name')
166
+  (0.1ms) CREATE INDEX "index_products_on_company_id" ON "products" ("company_id")
167
+  (0.0ms) PRAGMA index_list("purchases")
168
+  (0.1ms) CREATE INDEX "index_purchases_on_product_id" ON "purchases" ("product_id")
169
+  (0.0ms) PRAGMA index_list("purchases")
170
+  (0.0ms) PRAGMA index_info('index_purchases_on_product_id')
171
+  (0.1ms) CREATE INDEX "index_purchases_on_customer_id" ON "purchases" ("customer_id")
172
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')
173
+  (0.5ms) select sqlite_version(*)
174
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
175
+  (0.0ms) PRAGMA index_list("companies")
176
+  (0.0ms) PRAGMA index_info('index_companies_on_name')
177
+  (0.0ms) PRAGMA index_list("customers")
178
+  (0.0ms) PRAGMA index_info('index_customers_on_company_id')
179
+  (0.0ms) PRAGMA index_info('index_customers_on_name')
180
+  (0.0ms) PRAGMA index_list("products")
181
+  (0.0ms) PRAGMA index_info('index_products_on_company_id')
182
+  (0.0ms) PRAGMA index_info('index_products_on_name')
183
+  (0.0ms) PRAGMA index_list("purchases")
184
+  (0.0ms) PRAGMA index_info('index_purchases_on_customer_id')
185
+  (0.0ms) PRAGMA index_info('index_purchases_on_product_id')
186
+  (0.1ms) select sqlite_version(*)
187
+  (2.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
188
+  (0.1ms) PRAGMA index_list("schema_migrations")
189
+  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
190
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
191
+ Migrating to InitializeModels (1)
192
+  (0.5ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL)
193
+  (0.2ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "company_id" integer NOT NULL) 
194
+  (0.2ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "company_id" integer NOT NULL)
195
+  (0.2ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "ordered_on" date NOT NULL, "product_id" integer NOT NULL, "customer_id" integer NOT NULL) 
196
+  (0.0ms) PRAGMA index_list("companies")
197
+  (0.1ms) CREATE INDEX "index_companies_on_name" ON "companies" ("name")
198
+  (0.0ms) PRAGMA index_list("customers")
199
+  (0.1ms) CREATE INDEX "index_customers_on_name" ON "customers" ("name")
200
+  (0.0ms) PRAGMA index_list("customers")
201
+  (0.0ms) PRAGMA index_info('index_customers_on_name')
202
+  (0.1ms) CREATE INDEX "index_customers_on_company_id" ON "customers" ("company_id")
203
+  (0.0ms) PRAGMA index_list("products")
204
+  (0.1ms) CREATE INDEX "index_products_on_name" ON "products" ("name")
205
+  (0.0ms) PRAGMA index_list("products")
206
+  (0.0ms) PRAGMA index_info('index_products_on_name')
207
+  (0.1ms) CREATE INDEX "index_products_on_company_id" ON "products" ("company_id")
208
+  (0.0ms) PRAGMA index_list("purchases")
209
+  (0.1ms) CREATE INDEX "index_purchases_on_ordered_on" ON "purchases" ("ordered_on")
210
+  (0.0ms) PRAGMA index_list("purchases")
211
+  (0.0ms) PRAGMA index_info('index_purchases_on_ordered_on')
212
+  (0.1ms) CREATE INDEX "index_purchases_on_product_id" ON "purchases" ("product_id")
213
+  (0.0ms) PRAGMA index_list("purchases")
214
+  (0.0ms) PRAGMA index_info('index_purchases_on_product_id')
215
+  (0.0ms) PRAGMA index_info('index_purchases_on_ordered_on')
216
+  (0.1ms) CREATE INDEX "index_purchases_on_customer_id" ON "purchases" ("customer_id")
217
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')
218
+  (0.4ms) select sqlite_version(*)
219
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
220
+  (0.0ms) PRAGMA index_list("companies")
221
+  (0.0ms) PRAGMA index_info('index_companies_on_name')
222
+  (0.0ms) PRAGMA index_list("customers")
223
+  (0.0ms) PRAGMA index_info('index_customers_on_company_id')
224
+  (0.0ms) PRAGMA index_info('index_customers_on_name')
225
+  (0.0ms) PRAGMA index_list("products")
226
+  (0.0ms) PRAGMA index_info('index_products_on_company_id')
227
+  (0.0ms) PRAGMA index_info('index_products_on_name')
228
+  (0.0ms) PRAGMA index_list("purchases")
229
+  (0.0ms) PRAGMA index_info('index_purchases_on_customer_id')
230
+  (0.0ms) PRAGMA index_info('index_purchases_on_product_id')
231
+  (0.0ms) PRAGMA index_info('index_purchases_on_ordered_on')
232
+  (0.1ms) select sqlite_version(*)
233
+  (2.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
234
+  (0.0ms) PRAGMA index_list("schema_migrations")
235
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
236
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
237
+ Migrating to InitializeModels (1)
238
+  (0.8ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order" integer DEFAULT 0 NOT NULL)
239
+  (0.2ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order" integer DEFAULT 0 NOT NULL, "company_id" integer NOT NULL) 
240
+  (0.2ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order" integer DEFAULT 0 NOT NULL, "company_id" integer NOT NULL)
241
+  (0.3ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "ordered_on" date DEFAULT '2011-01-01' NOT NULL, "product_id" integer NOT NULL, "customer_id" integer NOT NULL) 
242
+  (0.0ms) PRAGMA index_list("companies")
243
+  (0.2ms) CREATE INDEX "index_companies_on_name" ON "companies" ("name")
244
+ SQLite3::SQLException: table companies has no column named name: CREATE INDEX "index_companies_on_name" ON "companies" ("name")
245
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
246
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
247
+ Migrating to InitializeModels (1)
248
+  (0.1ms) select sqlite_version(*)
249
+  (0.7ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order" integer DEFAULT 0 NOT NULL) 
250
+  (0.2ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order" integer DEFAULT 0 NOT NULL, "company_id" integer NOT NULL)
251
+  (0.2ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order" integer DEFAULT 0 NOT NULL, "company_id" integer NOT NULL) 
252
+  (0.2ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "ordered_on" date DEFAULT '2011-01-01' NOT NULL, "product_id" integer NOT NULL, "customer_id" integer NOT NULL)
253
+  (0.0ms) PRAGMA index_list("companies")
254
+  (0.2ms) CREATE INDEX "index_companies_on_name" ON "companies" ("name")
255
+ SQLite3::SQLException: table companies has no column named name: CREATE INDEX "index_companies_on_name" ON "companies" ("name")
256
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
257
+ Migrating to InitializeModels (1)
258
+  (0.0ms) select sqlite_version(*)
259
+  (0.7ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order" integer DEFAULT 0 NOT NULL) 
260
+  (0.2ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order" integer DEFAULT 0 NOT NULL, "company_id" integer NOT NULL)
261
+  (0.2ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order" integer DEFAULT 0 NOT NULL, "company_id" integer NOT NULL) 
262
+  (0.2ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "ordered_on" date DEFAULT '2011-01-01' NOT NULL, "product_id" integer NOT NULL, "customer_id" integer NOT NULL)
263
+  (0.0ms) PRAGMA index_list("companies")
264
+  (0.1ms) CREATE INDEX "index_companies_on_order" ON "companies" ("order")
265
+  (0.0ms) PRAGMA index_list("customers")
266
+  (0.1ms) CREATE INDEX "index_customers_on_order" ON "customers" ("order")
267
+  (0.0ms) PRAGMA index_list("customers")
268
+  (0.0ms) PRAGMA index_info('index_customers_on_order')
269
+  (0.1ms) CREATE INDEX "index_customers_on_company_id" ON "customers" ("company_id")
270
+  (0.0ms) PRAGMA index_list("products")
271
+  (0.1ms) CREATE INDEX "index_products_on_order" ON "products" ("order")
272
+  (0.0ms) PRAGMA index_list("products")
273
+  (0.0ms) PRAGMA index_info('index_products_on_order')
274
+  (0.1ms) CREATE INDEX "index_products_on_company_id" ON "products" ("company_id")
275
+  (0.0ms) PRAGMA index_list("purchases")
276
+  (0.1ms) CREATE INDEX "index_purchases_on_ordered_on" ON "purchases" ("ordered_on")
277
+  (0.0ms) PRAGMA index_list("purchases")
278
+  (0.0ms) PRAGMA index_info('index_purchases_on_ordered_on')
279
+  (0.1ms) CREATE INDEX "index_purchases_on_product_id" ON "purchases" ("product_id")
280
+  (0.0ms) PRAGMA index_list("purchases")
281
+  (0.0ms) PRAGMA index_info('index_purchases_on_product_id')
282
+  (0.0ms) PRAGMA index_info('index_purchases_on_ordered_on')
283
+  (0.1ms) CREATE INDEX "index_purchases_on_customer_id" ON "purchases" ("customer_id")
284
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')
285
+  (0.5ms) select sqlite_version(*)
286
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
287
+  (0.0ms) PRAGMA index_list("companies")
288
+  (0.0ms) PRAGMA index_info('index_companies_on_order')
289
+  (0.0ms) PRAGMA index_list("customers")
290
+  (0.0ms) PRAGMA index_info('index_customers_on_company_id')
291
+  (0.0ms) PRAGMA index_info('index_customers_on_order')
292
+  (0.0ms) PRAGMA index_list("products")
293
+  (0.0ms) PRAGMA index_info('index_products_on_company_id')
294
+  (0.0ms) PRAGMA index_info('index_products_on_order')
295
+  (0.0ms) PRAGMA index_list("purchases")
296
+  (0.0ms) PRAGMA index_info('index_purchases_on_customer_id')
297
+  (0.0ms) PRAGMA index_info('index_purchases_on_product_id')
298
+  (0.0ms) PRAGMA index_info('index_purchases_on_ordered_on')
299
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
300
+  (0.4ms) select sqlite_version(*)
301
+  (1.6ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order" integer DEFAULT 0 NOT NULL) 
302
+  (0.0ms) PRAGMA index_list("companies")
303
+  (1.2ms) CREATE INDEX "index_companies_on_order" ON "companies" ("order")
304
+  (1.2ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order" integer DEFAULT 0 NOT NULL, "company_id" integer NOT NULL)
305
+  (0.0ms) PRAGMA index_list("customers")
306
+  (1.1ms) CREATE INDEX "index_customers_on_company_id" ON "customers" ("company_id")
307
+  (0.0ms) PRAGMA index_list("customers")
308
+  (0.0ms) PRAGMA index_info('index_customers_on_company_id')
309
+  (1.1ms) CREATE INDEX "index_customers_on_order" ON "customers" ("order")
310
+  (1.2ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order" integer DEFAULT 0 NOT NULL, "company_id" integer NOT NULL)
311
+  (0.0ms) PRAGMA index_list("products")
312
+  (1.1ms) CREATE INDEX "index_products_on_company_id" ON "products" ("company_id")
313
+  (0.0ms) PRAGMA index_list("products")
314
+  (0.0ms) PRAGMA index_info('index_products_on_company_id')
315
+  (1.1ms) CREATE INDEX "index_products_on_order" ON "products" ("order")
316
+  (1.2ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "ordered_on" date DEFAULT '2011-01-01' NOT NULL, "product_id" integer NOT NULL, "customer_id" integer NOT NULL)
317
+  (0.0ms) PRAGMA index_list("purchases")
318
+  (0.9ms) CREATE INDEX "index_purchases_on_customer_id" ON "purchases" ("customer_id")
319
+  (0.0ms) PRAGMA index_list("purchases")
320
+  (0.0ms) PRAGMA index_info('index_purchases_on_customer_id')
321
+  (0.9ms) CREATE INDEX "index_purchases_on_ordered_on" ON "purchases" ("ordered_on")
322
+  (0.0ms) PRAGMA index_list("purchases")
323
+  (0.0ms) PRAGMA index_info('index_purchases_on_ordered_on')
324
+  (0.1ms) PRAGMA index_info('index_purchases_on_customer_id')
325
+  (0.9ms) CREATE INDEX "index_purchases_on_product_id" ON "purchases" ("product_id")
326
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
327
+  (0.0ms) PRAGMA index_list("schema_migrations")
328
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
329
+  (0.1ms) SELECT version FROM "schema_migrations"
330
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
331
+  (0.1ms) select sqlite_version(*)
332
+  (2.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
333
+  (0.0ms) PRAGMA index_list("schema_migrations")
334
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
335
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
336
+ Migrating to InitializeModels (1)
337
+  (0.6ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "sort" integer DEFAULT 0 NOT NULL)
338
+  (0.2ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "sort" integer DEFAULT 0 NOT NULL, "company_id" integer NOT NULL) 
339
+  (0.2ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "sort" integer DEFAULT 0 NOT NULL, "company_id" integer NOT NULL)
340
+  (0.2ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "ordered_on" date DEFAULT '2011-01-01' NOT NULL, "product_id" integer NOT NULL, "customer_id" integer NOT NULL) 
341
+  (0.0ms) PRAGMA index_list("companies")
342
+  (0.2ms) CREATE INDEX "index_companies_on_sort" ON "companies" ("sort")
343
+  (0.0ms) PRAGMA index_list("customers")
344
+  (0.1ms) CREATE INDEX "index_customers_on_sort" ON "customers" ("sort")
345
+  (0.0ms) PRAGMA index_list("customers")
346
+  (0.0ms) PRAGMA index_info('index_customers_on_sort')
347
+  (0.2ms) CREATE INDEX "index_customers_on_company_id" ON "customers" ("company_id")
348
+  (0.0ms) PRAGMA index_list("products")
349
+  (0.1ms) CREATE INDEX "index_products_on_sort" ON "products" ("sort")
350
+  (0.0ms) PRAGMA index_list("products")
351
+  (0.0ms) PRAGMA index_info('index_products_on_sort')
352
+  (0.1ms) CREATE INDEX "index_products_on_company_id" ON "products" ("company_id")
353
+  (0.0ms) PRAGMA index_list("purchases")
354
+  (0.1ms) CREATE INDEX "index_purchases_on_ordered_on" ON "purchases" ("ordered_on")
355
+  (0.0ms) PRAGMA index_list("purchases")
356
+  (0.0ms) PRAGMA index_info('index_purchases_on_ordered_on')
357
+  (0.1ms) CREATE INDEX "index_purchases_on_product_id" ON "purchases" ("product_id")
358
+  (0.0ms) PRAGMA index_list("purchases")
359
+  (0.0ms) PRAGMA index_info('index_purchases_on_product_id')
360
+  (0.0ms) PRAGMA index_info('index_purchases_on_ordered_on')
361
+  (0.1ms) CREATE INDEX "index_purchases_on_customer_id" ON "purchases" ("customer_id")
362
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')
363
+  (0.5ms) select sqlite_version(*)
364
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
365
+  (0.0ms) PRAGMA index_list("companies")
366
+  (0.0ms) PRAGMA index_info('index_companies_on_sort')
367
+  (0.0ms) PRAGMA index_list("customers")
368
+  (0.0ms) PRAGMA index_info('index_customers_on_company_id')
369
+  (0.0ms) PRAGMA index_info('index_customers_on_sort')
370
+  (0.0ms) PRAGMA index_list("products")
371
+  (0.0ms) PRAGMA index_info('index_products_on_company_id')
372
+  (0.0ms) PRAGMA index_info('index_products_on_sort')
373
+  (0.0ms) PRAGMA index_list("purchases")
374
+  (0.0ms) PRAGMA index_info('index_purchases_on_customer_id')
375
+  (0.0ms) PRAGMA index_info('index_purchases_on_product_id')
376
+  (0.0ms) PRAGMA index_info('index_purchases_on_ordered_on')
377
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
378
+  (0.2ms) select sqlite_version(*)
379
+  (2.3ms) CREATE TABLE "companies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "sort" integer DEFAULT 0 NOT NULL) 
380
+  (0.1ms) PRAGMA index_list("companies")
381
+  (1.2ms) CREATE INDEX "index_companies_on_sort" ON "companies" ("sort")
382
+  (1.1ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "sort" integer DEFAULT 0 NOT NULL, "company_id" integer NOT NULL)
383
+  (0.0ms) PRAGMA index_list("customers")
384
+  (1.1ms) CREATE INDEX "index_customers_on_company_id" ON "customers" ("company_id")
385
+  (0.0ms) PRAGMA index_list("customers")
386
+  (0.0ms) PRAGMA index_info('index_customers_on_company_id')
387
+  (1.1ms) CREATE INDEX "index_customers_on_sort" ON "customers" ("sort")
388
+  (1.2ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "sort" integer DEFAULT 0 NOT NULL, "company_id" integer NOT NULL)
389
+  (0.0ms) PRAGMA index_list("products")
390
+  (1.1ms) CREATE INDEX "index_products_on_company_id" ON "products" ("company_id")
391
+  (0.0ms) PRAGMA index_list("products")
392
+  (0.0ms) PRAGMA index_info('index_products_on_company_id')
393
+  (1.2ms) CREATE INDEX "index_products_on_sort" ON "products" ("sort")
394
+  (1.1ms) CREATE TABLE "purchases" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "ordered_on" date DEFAULT '2011-01-01' NOT NULL, "product_id" integer NOT NULL, "customer_id" integer NOT NULL)
395
+  (0.0ms) PRAGMA index_list("purchases")
396
+  (1.1ms) CREATE INDEX "index_purchases_on_customer_id" ON "purchases" ("customer_id")
397
+  (0.0ms) PRAGMA index_list("purchases")
398
+  (0.0ms) PRAGMA index_info('index_purchases_on_customer_id')
399
+  (1.1ms) CREATE INDEX "index_purchases_on_ordered_on" ON "purchases" ("ordered_on")
400
+  (0.0ms) PRAGMA index_list("purchases")
401
+  (0.0ms) PRAGMA index_info('index_purchases_on_ordered_on')
402
+  (0.0ms) PRAGMA index_info('index_purchases_on_customer_id')
403
+  (1.2ms) CREATE INDEX "index_purchases_on_product_id" ON "purchases" ("product_id")
404
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
405
+  (0.0ms) PRAGMA index_list("schema_migrations")
406
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
407
+  (0.1ms) SELECT version FROM "schema_migrations"
408
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('1')