db: Fixed the migration of the database.
The limit down to 127 is needed cause of a long time bug in mysql. The error message looks like this when creating an index. Mysql2::Error: Specified key was too long; max key length is 1000 bytes So with utf8 (3 bytes for one char) you exceed this with two varchar(255). See http://bugs.mysql.com/bug.php?id=4541
This commit is contained in:
parent
693ad112ba
commit
2ddd810dea
2 changed files with 8 additions and 8 deletions
|
|
@ -105,8 +105,8 @@ class CreateSchema < ActiveRecord::Migration
|
|||
|
||||
create_table :profiles do |t|
|
||||
t.string :diaspora_handle
|
||||
t.string :first_name
|
||||
t.string :last_name
|
||||
t.string :first_name, :limit => 127
|
||||
t.string :last_name, :limit => 127
|
||||
t.string :image_url
|
||||
t.string :image_url_small
|
||||
t.string :image_url_medium
|
||||
|
|
|
|||
|
|
@ -95,8 +95,8 @@ class CreateImportTables < ActiveRecord::Migration
|
|||
add_index :mongo_invitations, :sender_mongo_id
|
||||
create_table :mongo_notifications do |t|
|
||||
t.string :mongo_id
|
||||
t.string :target_type
|
||||
t.string :target_mongo_id
|
||||
t.string :target_type, :limit => 127
|
||||
t.string :target_mongo_id, :limit => 127
|
||||
t.string :recipient_mongo_id
|
||||
t.string :actor_mongo_id
|
||||
t.string :action
|
||||
|
|
@ -114,8 +114,8 @@ class CreateImportTables < ActiveRecord::Migration
|
|||
|
||||
create_table :mongo_profiles do |t|
|
||||
t.string :diaspora_handle
|
||||
t.string :first_name
|
||||
t.string :last_name
|
||||
t.string :first_name, :limit => 127
|
||||
t.string :last_name, :limit => 127
|
||||
t.string :image_url
|
||||
t.string :image_url_small
|
||||
t.string :image_url_medium
|
||||
|
|
@ -134,8 +134,8 @@ class CreateImportTables < ActiveRecord::Migration
|
|||
|
||||
create_table :mongo_requests do |t|
|
||||
t.string :mongo_id
|
||||
t.string :sender_mongo_id
|
||||
t.string :recipient_mongo_id
|
||||
t.string :sender_mongo_id, :limit => 127
|
||||
t.string :recipient_mongo_id, :limit => 127
|
||||
t.string :aspect_mongo_id
|
||||
t.timestamps
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue