i keep getting error message: -- add_column(:articles, :user_id, :integer) rake aborted! StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: duplicate column name: user_id: ALTER TABLE "articles" ADD "user_id" integer
here are All the migration i made:
class AddUserIdToArticles < ActiveRecord::Migration
def change
add_column :articles, :user_id, :integer
end
end
class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :username
t.string :email
t.timestamps
end
end
end
class AddDescriptionToArticles < ActiveRecord::Migration
def change
add_column :articles, :description, :text
add_column :articles, :created_at, :datetime
add_column :articles, :updated_at, :datetime
end
end
class CreateArticles < ActiveRecord::Migration
def change
create_table :articles do |t|
t.string :title
end
end
end