I have a rails migration that is not being applied to my schema.rb. The migration should create a table:
class CreateUserGraphs < ActiveRecord::Migration
def change
create_table :user_graphs do |t|
t.string :name
t.string :content
t.integer :user_id
t.string :type_id
t.integer :upload_id
t.timestamps
end
add_index :user_graphs, [:user_id, :created_at]
end
end
I did db:reset. Then I tried rake db:migrate:up VERSION=123123123(this is the migration #). I am in my "dev" environment.
Why is the migration not affecting schema.rb?
rake db:drop db:create db:migrate
– Vuckorake db:drop db:create
differ fromrake db:reset
? – Don Prake db:reset
runsdb:create db:schema:load db:seed
without the migrations. I think thatdb:migrate:reset
will suit your needs. – Vucko