diaspora/db/migrate/20130429073928_add_tweet_id_to_post.rb
Dumitru Ursu dda5f71124 Add warning about encoding change
Add warning about MySQL collation

Fix database index length

This allows new databases to be created with utf8mb4, on MySQL. The maximum
column size is 767 bytes. Each character is 4 bytes long -> 767 / 4 = 191
characters for the column.
2015-01-19 02:19:39 +02:00

6 lines
155 B
Ruby

class AddTweetIdToPost < ActiveRecord::Migration
def change
add_column :posts, :tweet_id, :string, limit: 64
add_index :posts, :tweet_id
end
end