I have this code placed in my project's bin/rails directory:
#!/usr/bin/env ruby.exe
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'
generate migration add_physician_id_to_appointment
and I then I ran a db:migrate.
I don't think my code is placed correctly to generate a new migration
file for my database. I am trying to create a standalone migration with
the code below:
class Appointment < ActiveRecord::Migration
def change
add_column :physician_id, :integer
end
end
I am using this resource:
http://guides.rubyonrails.org/migrations.html#creating-a-standalone-migration
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f6d0d58cebaf05d310bc194cd9c8ee6b%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment