diaspora/db/migrate/20140801101352_create_chat_fragments.rb
Dumitru Ursu 28fdba5d89 Shorten indexes
Fix merge conflict
2015-01-20 22:41:52 +02:00

17 lines
525 B
Ruby

class CreateChatFragments < ActiveRecord::Migration
def up
create_table :chat_fragments do |t|
t.integer :user_id, null: false
t.string :root, limit: 256, null: false
t.string :namespace, limit: 256, null: false
t.text :xml, null: false
end
# That won't work due UTF-8 and the limit of 767 bytes
#add_index :chat_fragments, [:user_id, :root, :namespace], unique: true
add_index :chat_fragments, [:user_id], unique: true
end
def down
drop_table :chat_fragments
end
end