Class: CreateEconfig

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

Instance Method Summary collapse

Instance Method Details

#downObject



10
11
12
# File 'lib/generators/econfig/migration/templates/migration.rb', line 10

def down
  drop_table :econfig_options
end

#upObject



2
3
4
5
6
7
8
# File 'lib/generators/econfig/migration/templates/migration.rb', line 2

def up
  create_table :econfig_options do |t|
    t.string :key, :null => false
    t.string :value
  end
  add_index :econfig_options, :key, :unique => true
end