1 class CreateSpeeches < ActiveRecord::Migration
3 create_table :speeches do |t|
4 t.integer :balloon_id, :null => false
5 t.integer :speech_template_id, :null => false
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
15 add_index :speeches, [:balloon_id]
16 add_index :speeches, [:balloon_id, :t], :unique => true, :name => 'speeches_bt'