OSDN Git Service

t#:
[laoz/laoz.git] / db / migrate / 011_create_hateda_words.rb
1 class CreateHatedaWords < ActiveRecord::Migration
2   def self.up
3     create_table :hateda_words do |t|
4       t.column :word_id, :integer, :default => 0, :null => false
5       t.column :name, :string, :limit => 30
6       t.column :upload_at, :datetime
7     end
8     add_index :hateda_words, [:word_id], :unique => true
9   end
10
11   def self.down
12     drop_table :hateda_words
13   end
14 end