rake db:migrate
रन Execute db:schema:dump
मेरा आउटपुट सभी खराब हो गया है (एसक्यूएल दिखा रहा है)।विषम रेक डीबी: माइग्रेट आउटपुट
इस तरह लग रहा है:
ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
(3.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
FROM pg_constraint c
JOIN pg_class t1 ON c.conrelid = t1.oid
JOIN pg_class t2 ON c.confrelid = t2.oid
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
JOIN pg_namespace t3 ON c.connamespace = t3.oid
WHERE c.contype = 'f'
AND t1.relname = 'accounts'
AND t3.nspname = ANY (current_schemas(false))
ORDER BY c.conname
(3.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
FROM pg_constraint c
JOIN pg_class t1 ON c.conrelid = t1.oid
JOIN pg_class t2 ON c.confrelid = t2.oid
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
JOIN pg_namespace t3 ON c.connamespace = t3.oid
WHERE c.contype = 'f'
AND t1.relname = 'deliveries'
AND t3.nspname = ANY (current_schemas(false))
ORDER BY c.conname
(3.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
FROM pg_constraint c
JOIN pg_class t1 ON c.conrelid = t1.oid
JOIN pg_class t2 ON c.confrelid = t2.oid
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
JOIN pg_namespace t3 ON c.connamespace = t3.oid
WHERE c.contype = 'f'
AND t1.relname = 'posts'
AND t3.nspname = ANY (current_schemas(false))
ORDER BY c.conname
ट्रेस यह दिखाता है:
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
** Invoke db:_dump (first_time)
** Execute db:_dump
** Invoke db:schema:dump (first_time)
** Invoke environment
** Invoke db:load_config
** Execute db:schema:dump
यह एक रेल 4.1.6 उन्नयन 4.2.0 रेल के बाद शुरू कर दिया।
ऐसा क्यों हो रहा है?
समस्या क्या है? स्कीमा डम्पर अपडेट 'schema.rb' और उन सभी फंकी दिखने वाले प्रश्नों का उपयोग टेबल संरचनाओं को समझने के लिए किया जाता है। –
@mu यह हर बार होता है जब मैं रेक डीबी चलाता हूं: माइग्रेट करें ... अगर माइग्रेशन चालू हैं तो मुझे कुछ भी होने की उम्मीद नहीं है। मुझे समझ में नहीं आता कि मैं यह आउटपुट क्यों देखता हूं ... – fyz
यह हमेशा 'first_time' – fyz