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.
6 lines
155 B
Ruby
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
|