OSDN Git Service

speech balloon template changed
[pettanr/pettanr.git] / db / migrate / 20120424100555_create_speech_balloon_templates.rb
index 66e05d6..15dc922 100644 (file)
@@ -1,8 +1,15 @@
 class CreateSpeechBalloonTemplates < ActiveRecord::Migration
   def change
     create_table :speech_balloon_templates do |t|
+      t.string :name, :null => false, :limit => 50
+      t.string :classname, :null => false, :limit => 50
+      t.string :caption, :null => false, :limit => 30
+      t.integer :t, :null => false, :default => 0
+      t.string :settings, :null => false
 
       t.timestamps
     end
+    add_index :speech_balloon_templates, [:name], :unique => true, :name => 'speech_balloon_templates_name'
+    add_index :speech_balloon_templates, [:t], :unique => true, :name => 'speech_balloon_templates_t'
   end
 end