Skip to content

Instantly share code, notes, and snippets.

@nertim
Last active December 14, 2015 02:38
Show Gist options
  • Save nertim/5014613 to your computer and use it in GitHub Desktop.
Save nertim/5014613 to your computer and use it in GitHub Desktop.
class AddSchedulingAppointmentStatuses < ActiveRecord::Migration
def change
create_table :AppointmentStatus do |t|
t.string :code, :limit => 1, :null => false, :unique => true
t.string :descrip, :limit => 30, :null => false
t.timestamps
end
add_index :AppointmentStatus, [:code], :unique => true
AppointmentStatus.create(:code => 'S', :description => 'Scheduled')
AppointmentStatus.create(:code => 'I', :description => 'Checked In')
AppointmentStatus.create(:code => 'O', :description => 'At Resource')
AppointmentStatus.create(:code => 'C', :description => 'Checked Out')
AppointmentStatus.create(:code => 'N', :description => 'No Show')
AppointmentStatus.create(:code => 'T', :description => 'Tentative')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment