OSDN Git Service

speach rename to speech
[pettanr/pettanr.git] / db / migrate / 20111206130635_create_speeches.rb
1 class CreateSpeeches < ActiveRecord::Migration
2   def change
3     create_table :speeches do |t|
4       t.integer :balloon_id, :null => false
5       t.integer :speech_template_id, :null => false
6       t.string :content
7       t.integer :x, :null => false
8       t.integer :y, :null => false
9       t.integer :t, :null => false, :default => 1
10       t.integer :width, :null => false
11       t.integer :height, :null => false
12
13       t.timestamps
14     end
15     add_index :speeches, [:balloon_id]
16     add_index :speeches, [:balloon_id, :t], :unique => true, :name => 'speeches_bt'
17   end
18 end