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 +22 -0
- data/lib/auto_build/association.rb +1 -1
- data/lib/auto_build/version.rb +1 -1
- data/test/auto_build_test.rb +5 -0
- data/test/dummy/app/models/address.rb +1 -0
- data/test/dummy/app/models/order.rb +7 -0
- data/test/dummy/app/models/user.rb +1 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20120425150004_create_orders.rb +12 -0
- data/test/dummy/db/schema.rb +11 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +39 -430
- data/test/dummy/log/test.log +18 -34255
- data/test/dummy/test/fixtures/orders.yml +9 -0
- metadata +25 -21
- data/test/dummy/test/unit/address_test.rb +0 -7
- data/test/dummy/test/unit/nickname_test.rb +0 -7
- data/test/dummy/test/unit/phone_test.rb +0 -7
- data/test/dummy/test/unit/picture_test.rb +0 -7
- data/test/dummy/test/unit/project_test.rb +0 -7
- data/test/dummy/test/unit/user_test.rb +0 -7
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
|
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
|
data/lib/auto_build/version.rb
CHANGED
data/test/auto_build_test.rb
CHANGED
Binary file
|
data/test/dummy/db/schema.rb
CHANGED
@@ -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 =>
|
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"
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -1,458 +1,67 @@
|
|
1
1
|
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
2
|
-
[1m[35m (1.6ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
3
|
-
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
4
|
-
[1m[35m (2.6ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
5
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
6
|
-
Migrating to CreateUsers (20111211212757)
|
7
|
-
[1m[35m (0.5ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
|
8
|
-
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111211212757')[0m
|
9
|
-
Migrating to CreateAddresses (20111211212813)
|
10
|
-
[1m[35m (0.5ms)[0m 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
|
-
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111211212813')[0m
|
12
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
13
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
14
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
15
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
16
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
17
|
-
Migrating to CreateUsers (20111211212757)
|
18
|
-
Migrating to CreateAddresses (20111211212813)
|
19
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
20
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
21
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
22
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
23
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
24
|
-
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
25
|
-
[1m[36m (1.1ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
26
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
|
27
|
-
[1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
28
|
-
[1m[35m (0.6ms)[0m PRAGMA index_list("schema_migrations")
|
29
|
-
[1m[36m (1.0ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
30
|
-
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
31
|
-
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211212813')[0m
|
32
|
-
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
|
33
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
34
|
-
Migrating to CreateUsers (20111211212757)
|
35
|
-
Migrating to CreateAddresses (20111211212813)
|
36
|
-
Migrating to CreatePhones (20111211213814)
|
37
|
-
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
38
|
-
[1m[36m (0.5ms)[0m [1mCREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
39
|
-
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20111211213814')
|
40
|
-
[1m[36m (0.5ms)[0m [1mselect sqlite_version(*)[0m
|
41
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
42
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("addresses")[0m
|
43
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("phones")
|
44
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
45
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
46
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
47
|
-
[1m[36m (1.2ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
48
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
49
|
-
[1m[36m (1.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
50
|
-
[1m[35m (0.8ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
51
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
52
|
-
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
53
|
-
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
54
|
-
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
|
55
|
-
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211212757')[0m
|
56
|
-
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
|
57
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
58
|
-
Migrating to CreateUsers (20111211212757)
|
59
|
-
Migrating to CreateAddresses (20111211212813)
|
60
|
-
Migrating to CreatePhones (20111211213814)
|
61
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
62
|
-
[1m[36m (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
63
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
64
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("phones")[0m
|
65
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("users")
|
66
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
67
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
68
|
-
Migrating to CreatePhones (20111211213814)
|
69
|
-
[1m[36m (0.0ms)[0m [1mselect sqlite_version(*)[0m
|
70
|
-
[1m[35m (0.5ms)[0m DROP TABLE "phones"
|
71
|
-
[1m[36m (0.1ms)[0m [1mDELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20111211213814'[0m
|
72
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
73
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
74
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
75
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
76
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
77
|
-
Migrating to CreateUsers (20111211212757)
|
78
|
-
Migrating to CreateAddresses (20111211212813)
|
79
|
-
Migrating to CreatePhones (20111211213814)
|
80
|
-
[1m[36m (0.6ms)[0m [1mCREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
81
|
-
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20111211213814')
|
82
|
-
[1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
83
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
84
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("addresses")[0m
|
85
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("phones")
|
86
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
87
|
-
[1m[36m (0.5ms)[0m [1mselect sqlite_version(*)[0m
|
88
|
-
[1m[35m (1.4ms)[0m 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
|
-
[1m[36m (1.1ms)[0m [1mCREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
90
|
-
[1m[35m (1.0ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
|
91
|
-
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
92
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
93
|
-
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
94
|
-
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
95
|
-
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211213814')[0m
|
96
|
-
[1m[35m (1.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
|
97
|
-
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211212813')[0m
|
98
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
99
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
100
|
-
Migrating to CreateUsers (20111211212757)
|
101
|
-
Migrating to CreateAddresses (20111211212813)
|
102
|
-
Migrating to CreatePhones (20111211213814)
|
103
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
104
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
105
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
106
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("phones")[0m
|
107
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("users")
|
108
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
109
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
110
|
-
[1m[36m (1.1ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
111
|
-
[1m[35m (1.0ms)[0m CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
112
|
-
[1m[36m (1.3ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
113
|
-
[1m[35m (1.0ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
114
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
115
|
-
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
116
|
-
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
117
|
-
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
|
118
|
-
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211212757')[0m
|
119
|
-
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
|
120
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
121
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
122
|
-
[1m[36m (1.2ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
123
|
-
[1m[35m (1.0ms)[0m CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
124
|
-
[1m[36m (0.9ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
125
2
|
[1m[35m (1.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
126
3
|
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
127
|
-
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
128
|
-
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
129
|
-
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
|
130
|
-
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211212757')[0m
|
131
|
-
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
|
132
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
133
|
-
Migrating to CreateUsers (20111211212757)
|
134
|
-
Migrating to CreateAddresses (20111211212813)
|
135
|
-
Migrating to CreatePhones (20111211213814)
|
136
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
137
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
138
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
139
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("phones")[0m
|
140
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("users")
|
141
|
-
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
142
|
-
[1m[35m (1.0ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
143
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
144
4
|
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
145
5
|
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
146
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
147
6
|
Migrating to CreateUsers (20111211212757)
|
148
|
-
[1m[35m (0.
|
149
|
-
[1m[36m (0.
|
150
|
-
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20111211212757')
|
151
|
-
Migrating to CreateAddresses (20111211212813)
|
152
|
-
[1m[36m (0.5ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
153
|
-
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20111211212813')
|
154
|
-
Migrating to CreatePhones (20111211213814)
|
155
|
-
[1m[36m (0.4ms)[0m [1mCREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
156
|
-
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20111211213814')
|
157
|
-
[1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
158
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
159
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("addresses")[0m
|
160
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("phones")
|
161
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
162
|
-
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
163
|
-
[1m[35m (1.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
164
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
165
|
-
[1m[35m (1.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
166
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
167
|
-
Migrating to CreateUsers (20111211212757)
|
168
|
-
[1m[35m (0.5ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
169
|
-
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111211212757')[0m
|
7
|
+
[1m[35m (0.6ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
|
8
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111211212757')[0m
|
170
9
|
Migrating to CreateAddresses (20111211212813)
|
171
10
|
[1m[35m (0.7ms)[0m 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
|
[1m[36m (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111211212813')[0m
|
173
12
|
Migrating to CreatePhones (20111211213814)
|
174
|
-
[1m[35m (0.
|
175
|
-
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111211213814')[0m
|
176
|
-
[1m[35m (0.4ms)[0m select sqlite_version(*)
|
177
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
178
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
179
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("phones")[0m
|
180
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("users")
|
181
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
182
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
183
|
-
[1m[36m (1.3ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
184
|
-
[1m[35m (1.1ms)[0m CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
185
|
-
[1m[36m (1.0ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
186
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
187
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
188
|
-
[1m[35m (1.5ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
189
|
-
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
190
|
-
[1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
|
191
|
-
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211212757')[0m
|
192
|
-
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
|
193
|
-
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
194
|
-
[1m[35m (1.2ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
195
|
-
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
196
|
-
[1m[35m (1.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
197
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
198
|
-
Migrating to CreateUsers (20111211212757)
|
199
|
-
[1m[35m (0.6ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
|
200
|
-
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111211212757')[0m
|
201
|
-
Migrating to CreateAddresses (20111211212813)
|
202
|
-
[1m[35m (0.4ms)[0m 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
|
-
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111211212813')[0m
|
204
|
-
Migrating to CreatePhones (20111211213814)
|
205
|
-
[1m[35m (0.6ms)[0m CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
13
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
206
14
|
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111211213814')[0m
|
207
15
|
Migrating to CreatePictures (20111212001258)
|
208
16
|
[1m[35m (0.5ms)[0m CREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
209
17
|
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111212001258')[0m
|
210
|
-
[1m[35m (0.5ms)[0m select sqlite_version(*)
|
211
|
-
[1m[36m (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
212
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
213
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("phones")[0m
|
214
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("pictures")
|
215
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
216
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
217
|
-
[1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
|
218
|
-
[1m[35m (1.1ms)[0m 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
|
-
[1m[36m (1.0ms)[0m [1mCREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
220
|
-
[1m[35m (1.0ms)[0m CREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
221
|
-
[1m[36m (0.9ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
222
|
-
[1m[35m (0.8ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
223
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
224
|
-
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
225
|
-
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
226
|
-
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111212001258')
|
227
|
-
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211212757')[0m
|
228
|
-
[1m[35m (1.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
|
229
|
-
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211213814')[0m
|
230
|
-
[1m[36m (0.4ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
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
|
-
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
237
|
-
[1m[36m (0.5ms)[0m [1mCREATE TABLE "friends_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "friend_id" integer) [0m
|
238
|
-
[1m[35m (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20111212235510')
|
239
|
-
[1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
240
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
241
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("addresses")[0m
|
242
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("friends_users")
|
243
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("phones")[0m
|
244
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("pictures")
|
245
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
246
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
247
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
248
|
-
Migrating to CreateUsersFriendsJoinTable (20111212235510)
|
249
|
-
[1m[36m (0.0ms)[0m [1mselect sqlite_version(*)[0m
|
250
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
251
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
252
|
-
Migrating to CreateUsersFriendsJoinTable (20111212235510)
|
253
|
-
[1m[36m (0.0ms)[0m [1mselect sqlite_version(*)[0m
|
254
|
-
[1m[35m (0.5ms)[0m DROP TABLE "friends_users"
|
255
|
-
[1m[36m (0.1ms)[0m [1mDELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20111212235510'[0m
|
256
|
-
[1m[35m (0.6ms)[0m select sqlite_version(*)
|
257
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
258
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
259
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("phones")[0m
|
260
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("pictures")
|
261
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
262
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
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
|
-
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
269
|
-
[1m[36m (0.4ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111212235817')[0m
|
270
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
271
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
272
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
273
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("phones")[0m
|
274
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("pictures")
|
275
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
276
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
277
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
278
|
-
[1m[36m (1.2ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
279
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
280
|
-
[1m[36m (1.5ms)[0m [1mCREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
281
|
-
[1m[35m (1.0ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
|
282
|
-
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
283
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
284
|
-
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
285
|
-
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
286
|
-
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111212235817')[0m
|
287
|
-
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
|
288
|
-
[1m[36m (1.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211212813')[0m
|
289
|
-
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
|
290
|
-
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111212001258')[0m
|
291
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
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
|
-
[1m[35m (0.4ms)[0m select sqlite_version(*)
|
298
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
299
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
300
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("phones")[0m
|
301
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("pictures")
|
302
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
303
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
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
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
310
|
-
[1m[36m (0.3ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
311
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
312
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("phones")[0m
|
313
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("pictures")
|
314
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
315
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
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
|
-
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
322
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
323
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
324
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("phones")[0m
|
325
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("pictures")
|
326
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
327
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
328
|
-
[1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
329
|
-
[1m[35m (1.2ms)[0m 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
|
-
[1m[36m (1.0ms)[0m [1mCREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
331
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
332
|
-
[1m[36m (0.9ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
333
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
334
|
-
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
335
|
-
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
336
|
-
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
337
|
-
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111212235817')
|
338
|
-
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211212757')[0m
|
339
|
-
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
|
340
|
-
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211213814')[0m
|
341
|
-
[1m[35m (1.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111212001258')
|
342
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
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
|
-
[1m[35m (0.
|
349
|
-
[1m[36m (0.
|
350
|
-
|
351
|
-
[1m[
|
352
|
-
[1m[
|
19
|
+
[1m[35m (0.5ms)[0m CREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
20
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111213003425')[0m
|
21
|
+
Migrating to CreateNicknames (20111213033025)
|
22
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "nicknames" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "nick" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
23
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111213033025')[0m
|
24
|
+
Migrating to CreateOrders (20120425150004)
|
25
|
+
[1m[35m (0.6ms)[0m CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "address_id" integer, "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
26
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("orders")[0m
|
27
|
+
[1m[35m (0.2ms)[0m CREATE INDEX "index_orders_on_address_id" ON "orders" ("address_id")
|
28
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("orders")[0m
|
29
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_orders_on_address_id')
|
30
|
+
[1m[36m (0.3ms)[0m [1mCREATE INDEX "index_orders_on_user_id" ON "orders" ("user_id")[0m
|
31
|
+
[1m[35m (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20120425150004')
|
32
|
+
[1m[36m (0.5ms)[0m [1mselect sqlite_version(*)[0m
|
33
|
+
[1m[35m (2.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
353
34
|
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("addresses")[0m
|
35
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("nicknames")
|
36
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("orders")[0m
|
37
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_orders_on_user_id')
|
38
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_orders_on_address_id')[0m
|
354
39
|
[1m[35m (0.0ms)[0m PRAGMA index_list("phones")
|
355
40
|
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("pictures")[0m
|
356
41
|
[1m[35m (0.0ms)[0m PRAGMA index_list("projects")
|
357
42
|
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
358
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
359
|
-
[1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
360
|
-
[1m[35m (4.2ms)[0m 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
|
-
[1m[36m (1.0ms)[0m [1mCREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
362
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
363
|
-
[1m[36m (1.1ms)[0m [1mCREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
364
|
-
[1m[35m (1.0ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
|
365
|
-
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
366
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
367
|
-
[1m[36m (1.3ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
368
|
-
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
369
|
-
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111213003425')[0m
|
370
|
-
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
|
371
|
-
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211212813')[0m
|
372
|
-
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
|
373
|
-
[1m[36m (1.4ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111212001258')[0m
|
374
43
|
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
375
44
|
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
376
|
-
[1m[36m (1.2ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
377
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
378
|
-
[1m[36m (1.0ms)[0m [1mCREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
379
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
380
|
-
[1m[36m (0.9ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
381
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
382
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
383
|
-
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
384
|
-
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
385
|
-
[1m[35m (1.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111213003425')
|
386
|
-
[1m[36m (1.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211212757')[0m
|
387
|
-
[1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
|
388
|
-
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211213814')[0m
|
389
|
-
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111212001258')
|
390
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
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
|
-
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
398
|
-
[1m[36m (0.6ms)[0m [1mCREATE TABLE "nicknames" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "nick" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
399
|
-
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20111213033025')
|
400
|
-
[1m[36m (0.4ms)[0m [1mselect sqlite_version(*)[0m
|
401
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
402
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("addresses")[0m
|
403
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("nicknames")
|
404
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("phones")[0m
|
405
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("pictures")
|
406
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("projects")[0m
|
407
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("users")
|
408
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
409
|
-
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
410
45
|
[1m[36m (1.1ms)[0m [1mCREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "street" varchar(255), "city" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
411
|
-
[1m[35m (
|
46
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "nicknames" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "nick" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
47
|
+
[1m[36m (1.6ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "address_id" integer, "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
48
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("orders")
|
49
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_orders_on_address_id" ON "orders" ("address_id")[0m
|
50
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("orders")
|
51
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_orders_on_address_id')[0m
|
52
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_orders_on_user_id" ON "orders" ("user_id")
|
412
53
|
[1m[36m (1.0ms)[0m [1mCREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
413
54
|
[1m[35m (0.9ms)[0m CREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
414
|
-
[1m[36m (
|
415
|
-
[1m[35m (
|
55
|
+
[1m[36m (4.3ms)[0m [1mCREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
56
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
|
416
57
|
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
417
58
|
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
418
|
-
[1m[36m (
|
59
|
+
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
419
60
|
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
420
|
-
[1m[36m (
|
421
|
-
[1m[35m (
|
422
|
-
[1m[36m (
|
423
|
-
[1m[35m (
|
424
|
-
[1m[36m (
|
425
|
-
[1m[35m (
|
426
|
-
[1m[36m (
|
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
|
-
[1m[35m (0.4ms)[0m select sqlite_version(*)
|
434
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
435
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("addresses")
|
436
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("nicknames")[0m
|
437
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("phones")
|
438
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("pictures")[0m
|
439
|
-
[1m[35m (0.0ms)[0m PRAGMA index_list("projects")
|
440
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("users")[0m
|
441
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
442
|
-
[1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
443
|
-
[1m[35m (1.2ms)[0m 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
|
-
[1m[36m (0.9ms)[0m [1mCREATE TABLE "nicknames" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "nick" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
445
|
-
[1m[35m (1.3ms)[0m CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
446
|
-
[1m[36m (1.2ms)[0m [1mCREATE TABLE "pictures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "path" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
447
|
-
[1m[35m (1.3ms)[0m CREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime)
|
448
|
-
[1m[36m (0.9ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
449
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
450
|
-
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
451
|
-
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
452
|
-
[1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
453
|
-
[1m[35m (1.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111213033025')
|
454
|
-
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211212757')[0m
|
455
|
-
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211212813')
|
456
|
-
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211213814')[0m
|
457
|
-
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111212001258')
|
458
|
-
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111213003425')[0m
|
61
|
+
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20120425150004')[0m
|
62
|
+
[1m[35m (1.3ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211212757')
|
63
|
+
[1m[36m (3.2ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111211212813')[0m
|
64
|
+
[1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111211213814')
|
65
|
+
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111212001258')[0m
|
66
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111213003425')
|
67
|
+
[1m[36m (1.2ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111213033025')[0m
|