मैं एक मॉडल रूबी स्क्रिप्ट/मॉडल अनुच्छेद (सरल enuff) उत्पन्नजब मैं रेक चलाएँ: db विस्थापित आदेश मैं एक त्रुटि "शुरू नहीं किए गए लगातार CreateArticles" मिल
यहाँ माइग्रेशन फ़ाइल create_articles.rb है बनाया:
def self.up
create_table :articles do |t|
t.column :user_id, :integer
t.column :title, :string
t.column :synopsis, :text, :limit => 1000
t.column :body, :text, :limit => 20000
t.column :published, :boolean, :default => false
t.column :created_at, :datetime
t.column :updated_at, :datetime
t.column :published_at, :datetime
t.column :category_id, :integer
end
def self.down
drop_table :articles
end
end
जब मैं रेक चलाता हूं: डीबी माइग्रेट कमांड मुझे एक त्रुटि रेक छोड़ दिया जाता है! "अनियमित निरंतर CreateArticles।"
क्या किसी को पता है कि यह त्रुटि क्यों चल रही है?
आपकी माइग्रेशन फ़ाइल का नाम क्या है और आपकी कक्षा घोषणा किस तरह दिखती है? – thetacom
2000106022023_create_articles.rb (माइग्रेशन फ़ाइल) ^ यह उपर्युक्त (वर्ग घोषणा) – featureBlend
जैसा नहीं होगा, आपकी कक्षा घोषणा उपर्युक्त सभी को संलग्न करनी चाहिए और ऐसा कुछ दिखाना चाहिए: क्लास CreateMyModel
thetacom