Sha256: cab1cab209828e0b987d362b111a0efdb9a735fa459b437ce64fa2fb15489f1c

Contents?: true

Size: 696 Bytes

Versions: 1

Compression:

Stored size: 696 Bytes

Contents

class CreatePeopleAndCities < ActiveRecord::Migration
  def change
    create_table :countries do |t|
      t.string :name, :null => false
      t.string :code, :null => :false, :limit => 3
    end
    
    create_table :cities do |t|
      t.string :name, :null => false
      t.integer :country_id, :null => false
    end

    create_table :people do |t|
      t.string :name, :null => false
      t.integer :children
      t.integer :city_id
      t.float :rating
      t.decimal :income, :precision => 14, :scale => 2
      t.date :birthdate
      t.time :gets_up_at
      t.datetime :last_seen
      t.text :remarks
      t.boolean :cool, :null => false, :default => false
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dry_crud-1.5.0 test/templates/db/migrate/20100511174904_create_people_and_cities.rb