auto_build 0.4.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -40,6 +40,16 @@ You can also do:
40
40
 
41
41
  To initialize several fields. One `after_initialize` callback will be created per association.
42
42
 
43
+ ### belongs_to associations
44
+
45
+ Works the same as the `has_one` association:
46
+
47
+ class User
48
+ belongs_to :directory
49
+
50
+ auto_build :directory
51
+ end
52
+
43
53
  ### has_many associations
44
54
 
45
55
  You can automatically initialize a `has_many` association in the same way you initialized a `has_one`
@@ -92,6 +102,18 @@ Notes
92
102
  * The option `:append => true` is equivalent to `:count => 1`.
93
103
  * None of the operations will overwrite existing objects.
94
104
 
105
+ Autobuilding associations means that if there's a value in the column, the object **will be loaded
106
+ every time you load the parent**. This is problematic if you're trying to optimize your code. To get
107
+ a better picture of this:
108
+
109
+ class User
110
+ has_one :address
111
+ auto_build :address
112
+ end
113
+
114
+ If you do `User.select(:id)` the resulting query will be `SELECT id FROM users;` **plus** `SELECT *
115
+ from addresses WHERE user_id = 42";`. This happens because we're calling calling `user#address`
116
+ every time we initialize a `User` object.
95
117
 
96
118
  How it works
97
119
  ----
@@ -57,7 +57,7 @@ module AutoBuild
57
57
  #
58
58
  # It will choose the correct hook based on the value of `type`.
59
59
  def add_hook
60
- if type == :has_one
60
+ if [:has_one, :belongs_to].include?(type)
61
61
  HasOneHook.new(model, association_name).attach
62
62
  else
63
63
  HasManyHook.new(model, association_name, options).attach
@@ -1,3 +1,3 @@
1
1
  module AutoBuild
2
- VERSION = "0.4.3"
2
+ VERSION = "0.5.0"
3
3
  end
@@ -51,4 +51,9 @@ class AutoBuildTest < ActiveSupport::TestCase
51
51
  test "has_one doesn't save the association, only builds it" do
52
52
  assert !@user.address.persisted?
53
53
  end
54
+
55
+ test "belongs_to association" do
56
+ @order = Order.new
57
+ assert @order.user
58
+ end
54
59
  end
@@ -1,3 +1,4 @@
1
1
  class Address < ActiveRecord::Base
2
2
  belongs_to :user
3
+ has_many :orders
3
4
  end
@@ -0,0 +1,7 @@
1
+ class Order < ActiveRecord::Base
2
+ belongs_to :address
3
+ belongs_to :user
4
+
5
+ auto_build :address
6
+ auto_build :user
7
+ end
@@ -5,6 +5,7 @@ class User < ActiveRecord::Base
5
5
 
6
6
  has_many :projects
7
7
  has_many :nicknames
8
+ has_many :orders
8
9
 
9
10
  auto_build :address, :picture
10
11
  auto_build :projects
@@ -0,0 +1,12 @@
1
+ class CreateOrders < ActiveRecord::Migration
2
+ def change
3
+ create_table :orders do |t|
4
+ t.references :address
5
+ t.references :user
6
+
7
+ t.timestamps
8
+ end
9
+ add_index :orders, :address_id
10
+ add_index :orders, :user_id
11
+ end
12
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20111213033025) do
14
+ ActiveRecord::Schema.define(:version => 20120425150004) do
15
15
 
16
16
  create_table "addresses", :force => true do |t|
17
17
  t.string "street"
@@ -28,6 +28,16 @@ ActiveRecord::Schema.define(:version => 20111213033025) do
28
28
  t.datetime "updated_at"
29
29
  end
30
30
 
31
+ create_table "orders", :force => true do |t|
32
+ t.integer "address_id"
33
+ t.integer "user_id"
34
+ t.datetime "created_at"
35
+ t.datetime "updated_at"
36
+ end
37
+
38
+ add_index "orders", ["address_id"], :name => "index_orders_on_address_id"
39
+ add_index "orders", ["user_id"], :name => "index_orders_on_user_id"
40
+
31
41
  create_table "phones", :force => true do |t|
