activerecord_translatable 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +42 -22
- data/lib/activerecord_translatable.rb +18 -1
- data/lib/activerecord_translatable/extension.rb +48 -20
- data/lib/version.rb +5 -0
- data/spec/activerecord_translateable_spec.rb +61 -4
- data/spec/dummy/app/models/foo.rb +2 -0
- data/spec/dummy/app/models/noarraything.rb +4 -0
- data/spec/dummy/app/models/something.rb +0 -2
- data/spec/dummy/config/database.yml +3 -3
- data/spec/dummy/db/migrate/20130124094113_create_foo.rb +7 -0
- data/spec/dummy/db/migrate/20130124100555_create_noarraythings.rb +9 -0
- data/spec/dummy/db/schema.rb +12 -1
- data/spec/dummy/log/development.log +373 -46
- data/spec/dummy/log/test.log +5991 -0
- metadata +36 -29
@@ -1,56 +1,224 @@
|
|
1
1
|
Connecting to database specified by database.yml
|
2
2
|
Connecting to database specified by database.yml
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
[1m[36m (0.9ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
4
|
+
Migrating to CreateSomethings (20121015083259)
|
5
|
+
Migrating to CreateFoo (20130124094113)
|
6
|
+
[1m[35m (0.1ms)[0m BEGIN
|
7
|
+
[1m[36m (25.1ms)[0m [1mCREATE TABLE "foos" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
8
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20130124094113')
|
9
|
+
[1m[36m (0.7ms)[0m [1mCOMMIT[0m
|
10
|
+
[1m[35m (0.4ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
11
|
+
[1m[36mPK and serial sequence (15.2ms)[0m [1m SELECT attr.attname, seq.relname
|
12
|
+
FROM pg_class seq,
|
13
|
+
pg_attribute attr,
|
14
|
+
pg_depend dep,
|
15
|
+
pg_namespace name,
|
16
|
+
pg_constraint cons
|
17
|
+
WHERE seq.oid = dep.objid
|
18
|
+
AND seq.relkind = 'S'
|
19
|
+
AND attr.attrelid = dep.refobjid
|
20
|
+
AND attr.attnum = dep.refobjsubid
|
21
|
+
AND attr.attrelid = cons.conrelid
|
22
|
+
AND attr.attnum = cons.conkey[1]
|
23
|
+
AND cons.contype = 'p'
|
24
|
+
AND dep.refobjid = '"foos"'::regclass
|
25
|
+
[0m
|
26
|
+
[1m[35m (7.3ms)[0m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
6
27
|
FROM pg_class t
|
7
28
|
INNER JOIN pg_index d ON t.oid = d.indrelid
|
8
29
|
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
9
30
|
WHERE i.relkind = 'i'
|
10
31
|
AND d.indisprimary = 'f'
|
11
|
-
AND t.relname = '
|
32
|
+
AND t.relname = 'foos'
|
33
|
+
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
34
|
+
ORDER BY i.relname
|
35
|
+
|
36
|
+
[1m[36mPK and serial sequence (1.7ms)[0m [1m SELECT attr.attname, seq.relname
|
37
|
+
FROM pg_class seq,
|
38
|
+
pg_attribute attr,
|
39
|
+
pg_depend dep,
|
40
|
+
pg_namespace name,
|
41
|
+
pg_constraint cons
|
42
|
+
WHERE seq.oid = dep.objid
|
43
|
+
AND seq.relkind = 'S'
|
44
|
+
AND attr.attrelid = dep.refobjid
|
45
|
+
AND attr.attnum = dep.refobjsubid
|
46
|
+
AND attr.attrelid = cons.conrelid
|
47
|
+
AND attr.attnum = cons.conkey[1]
|
48
|
+
AND cons.contype = 'p'
|
49
|
+
AND dep.refobjid = '"somethings"'::regclass
|
50
|
+
[0m
|
51
|
+
[1m[35m (0.8ms)[0m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
52
|
+
FROM pg_class t
|
53
|
+
INNER JOIN pg_index d ON t.oid = d.indrelid
|
54
|
+
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
55
|
+
WHERE i.relkind = 'i'
|
56
|
+
AND d.indisprimary = 'f'
|
57
|
+
AND t.relname = 'somethings'
|
12
58
|
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
13
59
|
ORDER BY i.relname
|
14
60
|
|
15
|
-
[1m[36m (1.6ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
16
|
-
[1m[35m (0.3ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
17
|
-
Migrating to CreateSomethings (20121015083259)
|
18
|
-
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
19
|
-
[1m[35m (0.2ms)[0m ROLLBACK
|
20
61
|
Connecting to database specified by database.yml
|
21
62
|
[1m[36m (0.4ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
22
|
-
|
23
|
-
[1m[
|
24
|
-
[1m[
|
25
|
-
|
26
|
-
[1m[
|
27
|
-
|
28
|
-
|
29
|
-
|
63
|
+
[1m[35m (301.3ms)[0m DROP DATABASE IF EXISTS "translatable_test"
|
64
|
+
[1m[36m (354.3ms)[0m [1mCREATE DATABASE "translatable_test" ENCODING = 'unicode'[0m
|
65
|
+
[1m[35m (6.7ms)[0m CREATE TABLE "foos" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
66
|
+
[1m[36m (3.3ms)[0m [1mCREATE TABLE "somethings" ("id" serial primary key, "locales" character varying(255)[], "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
67
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)
|
68
|
+
[1m[36m (2.3ms)[0m [1m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
69
|
+
FROM pg_class t
|
70
|
+
INNER JOIN pg_index d ON t.oid = d.indrelid
|
71
|
+
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
72
|
+
WHERE i.relkind = 'i'
|
73
|
+
AND d.indisprimary = 'f'
|
74
|
+
AND t.relname = 'schema_migrations'
|
75
|
+
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
76
|
+
ORDER BY i.relname
|
77
|
+
[0m
|
78
|
+
[1m[35m (1.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
79
|
+
[1m[36m (0.4ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
80
|
+
[1m[35m (0.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20130124094113')
|
81
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20121015083259')[0m
|
30
82
|
Connecting to database specified by database.yml
|
31
|
-
[1m[36m (0.3ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
32
|
-
Migrating to CreateSomethings (20121015083259)
|
33
|
-
[1m[35m (0.1ms)[0m BEGIN
|
34
|
-
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
35
83
|
Connecting to database specified by database.yml
|
36
|
-
[1m[36m (
|
84
|
+
[1m[36m (1.4ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
37
85
|
Migrating to CreateSomethings (20121015083259)
|
38
|
-
|
39
|
-
|
86
|
+
Migrating to CreateFoo (20130124094113)
|
87
|
+
Migrating to CreateNoarraythings (20130124100555)
|
88
|
+
[1m[35m (0.2ms)[0m BEGIN
|
89
|
+
[1m[36m (188.6ms)[0m [1mCREATE TABLE "noarraythings" ("id" serial primary key, "locales" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
90
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20130124100555')
|
91
|
+
[1m[36m (0.7ms)[0m [1mCOMMIT[0m
|
92
|
+
[1m[35m (0.4ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
93
|
+
[1m[36mPK and serial sequence (16.9ms)[0m [1m SELECT attr.attname, seq.relname
|
94
|
+
FROM pg_class seq,
|
95
|
+
pg_attribute attr,
|
96
|
+
pg_depend dep,
|
97
|
+
pg_namespace name,
|
98
|
+
pg_constraint cons
|
99
|
+
WHERE seq.oid = dep.objid
|
100
|
+
AND seq.relkind = 'S'
|
101
|
+
AND attr.attrelid = dep.refobjid
|
102
|
+
AND attr.attnum = dep.refobjsubid
|
103
|
+
AND attr.attrelid = cons.conrelid
|
104
|
+
AND attr.attnum = cons.conkey[1]
|
105
|
+
AND cons.contype = 'p'
|
106
|
+
AND dep.refobjid = '"foos"'::regclass
|
107
|
+
[0m
|
108
|
+
[1m[35m (3.4ms)[0m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
109
|
+
FROM pg_class t
|
110
|
+
INNER JOIN pg_index d ON t.oid = d.indrelid
|
111
|
+
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
112
|
+
WHERE i.relkind = 'i'
|
113
|
+
AND d.indisprimary = 'f'
|
114
|
+
AND t.relname = 'foos'
|
115
|
+
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
116
|
+
ORDER BY i.relname
|
117
|
+
|
118
|
+
[1m[36mPK and serial sequence (2.4ms)[0m [1m SELECT attr.attname, seq.relname
|
119
|
+
FROM pg_class seq,
|
120
|
+
pg_attribute attr,
|
121
|
+
pg_depend dep,
|
122
|
+
pg_namespace name,
|
123
|
+
pg_constraint cons
|
124
|
+
WHERE seq.oid = dep.objid
|
125
|
+
AND seq.relkind = 'S'
|
126
|
+
AND attr.attrelid = dep.refobjid
|
127
|
+
AND attr.attnum = dep.refobjsubid
|
128
|
+
AND attr.attrelid = cons.conrelid
|
129
|
+
AND attr.attnum = cons.conkey[1]
|
130
|
+
AND cons.contype = 'p'
|
131
|
+
AND dep.refobjid = '"noarraythings"'::regclass
|
132
|
+
[0m
|
133
|
+
[1m[35m (1.0ms)[0m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
134
|
+
FROM pg_class t
|
135
|
+
INNER JOIN pg_index d ON t.oid = d.indrelid
|
136
|
+
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
137
|
+
WHERE i.relkind = 'i'
|
138
|
+
AND d.indisprimary = 'f'
|
139
|
+
AND t.relname = 'noarraythings'
|
140
|
+
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
141
|
+
ORDER BY i.relname
|
142
|
+
|
143
|
+
[1m[36mPK and serial sequence (1.8ms)[0m [1m SELECT attr.attname, seq.relname
|
144
|
+
FROM pg_class seq,
|
145
|
+
pg_attribute attr,
|
146
|
+
pg_depend dep,
|
147
|
+
pg_namespace name,
|
148
|
+
pg_constraint cons
|
149
|
+
WHERE seq.oid = dep.objid
|
150
|
+
AND seq.relkind = 'S'
|
151
|
+
AND attr.attrelid = dep.refobjid
|
152
|
+
AND attr.attnum = dep.refobjsubid
|
153
|
+
AND attr.attrelid = cons.conrelid
|
154
|
+
AND attr.attnum = cons.conkey[1]
|
155
|
+
AND cons.contype = 'p'
|
156
|
+
AND dep.refobjid = '"somethings"'::regclass
|
157
|
+
[0m
|
158
|
+
[1m[35m (0.9ms)[0m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
159
|
+
FROM pg_class t
|
160
|
+
INNER JOIN pg_index d ON t.oid = d.indrelid
|
161
|
+
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
162
|
+
WHERE i.relkind = 'i'
|
163
|
+
AND d.indisprimary = 'f'
|
164
|
+
AND t.relname = 'somethings'
|
165
|
+
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
166
|
+
ORDER BY i.relname
|
167
|
+
|
40
168
|
Connecting to database specified by database.yml
|
41
|
-
[1m[36m (
|
42
|
-
|
43
|
-
[1m[
|
44
|
-
[1m[
|
169
|
+
[1m[36m (1.7ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
170
|
+
[1m[35m (459.1ms)[0m DROP DATABASE IF EXISTS "translatable_test"
|
171
|
+
[1m[36m (335.2ms)[0m [1mCREATE DATABASE "translatable_test" ENCODING = 'unicode'[0m
|
172
|
+
[1m[35m (6.9ms)[0m CREATE TABLE "foos" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
173
|
+
[1m[36m (3.0ms)[0m [1mCREATE TABLE "noarraythings" ("id" serial primary key, "locales" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
174
|
+
[1m[35m (3.7ms)[0m CREATE TABLE "somethings" ("id" serial primary key, "locales" character varying(255)[], "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
175
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) [0m
|
176
|
+
[1m[35m (2.9ms)[0m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
177
|
+
FROM pg_class t
|
178
|
+
INNER JOIN pg_index d ON t.oid = d.indrelid
|
179
|
+
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
180
|
+
WHERE i.relkind = 'i'
|
181
|
+
AND d.indisprimary = 'f'
|
182
|
+
AND t.relname = 'schema_migrations'
|
183
|
+
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
184
|
+
ORDER BY i.relname
|
185
|
+
|
186
|
+
[1m[36m (1.3ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
187
|
+
[1m[35m (0.3ms)[0m SELECT version FROM "schema_migrations"
|
188
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20130124100555')[0m
|
189
|
+
[1m[35m (0.4ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20121015083259')
|
190
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20130124094113')[0m
|
45
191
|
Connecting to database specified by database.yml
|
46
|
-
[1m[36m (
|
192
|
+
[1m[36m (3.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) [0m
|
193
|
+
[1m[35m (2.6ms)[0m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
194
|
+
FROM pg_class t
|
195
|
+
INNER JOIN pg_index d ON t.oid = d.indrelid
|
196
|
+
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
197
|
+
WHERE i.relkind = 'i'
|
198
|
+
AND d.indisprimary = 'f'
|
199
|
+
AND t.relname = 'schema_migrations'
|
200
|
+
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
201
|
+
ORDER BY i.relname
|
202
|
+
|
203
|
+
[1m[36m (1.4ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
204
|
+
[1m[35m (0.4ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
47
205
|
Migrating to CreateSomethings (20121015083259)
|
48
|
-
[1m[
|
49
|
-
[1m[
|
50
|
-
[1m[
|
51
|
-
[1m[
|
52
|
-
|
53
|
-
[1m[
|
206
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
207
|
+
[1m[35m (4.0ms)[0m CREATE TABLE "somethings" ("id" serial primary key, "locales" character varying(255)[], "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
208
|
+
[1m[36m (0.4ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20121015083259')[0m
|
209
|
+
[1m[35m (0.6ms)[0m COMMIT
|
210
|
+
Migrating to CreateFoo (20130124094113)
|
211
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
212
|
+
[1m[35m (3.2ms)[0m CREATE TABLE "foos" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
213
|
+
[1m[36m (0.4ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20130124094113')[0m
|
214
|
+
[1m[35m (0.4ms)[0m COMMIT
|
215
|
+
Migrating to CreateNoarraythings (20130124100555)
|
216
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
217
|
+
[1m[35m (2.2ms)[0m CREATE TABLE "noarraythings" ("id" serial primary key, "locales" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
218
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20130124100555')[0m
|
219
|
+
[1m[35m (0.5ms)[0m COMMIT
|
220
|
+
[1m[36m (0.6ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
221
|
+
[1m[35mPK and serial sequence (6.3ms)[0m SELECT attr.attname, seq.relname
|
54
222
|
FROM pg_class seq,
|
55
223
|
pg_attribute attr,
|
56
224
|
pg_depend dep,
|
@@ -63,25 +231,77 @@ Migrating to CreateSomethings (20121015083259)
|
|
63
231
|
AND attr.attrelid = cons.conrelid
|
64
232
|
AND attr.attnum = cons.conkey[1]
|
65
233
|
AND cons.contype = 'p'
|
66
|
-
AND dep.refobjid = '"
|
234
|
+
AND dep.refobjid = '"foos"'::regclass
|
235
|
+
|
236
|
+
[1m[36m (2.6ms)[0m [1m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
237
|
+
FROM pg_class t
|
238
|
+
INNER JOIN pg_index d ON t.oid = d.indrelid
|
239
|
+
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
240
|
+
WHERE i.relkind = 'i'
|
241
|
+
AND d.indisprimary = 'f'
|
242
|
+
AND t.relname = 'foos'
|
243
|
+
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
244
|
+
ORDER BY i.relname
|
67
245
|
[0m
|
68
|
-
[1m[
|
246
|
+
[1m[35mPK and serial sequence (2.4ms)[0m SELECT attr.attname, seq.relname
|
247
|
+
FROM pg_class seq,
|
248
|
+
pg_attribute attr,
|
249
|
+
pg_depend dep,
|
250
|
+
pg_namespace name,
|
251
|
+
pg_constraint cons
|
252
|
+
WHERE seq.oid = dep.objid
|
253
|
+
AND seq.relkind = 'S'
|
254
|
+
AND attr.attrelid = dep.refobjid
|
255
|
+
AND attr.attnum = dep.refobjsubid
|
256
|
+
AND attr.attrelid = cons.conrelid
|
257
|
+
AND attr.attnum = cons.conkey[1]
|
258
|
+
AND cons.contype = 'p'
|
259
|
+
AND dep.refobjid = '"noarraythings"'::regclass
|
260
|
+
|
261
|
+
[1m[36m (0.9ms)[0m [1m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
69
262
|
FROM pg_class t
|
70
263
|
INNER JOIN pg_index d ON t.oid = d.indrelid
|
71
264
|
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
72
265
|
WHERE i.relkind = 'i'
|
73
266
|
AND d.indisprimary = 'f'
|
74
|
-
AND t.relname = '
|
267
|
+
AND t.relname = 'noarraythings'
|
75
268
|
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
76
269
|
ORDER BY i.relname
|
270
|
+
[0m
|
271
|
+
[1m[35mPK and serial sequence (1.6ms)[0m SELECT attr.attname, seq.relname
|
272
|
+
FROM pg_class seq,
|
273
|
+
pg_attribute attr,
|
274
|
+
pg_depend dep,
|
275
|
+
pg_namespace name,
|
276
|
+
pg_constraint cons
|
277
|
+
WHERE seq.oid = dep.objid
|
278
|
+
AND seq.relkind = 'S'
|
279
|
+
AND attr.attrelid = dep.refobjid
|
280
|
+
AND attr.attnum = dep.refobjsubid
|
281
|
+
AND attr.attrelid = cons.conrelid
|
282
|
+
AND attr.attnum = cons.conkey[1]
|
283
|
+
AND cons.contype = 'p'
|
284
|
+
AND dep.refobjid = '"somethings"'::regclass
|
77
285
|
|
286
|
+
[1m[36m (0.8ms)[0m [1m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
287
|
+
FROM pg_class t
|
288
|
+
INNER JOIN pg_index d ON t.oid = d.indrelid
|
289
|
+
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
290
|
+
WHERE i.relkind = 'i'
|
291
|
+
AND d.indisprimary = 'f'
|
292
|
+
AND t.relname = 'somethings'
|
293
|
+
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
294
|
+
ORDER BY i.relname
|
295
|
+
[0m
|
78
296
|
Connecting to database specified by database.yml
|
79
|
-
[1m[36m (0.
|
80
|
-
[1m[35m (
|
81
|
-
[1m[36m (
|
82
|
-
[1m[35m (
|
83
|
-
[1m[36m (
|
84
|
-
[1m[35m (
|
297
|
+
[1m[36m (0.7ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
298
|
+
[1m[35m (111.3ms)[0m DROP DATABASE IF EXISTS "translatable_test"
|
299
|
+
[1m[36m (250.5ms)[0m [1mCREATE DATABASE "translatable_test" ENCODING = 'unicode'[0m
|
300
|
+
[1m[35m (8.6ms)[0m CREATE TABLE "foos" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
301
|
+
[1m[36m (3.7ms)[0m [1mCREATE TABLE "noarraythings" ("id" serial primary key, "locales" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
302
|
+
[1m[35m (5.5ms)[0m CREATE TABLE "somethings" ("id" serial primary key, "locales" character varying(255)[], "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
303
|
+
[1m[36m (1.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) [0m
|
304
|
+
[1m[35m (3.2ms)[0m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
85
305
|
FROM pg_class t
|
86
306
|
INNER JOIN pg_index d ON t.oid = d.indrelid
|
87
307
|
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
@@ -91,6 +311,113 @@ Connecting to database specified by database.yml
|
|
91
311
|
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
92
312
|
ORDER BY i.relname
|
93
313
|
|
94
|
-
[1m[36m (1.
|
314
|
+
[1m[36m (1.4ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
95
315
|
[1m[35m (0.5ms)[0m SELECT version FROM "schema_migrations"
|
96
|
-
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('
|
316
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20130124100555')[0m
|
317
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20121015083259')
|
318
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20130124094113')[0m
|
319
|
+
Connecting to database specified by database.yml
|
320
|
+
[1m[36m (3.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) [0m
|
321
|
+
[1m[35m (2.9ms)[0m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
322
|
+
FROM pg_class t
|
323
|
+
INNER JOIN pg_index d ON t.oid = d.indrelid
|
324
|
+
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
325
|
+
WHERE i.relkind = 'i'
|
326
|
+
AND d.indisprimary = 'f'
|
327
|
+
AND t.relname = 'schema_migrations'
|
328
|
+
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
329
|
+
ORDER BY i.relname
|
330
|
+
|
331
|
+
[1m[36m (1.6ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
332
|
+
[1m[35m (0.3ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
333
|
+
Migrating to CreateSomethings (20121015083259)
|
334
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
335
|
+
[1m[35m (4.0ms)[0m CREATE TABLE "somethings" ("id" serial primary key, "locales" character varying(255)[], "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
336
|
+
[1m[36m (0.4ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20121015083259')[0m
|
337
|
+
[1m[35m (0.4ms)[0m COMMIT
|
338
|
+
Migrating to CreateFoo (20130124094113)
|
339
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
340
|
+
[1m[35m (2.4ms)[0m CREATE TABLE "foos" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
341
|
+
[1m[36m (0.4ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20130124094113')[0m
|
342
|
+
[1m[35m (0.7ms)[0m COMMIT
|
343
|
+
Migrating to CreateNoarraythings (20130124100555)
|
344
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
345
|
+
[1m[35m (3.0ms)[0m CREATE TABLE "noarraythings" ("id" serial primary key, "locales" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
346
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20130124100555')[0m
|
347
|
+
[1m[35m (1.0ms)[0m COMMIT
|
348
|
+
[1m[36m (0.6ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
349
|
+
[1m[35mPK and serial sequence (3.5ms)[0m SELECT attr.attname, seq.relname
|
350
|
+
FROM pg_class seq,
|
351
|
+
pg_attribute attr,
|
352
|
+
pg_depend dep,
|
353
|
+
pg_namespace name,
|
354
|
+
pg_constraint cons
|
355
|
+
WHERE seq.oid = dep.objid
|
356
|
+
AND seq.relkind = 'S'
|
357
|
+
AND attr.attrelid = dep.refobjid
|
358
|
+
AND attr.attnum = dep.refobjsubid
|
359
|
+
AND attr.attrelid = cons.conrelid
|
360
|
+
AND attr.attnum = cons.conkey[1]
|
361
|
+
AND cons.contype = 'p'
|
362
|
+
AND dep.refobjid = '"foos"'::regclass
|
363
|
+
|
364
|
+
[1m[36m (1.7ms)[0m [1m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
365
|
+
FROM pg_class t
|
366
|
+
INNER JOIN pg_index d ON t.oid = d.indrelid
|
367
|
+
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
368
|
+
WHERE i.relkind = 'i'
|
369
|
+
AND d.indisprimary = 'f'
|
370
|
+
AND t.relname = 'foos'
|
371
|
+
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
372
|
+
ORDER BY i.relname
|
373
|
+
[0m
|
374
|
+
[1m[35mPK and serial sequence (1.5ms)[0m SELECT attr.attname, seq.relname
|
375
|
+
FROM pg_class seq,
|
376
|
+
pg_attribute attr,
|
377
|
+
pg_depend dep,
|
378
|
+
pg_namespace name,
|
379
|
+
pg_constraint cons
|
380
|
+
WHERE seq.oid = dep.objid
|
381
|
+
AND seq.relkind = 'S'
|
382
|
+
AND attr.attrelid = dep.refobjid
|
383
|
+
AND attr.attnum = dep.refobjsubid
|
384
|
+
AND attr.attrelid = cons.conrelid
|
385
|
+
AND attr.attnum = cons.conkey[1]
|
386
|
+
AND cons.contype = 'p'
|
387
|
+
AND dep.refobjid = '"noarraythings"'::regclass
|
388
|
+
|
389
|
+
[1m[36m (0.7ms)[0m [1m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
390
|
+
FROM pg_class t
|
391
|
+
INNER JOIN pg_index d ON t.oid = d.indrelid
|
392
|
+
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
393
|
+
WHERE i.relkind = 'i'
|
394
|
+
AND d.indisprimary = 'f'
|
395
|
+
AND t.relname = 'noarraythings'
|
396
|
+
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
397
|
+
ORDER BY i.relname
|
398
|
+
[0m
|
399
|
+
[1m[35mPK and serial sequence (1.4ms)[0m SELECT attr.attname, seq.relname
|
400
|
+
FROM pg_class seq,
|
401
|
+
pg_attribute attr,
|
402
|
+
pg_depend dep,
|
403
|
+
pg_namespace name,
|
404
|
+
pg_constraint cons
|
405
|
+
WHERE seq.oid = dep.objid
|
406
|
+
AND seq.relkind = 'S'
|
407
|
+
AND attr.attrelid = dep.refobjid
|
408
|
+
AND attr.attnum = dep.refobjsubid
|
409
|
+
AND attr.attrelid = cons.conrelid
|
410
|
+
AND attr.attnum = cons.conkey[1]
|
411
|
+
AND cons.contype = 'p'
|
412
|
+
AND dep.refobjid = '"somethings"'::regclass
|
413
|
+
|
414
|
+
[1m[36m (0.7ms)[0m [1m SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid
|
415
|
+
FROM pg_class t
|
416
|
+
INNER JOIN pg_index d ON t.oid = d.indrelid
|
417
|
+
INNER JOIN pg_class i ON d.indexrelid = i.oid
|
418
|
+
WHERE i.relkind = 'i'
|
419
|
+
AND d.indisprimary = 'f'
|
420
|
+
AND t.relname = 'somethings'
|
421
|
+
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY (current_schemas(false)) )
|
422
|
+
ORDER BY i.relname
|
423
|
+
[0m
|