Sha256: deae252d606bf69adfc7b07c27d64a9f7d9e1aac7614b73640ba496931aa604c

Contents?: true

Size: 680 Bytes

Versions: 3

Compression:

Stored size: 680 Bytes

Contents

class CreateWorkers < ActiveRecord::Migration
  def change
    create_table :workers do |t|
      t.string :name
      t.string :detail_type
      t.integer :detail_id
      t.timestamps
    end

    create_table :plumbers do |t|
      t.boolean :has_wrench
      t.timestamps
    end

    create_table :gardeners do |t|
      t.boolean :has_shovel
      t.timestamps
    end

    create_table :electricians do |t|
      t.boolean :certified
      t.timestamps
    end

    create_table :contracts do |t|
      t.belongs_to :worker
      t.timestamps
    end

    create_table :tweets do |t|
      t.belongs_to :worker
      t.string :message
      t.timestamps
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cache_debugging-0.1.1 test/dummy/db/migrate/20130910001826_create_workers.rb
cache_debugging-0.1.0 test/dummy/db/migrate/20130910001826_create_workers.rb
cache_debugging-0.0.1 test/dummy/db/migrate/20130910001826_create_workers.rb