पर देवता माइग्रेशन मैं एथलॉगिक से डेविस तक माइग्रेट कर रहा हूं।मौजूदा मॉडल
UPDATED:
वसीयत के प्रवास तालिका उन फिर से बनाने की कोशिश करता है, तो मैं बदल के रूप में आप create_table नीचे देख सकते हैं change_table और अंत में टेबल ड्रॉप दूर करने के लिए मैं क्या जोड़ने के लिए
समस्या यह है कि जब मैं रेक चलाता हूं तो मुझे एक त्रुटि मिलती है।
रेक चलाने पर मुझे यह त्रुटि मिलती है।
== DeviseCreateUsers: migrating ==============================================
-- change_table(:users)
rake aborted!
An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: duplicate column name: email: ALTER TABLE "users" ADD "email" varchar(255) DEFAULT '' NOT NULL
इस प्रवास
class DeviseCreateUsers < ActiveRecord::Migration
def self.up
change_table(:users) do |t|
t.database_authenticatable :null => false
t.recoverable
t.rememberable
t.trackable
# t.confirmable
# t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
# t.token_authenticatable
t.timestamps
end
add_index :users, :email, :unique => true
add_index :users, :reset_password_token, :unique => true
# add_index :users, :confirmation_token, :unique => true
# add_index :users, :unlock_token, :unique => true
end
def self.down
remove_column :users, :database_authenticatable
remove_column :users, :recoverable
remove_column :users, :rememberable
remove_column :users, :trackable
remove_index :users, :email
remove_index :users, :reset_password_token
end
end
मेरी schema.rb में मैं पहले से ही Authlogic से है।
create_table "users", :force => true do |t|
t.string "username"
t.string "email"
t.string "crypted_password"
t.string "password_salt"
t.string "persistence_token"
मैं इसे संघर्ष के कुछ प्रकार है कि मैं महसूस करने के लिए उन लोगों के साथ सहायकों
धन्यवाद वसीयत से बचने के लिए कैसे नहीं पा रहा हूँ देखता है लगता है!
मॉडल में सहेजे गए डिवाइसेज गुण कृपया जमुरा के उत्तर को सही के रूप में चिह्नित करें। अन्यथा यह प्रश्न "अनुत्तरित प्रश्न सूची" में दिखाई देता है। – kikito