Sha256: 47340dae7f60cec97a7a259a69ff1e4d281064569196c6e5516458d7ce789289

Contents?: true

Size: 405 Bytes

Versions: 1

Compression:

Stored size: 405 Bytes

Contents

require_relative './migration_helper'

class CreateSpaceShips < MigrationHelper.migration_base_class
  def change
    create_table :space_ships do |t|
      t.references :vehicle

      t.references :category
      t.boolean :single_use

      t.timestamps
    end
    
    add_foreign_key(:space_ships, :vehicles)
    add_foreign_key(:space_ships, :categories)
    cti_create_view('SpaceShip')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dbview_cti-0.2.3 spec/dummy-rails-3/db/migrate/20130816022212_create_space_ships.rb