32
42
  t.string "number"
33
43
  t.integer "user_id"
Binary file
@@ -1,458 +1,67 @@
1
1
   (0.1ms) select sqlite_version(*)
2
-  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
3
-  (0.1ms) PRAGMA index_list("schema_migrations")
4
-  (2.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
6
- Migrating to CreateUsers (20111211212757)
7
-  (0.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
8
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211212757')
9
- Migrating to CreateAddresses (20111211212813)
10
-  (0.5ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
11
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211212813')
12
-  (0.3ms) select sqlite_version(*)
13
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
14
-  (0.0ms) PRAGMA index_list("addresses")
15
-  (0.0ms) PRAGMA index_list("users")
16
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
17
- Migrating to CreateUsers (20111211212757)
18
- Migrating to CreateAddresses (20111211212813)
19
-  (0.3ms) select sqlite_version(*)
20
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
21
-  (0.0ms) PRAGMA index_list("addresses")
22
-  (0.0ms) PRAGMA index_list("users")
23
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
24
-  (0.2ms) select sqlite_version(*)
25
-  (1.1ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
26
-  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
27
-  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
28
-  (0.6ms) PRAGMA index_list("schema_migrations")
29
-  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
30
-  (0.1ms) SELECT version FROM "schema_migrations"
31
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
32
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
33
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
34
- Migrating to CreateUsers (20111211212757)
35
- Migrating to CreateAddresses (20111211212813)
36
- Migrating to CreatePhones (20111211213814)
37
-  (0.0ms) select sqlite_version(*)
38
-  (0.5ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
39
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211213814')
40
-  (0.5ms) select sqlite_version(*)
41
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
42
-  (0.0ms) PRAGMA index_list("addresses")
43
-  (0.0ms) PRAGMA index_list("phones")
44
-  (0.0ms) PRAGMA index_list("users")
45
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
46
-  (0.3ms) select sqlite_version(*)
47
-  (1.2ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
48
-  (0.9ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
49
-  (1.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
50
-  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
51
-  (0.0ms) PRAGMA index_list("schema_migrations")
52
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
53
-  (0.1ms) SELECT version FROM "schema_migrations"
54
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
55
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
56
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
57
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
58
- Migrating to CreateUsers (20111211212757)
59
- Migrating to CreateAddresses (20111211212813)
60
- Migrating to CreatePhones (20111211213814)
61
-  (0.3ms) select sqlite_version(*)
62
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
63
-  (0.0ms) PRAGMA index_list("addresses")
64
-  (0.0ms) PRAGMA index_list("phones")
65
-  (0.0ms) PRAGMA index_list("users")
66
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
67
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
68
- Migrating to CreatePhones (20111211213814)
69
-  (0.0ms) select sqlite_version(*)
70
-  (0.5ms) DROP TABLE "phones"
71
-  (0.1ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20111211213814'
72
-  (0.3ms) select sqlite_version(*)
73
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
74
-  (0.0ms) PRAGMA index_list("addresses")
75
-  (0.0ms) PRAGMA index_list("users")
76
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
77
- Migrating to CreateUsers (20111211212757)
78
- Migrating to CreateAddresses (20111211212813)
79
- Migrating to CreatePhones (20111211213814)
80
-  (0.6ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
81
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211213814')
82
-  (0.3ms) select sqlite_version(*)
83
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
84
-  (0.0ms) PRAGMA index_list("addresses")
85
-  (0.0ms) PRAGMA index_list("phones")
86
-  (0.0ms) PRAGMA index_list("users")
87
-  (0.5ms) select sqlite_version(*)
88
-  (1.4ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
89
-  (1.1ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
90
-  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
91
-  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
92
-  (0.0ms) PRAGMA index_list("schema_migrations")
93
-  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
94
-  (0.1ms) SELECT version FROM "schema_migrations"
95
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
96
-  (1.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
97
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
98
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
99
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
100
- Migrating to CreateUsers (20111211212757)
101
- Migrating to CreateAddresses (20111211212813)
102
- Migrating to CreatePhones (20111211213814)
103
-  (0.3ms) select sqlite_version(*)
104
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
105
-  (0.0ms) PRAGMA index_list("addresses")
106
-  (0.0ms) PRAGMA index_list("phones")
107
-  (0.0ms) PRAGMA index_list("users")
108
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
109
-  (0.3ms) select sqlite_version(*)
110
-  (1.1ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
111
-  (1.0ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
112
-  (1.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
113
-  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
114
-  (0.0ms) PRAGMA index_list("schema_migrations")
115
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
116
-  (0.1ms) SELECT version FROM "schema_migrations"
117
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
118
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
119
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
120
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
121
-  (0.3ms) select sqlite_version(*)
122
-  (1.2ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
123
-  (1.0ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
124
-  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
125
2
   (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
126
3
   (0.0ms) PRAGMA index_list("schema_migrations")
127
-  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
128
-  (0.1ms) SELECT version FROM "schema_migrations"
129
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
130
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
131
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
132
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
133
- Migrating to CreateUsers (20111211212757)
134
- Migrating to CreateAddresses (20111211212813)
135
- Migrating to CreatePhones (20111211213814)
136
-  (0.3ms) select sqlite_version(*)
137
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
138
-  (0.0ms) PRAGMA index_list("addresses")
139
-  (0.0ms) PRAGMA index_list("phones")
140
-  (0.0ms) PRAGMA index_list("users")
141
-  (0.1ms) select sqlite_version(*)
142
-  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
143
-  (0.0ms) PRAGMA index_list("schema_migrations")
144
4
   (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
145
5
   (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
146
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
147
6
  Migrating to CreateUsers (20111211212757)
148
-  (0.1ms) select sqlite_version(*)
149
-  (0.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
150
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211212757')
151
- Migrating to CreateAddresses (20111211212813)
152
-  (0.5ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
153
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211212813')
154
- Migrating to CreatePhones (20111211213814)
155
-  (0.4ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
156
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211213814')
157
-  (0.3ms) select sqlite_version(*)
158
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
159
-  (0.0ms) PRAGMA index_list("addresses")
160
-  (0.0ms) PRAGMA index_list("phones")
161
-  (0.0ms) PRAGMA index_list("users")
162
-  (0.1ms) select sqlite_version(*)
163
-  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
164
-  (0.0ms) PRAGMA index_list("schema_migrations")
165
-  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
166
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
167
- Migrating to CreateUsers (20111211212757)
168
-  (0.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
169
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211212757')
7
+  (0.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
8
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211212757')
170
9
  Migrating to CreateAddresses (20111211212813)
171
10
   (0.7ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
172
11
   (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211212813')
173
12
  Migrating to CreatePhones (20111211213814)
174
-  (0.5ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
175
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211213814')
176
-  (0.4ms) select sqlite_version(*)
177
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
178
-  (0.0ms) PRAGMA index_list("addresses")
179
-  (0.0ms) PRAGMA index_list("phones")
180
-  (0.0ms) PRAGMA index_list("users")
181
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
182
-  (0.3ms) select sqlite_version(*)
183
-  (1.3ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
184
-  (1.1ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
185
-  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
186
-  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
187
-  (0.0ms) PRAGMA index_list("schema_migrations")
188
-  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
189
-  (0.1ms) SELECT version FROM "schema_migrations"
190
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
191
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
192
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
193
-  (0.1ms) select sqlite_version(*)
194
-  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
195
-  (0.1ms) PRAGMA index_list("schema_migrations")
196
-  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
197
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
198
- Migrating to CreateUsers (20111211212757)
199
-  (0.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
200
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211212757')
201
- Migrating to CreateAddresses (20111211212813)
202
-  (0.4ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
203
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211212813')
204
- Migrating to CreatePhones (20111211213814)
205
-  (0.6ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
13
+  (0.7ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
206
14
   (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111211213814')
207
15
  Migrating to CreatePictures (20111212001258)
208
16
   (0.5ms) CREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
209
17
   (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111212001258')
210
-  (0.5ms) select sqlite_version(*)
211
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
212
-  (0.0ms) PRAGMA index_list("addresses")
213
-  (0.0ms) PRAGMA index_list("phones")
214
-  (0.0ms) PRAGMA index_list("pictures")
215
-  (0.0ms) PRAGMA index_list("users")
216
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
217
-  (0.2ms) select sqlite_version(*)
218
-  (1.1ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
219
-  (1.0ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
220
-  (1.0ms) CREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
221
-  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
222
-  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
223
-  (0.0ms) PRAGMA index_list("schema_migrations")
224
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
225
-  (0.1ms) SELECT version FROM "schema_migrations"
226
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111212001258')
227
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
228
-  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
229
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
230
-  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
231
- Migrating to CreateUsers (20111211212757)
232
- Migrating to CreateAddresses (20111211212813)
233
- Migrating to CreatePhones (20111211213814)
234
- Migrating to CreatePictures (20111212001258)
235
- Migrating to CreateUsersFriendsJoinTable (20111212235510)
236
-  (0.0ms) select sqlite_version(*)
237
-  (0.5ms) CREATE TABLE "friends_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "friend_id" integer) 
238
-  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111212235510')
239
-  (0.3ms) select sqlite_version(*)
240
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
241
-  (0.0ms) PRAGMA index_list("addresses")
242
-  (0.0ms) PRAGMA index_list("friends_users")
243
-  (0.0ms) PRAGMA index_list("phones")
244
-  (0.0ms) PRAGMA index_list("pictures")
245
-  (0.0ms) PRAGMA index_list("users")
246
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
247
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
248
- Migrating to CreateUsersFriendsJoinTable (20111212235510)
249
-  (0.0ms) select sqlite_version(*)
250
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
251
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
252
- Migrating to CreateUsersFriendsJoinTable (20111212235510)
253
-  (0.0ms) select sqlite_version(*)
254
-  (0.5ms) DROP TABLE "friends_users"
255
-  (0.1ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20111212235510'
256
-  (0.6ms) select sqlite_version(*)
257
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
258
-  (0.0ms) PRAGMA index_list("addresses")
259
-  (0.0ms) PRAGMA index_list("phones")
260
-  (0.0ms) PRAGMA index_list("pictures")
261
-  (0.0ms) PRAGMA index_list("users")
262
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
263
- Migrating to CreateUsers (20111211212757)
264
- Migrating to CreateAddresses (20111211212813)
265
- Migrating to CreatePhones (20111211213814)
266
- Migrating to CreatePictures (20111212001258)
267
- Migrating to Project (20111212235817)
268
-  (0.0ms) select sqlite_version(*)
269
-  (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111212235817')
270
-  (0.3ms) select sqlite_version(*)
271
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
272
-  (0.0ms) PRAGMA index_list("addresses")
273
-  (0.0ms) PRAGMA index_list("phones")
274
-  (0.0ms) PRAGMA index_list("pictures")
275
-  (0.0ms) PRAGMA index_list("users")
276
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
277
-  (0.3ms) select sqlite_version(*)
278
-  (1.2ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
279
-  (0.9ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
280
-  (1.5ms) CREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
281
-  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
282
-  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
283
-  (0.0ms) PRAGMA index_list("schema_migrations")
284
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
285
-  (0.1ms) SELECT version FROM "schema_migrations"
286
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20111212235817')
287
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
288
-  (1.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
289
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
290
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111212001258')
291
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
292
- Migrating to CreateUsers (20111211212757)
293
- Migrating to CreateAddresses (20111211212813)
294
- Migrating to CreatePhones (20111211213814)
295
- Migrating to CreatePictures (20111212001258)
296
- Migrating to Project (20111212235817)
297
-  (0.4ms) select sqlite_version(*)
298
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
299
-  (0.0ms) PRAGMA index_list("addresses")
300
-  (0.0ms) PRAGMA index_list("phones")
301
-  (0.0ms) PRAGMA index_list("pictures")
302
-  (0.0ms) PRAGMA index_list("users")
303
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
304
- Migrating to CreateUsers (20111211212757)
305
- Migrating to CreateAddresses (20111211212813)
306
- Migrating to CreatePhones (20111211213814)
307
- Migrating to CreatePictures (20111212001258)
308
- Migrating to Project (20111212235817)
309
-  (0.3ms) select sqlite_version(*)
310
-  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
311
-  (0.0ms) PRAGMA index_list("addresses")
312
-  (0.0ms) PRAGMA index_list("phones")
313
-  (0.0ms) PRAGMA index_list("pictures")
314
-  (0.0ms) PRAGMA index_list("users")
315
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
316
- Migrating to CreateUsers (20111211212757)
317
- Migrating to CreateAddresses (20111211212813)
318
- Migrating to CreatePhones (20111211213814)
319
- Migrating to CreatePictures (20111212001258)
320
- Migrating to Project (20111212235817)
321
-  (0.3ms) select sqlite_version(*)
322
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
323
-  (0.0ms) PRAGMA index_list("addresses")
324
-  (0.0ms) PRAGMA index_list("phones")
325
-  (0.0ms) PRAGMA index_list("pictures")
326
-  (0.0ms) PRAGMA index_list("users")
327
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
328
-  (0.3ms) select sqlite_version(*)
329
-  (1.2ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
330
-  (1.0ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
331
-  (0.9ms) CREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
332
-  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
333
-  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
334
-  (0.1ms) PRAGMA index_list("schema_migrations")
335
-  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
336
-  (0.1ms) SELECT version FROM "schema_migrations"
337
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111212235817')
338
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
339
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
340
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
341
-  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20111212001258')
342
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
343
- Migrating to CreateUsers (20111211212757)
344
- Migrating to CreateAddresses (20111211212813)
345
- Migrating to CreatePhones (20111211213814)
346
- Migrating to CreatePictures (20111212001258)
347
18
  Migrating to CreateProjects (20111213003425)
348
-  (0.0ms) select sqlite_version(*)
349
-  (0.5ms) CREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
350
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111213003425')
351
-  (0.4ms) select sqlite_version(*)
352
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
19
+  (0.5ms) CREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
20
+  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111213003425')
21
+ Migrating to CreateNicknames (20111213033025)
22
+  (0.7ms) CREATE TABLE "nicknames" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "nick" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
23
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111213033025')
24
+ Migrating to CreateOrders (20120425150004)
25
+  (0.6ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "address_id" integer, "user_id" integer, "created_at" datetime, "updated_at" datetime)
26
+  (0.1ms) PRAGMA index_list("orders")
27
+  (0.2ms) CREATE INDEX "index_orders_on_address_id" ON "orders" ("address_id")
28
+  (0.0ms) PRAGMA index_list("orders")
29
+  (0.0ms) PRAGMA index_info('index_orders_on_address_id')
30
+  (0.3ms) CREATE INDEX "index_orders_on_user_id" ON "orders" ("user_id")
31
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120425150004')
32
+  (0.5ms) select sqlite_version(*)
33
+  (2.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
353
34
   (0.0ms) PRAGMA index_list("addresses")
35
+  (0.0ms) PRAGMA index_list("nicknames")
36
+  (0.0ms) PRAGMA index_list("orders")
37
+  (0.0ms) PRAGMA index_info('index_orders_on_user_id')
38
+  (0.0ms) PRAGMA index_info('index_orders_on_address_id')
354
39
   (0.0ms) PRAGMA index_list("phones")
355
40
   (0.0ms) PRAGMA index_list("pictures")
356
41
   (0.0ms) PRAGMA index_list("projects")
357
42
   (0.0ms) PRAGMA index_list("users")
358
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
359
-  (0.3ms) select sqlite_version(*)
360
-  (4.2ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
361
-  (1.0ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
362
-  (0.9ms) CREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
363
-  (1.1ms) CREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
364
-  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
365
-  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
366
-  (0.0ms) PRAGMA index_list("schema_migrations")
367
-  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
368
-  (0.1ms) SELECT version FROM "schema_migrations"
369
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111213003425')
370
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
371
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
372
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
373
-  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20111212001258')
374
43
   (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
375
44
   (0.3ms) select sqlite_version(*)
376
-  (1.2ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
377
-  (0.9ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
378
-  (1.0ms) CREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
379
-  (0.9ms) CREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
380
-  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
381
-  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
382
-  (0.0ms) PRAGMA index_list("schema_migrations")
383
-  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
384
-  (0.1ms) SELECT version FROM "schema_migrations"
385
-  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20111213003425')
386
-  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
387
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
388
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
389
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111212001258')
390
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
391
- Migrating to CreateUsers (20111211212757)
392
- Migrating to CreateAddresses (20111211212813)
393
- Migrating to CreatePhones (20111211213814)
394
- Migrating to CreatePictures (20111212001258)
395
- Migrating to CreateProjects (20111213003425)
396
- Migrating to CreateNicknames (20111213033025)
397
-  (0.0ms) select sqlite_version(*)
398
-  (0.6ms) CREATE TABLE "nicknames" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "nick" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
399
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111213033025')
400
-  (0.4ms) select sqlite_version(*)
401
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
402
-  (0.0ms) PRAGMA index_list("addresses")
403
-  (0.0ms) PRAGMA index_list("nicknames")
404
-  (0.0ms) PRAGMA index_list("phones")
405
-  (0.0ms) PRAGMA index_list("pictures")
406
-  (0.0ms) PRAGMA index_list("projects")
407
-  (0.0ms) PRAGMA index_list("users")
408
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
409
-  (0.2ms) select sqlite_version(*)
410
45
   (1.1ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
411
-  (0.9ms) CREATE TABLE "nicknames" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "nick" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
46
+  (1.0ms) CREATE TABLE "nicknames" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "nick" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
47
+  (1.6ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "address_id" integer, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
48
+  (0.1ms) PRAGMA index_list("orders")
49
+  (1.0ms) CREATE INDEX "index_orders_on_address_id" ON "orders" ("address_id")
50
+  (0.1ms) PRAGMA index_list("orders")
51
+  (0.0ms) PRAGMA index_info('index_orders_on_address_id')
52
+  (1.0ms) CREATE INDEX "index_orders_on_user_id" ON "orders" ("user_id")
412
53
   (1.0ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
413
54
   (0.9ms) CREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
414
-  (1.0ms) CREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
415
-  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
55
+  (4.3ms) CREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
56
+  (1.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
416
57
   (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
417
58
   (0.0ms) PRAGMA index_list("schema_migrations")
418
-  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
59
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
419
60
   (0.1ms) SELECT version FROM "schema_migrations"
420
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111213033025')
421
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
422
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
423
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
424
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20111212001258')
425
-  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111213003425')
426
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
427
- Migrating to CreateUsers (20111211212757)
428
- Migrating to CreateAddresses (20111211212813)
429
- Migrating to CreatePhones (20111211213814)
430
- Migrating to CreatePictures (20111212001258)
431
- Migrating to CreateProjects (20111213003425)
432
- Migrating to CreateNicknames (20111213033025)
433
-  (0.4ms) select sqlite_version(*)
434
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
435
-  (0.0ms) PRAGMA index_list("addresses")
436
-  (0.0ms) PRAGMA index_list("nicknames")
437
-  (0.0ms) PRAGMA index_list("phones")
438
-  (0.0ms) PRAGMA index_list("pictures")
439
-  (0.0ms) PRAGMA index_list("projects")
440
-  (0.0ms) PRAGMA index_list("users")
441
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
442
-  (0.3ms) select sqlite_version(*)
443
-  (1.2ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
444
-  (0.9ms) CREATE TABLE "nicknames" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "nick" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
445
-  (1.3ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
446
-  (1.2ms) CREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
447
-  (1.3ms) CREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
448
-  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
449
-  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
450
-  (0.0ms) PRAGMA index_list("schema_migrations")
451
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
452
-  (0.3ms) SELECT version FROM "schema_migrations"
453
-  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20111213033025')
454
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
455
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
456
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
457
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20111212001258')
458
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20111213003425')
61
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120425150004')
62
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
63
+  (3.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
64
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
65
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20111212001258')
66
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20111213003425')
67
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111213033025')