instructure/canvas-lms — Issue #136: production install mysql error migration 
Author: adolfo2103
Created: 2012-01-24 14:28:09+00:00
State: open

when I try to install mysql canvas stable version I encounter this error when running the command $ RAILS_ENV = production GEM_HOME / bin / exec bundle rake db: initial_setup

$ GEM_HOME / bin / exec bundle rake db: migrate
WARNING: 'require' rake / rdoctask''is deprecated. Please use 'require' rdoc / task '(in RDoc 2.4.2 +)' instead.
at / var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
Please install RDoc 2.4.2 + to generate documentation.
Jammit Warning: Asset compression disabled - Java unavailable.
== InstallCustomFields: migrating ============================================
- Create_table (: custom_fields, {: force => true})
-> 0.0053s
- Add_index (: custom_fields, ["scoper_type", "scoper_id", "target_type", "name"])
-> 0.0001s
- Create_table (: custom_field_values, {: force => true})
-> 0.0158s
== InstallCustomFields: migrated (0.0215s) ===================================

== InitCanvasDb: migrating ============================================= ======
- Create_table ("abstract_courses", {: force => true})
-> 0.0050s
- Add_index ("abstract_courses", ["college_id"], {: name => "index_abstract_courses_on_college_id"})
-> 0.0076s
- Add_index ("abstract_courses", ["department_id"], {: name => "index_abstract_courses_on_department_id"})
-> 0.0040s
- Add_index ("abstract_courses", ["root_account_id", "sis_source_id"], {: name => "index_abstract_courses_on_root_account_id_and_sis_source_id"})
-> 0.0161s
- Add_index ("abstract_courses", ["sis_source_id"], {: name => "index_abstract_courses_on_sis_source_id"})
-> 0.0079s
- Create_table ("account_authorization_configs", {: force => true})
-> 0.0049s
- Add_index ("account_authorization_configs", ["account_id"], {: name => "index_account_authorization_configs_on_account_id"})
-> 0.0298s
- Create_table ("account_reports")
-> 0.0049s
- Create_table ("account_users", {: force => true})
-> 0.0038s
- Add_index ("account_users", ["account_id"], {: name => "index_account_users_on_account_id"})
-> 0.0062s
- Add_index ("account_users", ["user_id"], {: name => "index_account_users_on_user_id"})
-> 0.0043s
- Create_table ("accounts", {: force => true})
-> 0.0073s
- Add_index ("accounts", ["id", "type"], {: name => "index_accounts_on_id_and_type"})
-> 0.0126s
- Add_index ("accounts", ["name", "parent_account_id"], {: name => "index_accounts_on_name_and_parent_account_id"})
-> 0.0079s
- Add_index ("accounts", ["parent_account_id", "root_account_id"], {: name => "index_accounts_on_parent_account_id_and_root_account_id"})
-> 0.0101s
- Add_index ("accounts", ["root_account_id", "sis_source_id"], {: name => "index_accounts_on_root_account_id_and_sis_source_id"})
-> 0.0152s
- Add_index ("accounts", ["sis_source_id"], {: name => "index_accounts_on_sis_source_id"})
-> 0.0202s
- Add_index ("accounts", ["type"], {: name => "index_accounts_on_type"})
-> 0.0071s
- Create_table ("assessment_question_bank_users", {: force => true})
-> 0.0212s
- Add_index ("assessment_question_bank_users", ["assessment_question_bank_id"], {: name => "assessment_qbu_aqb_id"})
-> 0.0039s
- Add_index ("assessment_question_bank_users", ["user_id"], {: name => "assessment_qbu_u_id"})
-> 0.0037s
- Create_table ("assessment_question_banks", {: force => true})
-> 0.0210s
- Add_index ("assessment_question_banks", ["context_id", "context_type"], {: name => "index_on_aqb_on_context_id_and_context_type"})
-> 0.0037s
- Create_table ("assessment_questions", {: force => true})
-> 0.0057s
- Add_index ("assessment_questions", ["assessment_question_bank_id", "position"], {: name => "question_bank_id_and_position"})
-> 0.0046s
- Add_index ("assessment_questions", ["context_id", "context_type"], {: name => "index_assessment_questions_on_context_id_and_context_type"})
-> 0.0154s
- Create_table ("assessment_requests", {: force => true})
-> 0.0121s
- Add_index ("assessment_requests", ["assessor_asset_id", "assessor_asset_type"], {: name => "aa_id_and_aa_type"})
-> 0.0043s
- Add_index ("assessment_requests", ["assessor_id"], {: name => "index_assessment_requests_on_assessor_id"})
-> 0.0044s
- Add_index ("assessment_requests", ["asset_id", "asset_type"], {: name => "index_assessment_requests_on_asset_id_and_asset_type"})
-> 0.0080s
- Add_index ("assessment_requests", ["rubric_assessment_id"], {: name => "index_assessment_requests_on_rubric_assessment_id"})
-> 0.0046s
- Add_index ("assessment_requests", ["rubric_association_id"], {: name => "index_assessment_requests_on_rubric_association_id"})
-> 0.0046s
- Add_index ("assessment_requests", ["user_id"], {: name => "index_assessment_requests_on_user_id"})
-> 0.0146s
- Create_table ("asset_user_accesses", {: force => true})
-> 0.0054s
- Add_index ("asset_user_accesses", ["context_id", "context_type"], {: name => "index_asset_user_accesses_on_context_id_and_context_type"})
-> 0.0038s
- Add_index ("asset_user_accesses", ["user_id", "asset_code"], {: name => "index_asset_user_accesses_on_user_id_and_asset_code"})
-> 0.0039s
- Create_table ("assignment_groups", {: force => true})
-> 0.0048s
- Add_index ("assignment_groups", ["cloned_item_id"], {: name => "index_assignment_groups_on_cloned_item_id"})
-> 0.0038s
- Add_index ("assignment_groups", ["context_code"], {: name => "index_assignment_groups_on_context_code"})
-> 0.0037s
- Add_index ("assignment_groups", ["context_id", "context_type"], {: name => "index_assignment_groups_on_context_id_and_context_type"})
-> 0.0043s
- Create_table ("assignment_reminders", {: force => true})
-> 0.0042s
- Add_index ("assignment_reminders", ["assignment_id"], {: name => "index_assignment_reminders_on_assignment_id"})
-> 0.0044s
- Add_index ("assignment_reminders", ["user_id"], {: name => "index_assignment_reminders_on_user_id"})
-> 0.0043s
- Create_table ("assignments", {: force => true})
-> 0.0299s
- Add_index ("assignments", ["assignment_group_id"], {: name => "index_assignments_on_assignment_group_id"})
-> 0.0089s
- Add_index ("assignments", ["cloned_item_id"], {: name => "index_assignments_on_cloned_item_id"})
-> 0.0063s
- Add_index ("assignments", ["context_code"], {: name => "index_assignments_on_context_code"})
-> 0.0201s
- Add_index ("assignments", ["context_id", "context_type"], {: name => "index_assignments_on_context_id_and_context_type"})
-> 0.0068s
- Add_index ("assignments", ["due_at", "context_code"], {: name => "index_assignments_on_due_at_and_context_code"})
-> 0.0049s
- Add_index ("assignments", ["grading_standard_id"], {: name => "index_assignments_on_grading_standard_id"})
-> 0.0049s
- Add_index ("assignments", ["workflow_state"], {: name => "index_assignments_on_workflow_state"})
-> 0.0147s
- Create_table ("attachment_associations", {: force => true})
-> 0.0064s
- Add_index ("attachment_associations", ["attachment_id"], {: name => "index_attachment_associations_on_attachment_id"})
-> 0.0101s
- Add_index ("attachment_associations", ["context_id", "context_type"], {: name => "attachment_associations_a_id_a_type"})
-> 0.0067s
- Create_table ("attachments", {: force => true})
-> 0.0291s
- Add_index ("attachments", ["cloned_item_id"], {: name => "index_attachments_on_cloned_item_id"})
-> 0.0082s
- Add_index ("attachments", ["context_id", "context_type"], {: name => "index_attachments_on_context_id_and_context_type"})
-> 0.0083s
- Add_index ("attachments", ["enrollment_id"], {: name => "index_attachments_on_enrollment_id"})
-> 0.0050s
- Add_index ("attachments", ["folder_id"], {: name => "index_attachments_on_folder_id"})
-> 0.0054s
- Add_index ("attachments", ["md5", "namespace"], {: name => "index_attachments_on_md5_and_namespace"})
rake aborted!
An error has occurred, all later migrations canceled:

Mysql:: Error: Specified key WAS too long, max key length is 1000 bytes: CREATE INDEX `ON` index_attachments_on_md5_and_namespace `attachments` (`md5`, `namespace`)