-class CreateBalloonTemplates < ActiveRecord::Migration
- def change
- create_table :balloon_templates do |t|
- t.integer :speech_balloon_id, :null => false
- t.integer :system_picture_id, :null => false
- t.integer :tail, :null => false, :default => 1
- t.integer :size, :null => false, :default => 1
- t.integer :min_width, :null => false, :default => 0
- t.integer :max_width, :null => false, :default => 0
- t.integer :min_height, :null => false, :default => 0
- t.integer :max_height, :null => false, :default => 0
-
- t.timestamps
- end
- add_index :balloon_templates, [:speech_balloon_id]
- add_index :balloon_templates, [:speech_balloon_id, :tail, :size], :unique => true, :name => 'balloon_templates_idts'
- end
-end