Class: CreateIdsRules

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/db/migrations/006_create_ids_rules.rb

Class Method Summary collapse

Class Method Details

.downObject



12
13
14
# File 'lib/db/migrations/006_create_ids_rules.rb', line 12

def self.down
  drop_table :ids_rules
end

.upObject



2
3
4
5
6
7
8
9
10
# File 'lib/db/migrations/006_create_ids_rules.rb', line 2

def self.up
  create_table :ids_rules do |t|
    t.integer :sort
    t.text :rule_text
    t.string :rule_hash
    t.timestamps
  end
  add_index :ids_rules, :rule_hash,:unique => true
end