Browse Source

Add elements to the employee model

master
jimi 16 years ago
committed by jimi
parent
commit
fef64edc1e
  1. 17
      db/migrate/20090311181424_add_address_to_employee.rb
  2. 17
      db/migrate/20090311181736_add_truck_info_to_employee.rb
  3. 12
      db/schema.rb

17
db/migrate/20090311181424_add_address_to_employee.rb

@ -0,0 +1,17 @@
class AddAddressToEmployee < ActiveRecord::Migration
def self.up
add_column :people, :street, :string
add_column :people, :city, :string
add_column :people, :state, :string
add_column :people, :zip, :string
add_column :people, :phone, :string
end
def self.down
remove_column :people, :phone
remove_column :people, :zip
remove_column :people, :state
remove_column :people, :city
remove_column :people, :street
end
end

17
db/migrate/20090311181736_add_truck_info_to_employee.rb

@ -0,0 +1,17 @@
class AddTruckInfoToEmployee < ActiveRecord::Migration
def self.up
add_column :people, :dl_number, :string
add_column :people, :dl_state, :string
add_column :people, :dl_expire, :date
add_column :people, :truck, :string
add_column :people, :trailer, :string
end
def self.down
remove_column :people, :trailer
remove_column :people, :truck
remove_column :people, :dl_expire
remove_column :people, :dl_state
remove_column :people, :dl_number
end
end

12
db/schema.rb

@ -9,7 +9,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20090311052854) do
ActiveRecord::Schema.define(:version => 20090311181736) do
create_table "loads", :force => true do |t| create_table "loads", :force => true do |t|
t.string "number" t.string "number"
@ -34,6 +34,16 @@ ActiveRecord::Schema.define(:version => 20090311052854) do
t.string "tax_status" t.string "tax_status"
t.integer "dependents", :default => 0 t.integer "dependents", :default => 0
t.decimal "payrate", :precision => 4, :scale => 2, :default => 0.25 t.decimal "payrate", :precision => 4, :scale => 2, :default => 0.25
t.string "street"
t.string "city"
t.string "state"
t.string "zip"
t.string "phone"
t.string "dl_number"
t.string "dl_state"
t.date "dl_expire"
t.string "truck"
t.string "trailer"
end end
end end