रेक डीबी: माइग्रेट
चल रहा है <कोड> रेक परीक्षण: इकाइयां निम्नलिखित उत्पन्न करता है:
rake test:functionals
(in /projects/my_project)
rake aborted!
SQLite3::SQLException: index unique_schema_migrations already exists: CREATE UNIQUE INDEX "unique_schema_migrations" ON "ts_schema_migrations" ("version")
db/schema.rb
का प्रासंगिक भाग इस प्रकार है:
create_table "ts_schema_migrations", :id => false, :force => true do |t|
t.string "version", :null => false
end
add_index "ts_schema_migrations", ["version"], :name => "unique_schema_migrations", :unique => true
मैं मैन्युअल रूप से कहीं भी इस इंडेक्स को नहीं बदल रहा हूं, और मैं एक ब्रांड नए डेटाबेस के साथ रेल के डिफ़ॉल्ट SQLite3 एडाप्टर का उपयोग कर रहा हूं। (यानी, rm db/* sqlite3
चल रहा है रेक डीबी: माइग्रेट
मदद नहीं करता है।)
क्या test: इकाइयां
कार्य शायद स्कीमा को फिर से लोड करने का प्रयास कर रहा है? यदि हां, तो क्यों? क्या यह स्कीमा को पहले से अद्यतित नहीं करना चाहिए?