OSDN Git Service

update speech and balloon
[pettanr/pettanr.git] / db / migrate / 20111206130635_create_speeches.rb
index 9d9d174..f93f9c5 100644 (file)
@@ -1,18 +1,16 @@
 class CreateSpeeches < ActiveRecord::Migration
   def change
     create_table :speeches do |t|
-      t.integer :balloon_id, :null => false
-      t.integer :speech_template_id, :null => false
+      t.integer :speech_balloon_id, :null => false
       t.string :content
       t.integer :x, :null => false
       t.integer :y, :null => false
-      t.integer :t, :null => false, :default => 1
       t.integer :width, :null => false
       t.integer :height, :null => false
+      t.string :settings
 
       t.timestamps
     end
-    add_index :speeches, [:balloon_id]
-    add_index :speeches, [:balloon_id, :t], :unique => true, :name => 'speeches_bt'
+    add_index :speeches, [:speech_balloon_id]
   end
 end