go2null / redmine_account_policy

Password Expiry and other enhancements
GNU General Public License v3.0
4 stars 13 forks source link

Plugins installation failed with mysql database #30

Open Papac85 opened 8 years ago

Papac85 commented 8 years ago

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)

jcormier commented 6 years ago

Ran into this problem as well.

jcormier commented 6 years ago

@Papac85 fix was required to successfully install plugin.