1 class CreateSpeaches < ActiveRecord::Migration
3 create_table :speaches do |t|
4 t.integer :balloon_id, :null => false
5 t.integer :speach_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 :speaches, [:balloon_id]
16 add_index :speaches, [:balloon_id, :t], :unique => true, :name => 'speaches_bt'