Class: CreateBusinesses

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/reso/templates/create_businesses.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/generators/reso/templates/create_businesses.rb', line 2

def change
  create_table :businesses, options: 'DEFAULT CHARSET=utf8' do |t|
    t.string :name, null: false
    t.string :type, null: false
    t.string :phone
    t.string :fax
    t.string :email
    t.string :website_url
    t.string :logo_url
    t.string :business_additional_information

    t.timestamps
  end
  add_index :businesses, :name
  add_index :businesses, :type
end