Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins installation failed with mysql database #30

Open
Papac85 opened this issue Aug 13, 2016 · 2 comments
Open

Plugins installation failed with mysql database #30

Papac85 opened this issue Aug 13, 2016 · 2 comments

Comments

@Papac85
Copy link

Papac85 commented Aug 13, 2016

When running command rake redmine:plugins:migrate RAILS_ENV=production we get following error

Migrating redmine_account_policy (Redmine Account Policy plugin)...
== 1 AddOldHashedPasswordsToUsers: migrating ==================================
-- add_column(:users, :old_hashed_passwords, :string, {:null=>true, :limit=>3968})
-> 0.1325s
== 1 AddOldHashedPasswordsToUsers: migrated (0.1326s) =========================

== 2 AddOldSaltsToUsers: migrating ============================================
-- add_column(:users, :old_salts, :string, {:null=>true, :limit=>59520})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: Column length too big for column 'old_salts' (max = 21845); use BLOB or TEXT instead: ALTER TABLE users ADD old_salts varchar(59520)
/var/www/redmine-3.3.0/plugins/redmine_account_policy/db/migrate/002_add_old_salts_to_users.rb:8:in change' /var/www/redmine-3.3.0/lib/redmine/plugin.rb:481:inmigrate_plugin'
/var/www/redmine-3.3.0/lib/redmine/plugin.rb:453:in migrate' /var/www/redmine-3.3.0/lib/redmine/plugin.rb:467:inblock in migrate'
/var/www/redmine-3.3.0/lib/redmine/plugin.rb:466:in each' /var/www/redmine-3.3.0/lib/redmine/plugin.rb:466:inmigrate'
/var/www/redmine-3.3.0/lib/tasks/redmine.rake:127:in block (3 levels) in <top (required)>' ActiveRecord::StatementInvalid: Mysql2::Error: Column length too big for column 'old_salts' (max = 21845); use BLOB or TEXT instead: ALTER TABLEusersADDold_saltsvarchar(59520) /var/www/redmine-3.3.0/plugins/redmine_account_policy/db/migrate/002_add_old_salts_to_users.rb:8:inchange'
/var/www/redmine-3.3.0/lib/redmine/plugin.rb:481:in migrate_plugin' /var/www/redmine-3.3.0/lib/redmine/plugin.rb:453:inmigrate'
/var/www/redmine-3.3.0/lib/redmine/plugin.rb:467:in block in migrate' /var/www/redmine-3.3.0/lib/redmine/plugin.rb:466:ineach'
/var/www/redmine-3.3.0/lib/redmine/plugin.rb:466:in migrate' /var/www/redmine-3.3.0/lib/tasks/redmine.rake:127:inblock (3 levels) in <top (required)>'
Mysql2::Error: Column length too big for column 'old_salts' (max = 21845); use BLOB or TEXT instead
/var/www/redmine-3.3.0/plugins/redmine_account_policy/db/migrate/002_add_old_salts_to_users.rb:8:in change' /var/www/redmine-3.3.0/lib/redmine/plugin.rb:481:inmigrate_plugin'
/var/www/redmine-3.3.0/lib/redmine/plugin.rb:453:in migrate' /var/www/redmine-3.3.0/lib/redmine/plugin.rb:467:inblock in migrate'
/var/www/redmine-3.3.0/lib/redmine/plugin.rb:466:in each' /var/www/redmine-3.3.0/lib/redmine/plugin.rb:466:inmigrate'
/var/www/redmine-3.3.0/lib/tasks/redmine.rake:127:in `block (3 levels) in <top (required)>'
Tasks: TOP => redmine:plugins:migrate
(See full trace by running task with --trace)

Papac85 added a commit to Papac85/redmine_account_policy that referenced this issue Aug 13, 2016
@jcormier
Copy link

Ran into this problem as well.

@jcormier
Copy link

@Papac85 fix was required to successfully install plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants