Project

General

Profile

Bug #5427

Issuing rake tasks for update from 1.4 to 1.5 fails

Added by Marc Richter almost 5 years ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DB migrations
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

I just followed the upgrade instructions at http://theforeman.org/manuals/1.5/index.html#3.6Upgrade . When issuing the "foreman-rake db:migrate" task, this fails:

[root@monitor foreman]# ruby193-rake db:migrate RAILS_ENV=production
==  ExtendUserRole: migrating =================================================
-- remove_foreign_key("user_roles", {:name=>"user_roles_user_id_fk"})
rake aborted!
An error has occurred, all later migrations canceled:

Mysql2::Error: Error on rename of './foreman@002dpuppet/user_roles' to './foreman@002dpuppet/#sql2-513-3d' (errno: 152): ALTER TABLE `user_roles` DROP FOREIGN KEY `user_roles_user_id_fk`

Tasks: TOP => db:migrate
(See full trace by running task with --trace)
[root@monitor foreman]#

Related issues

Has duplicate Foreman - Bug #5480: Extend user role migration fails on MysqlDuplicate2014-04-28

Associated revisions

Revision 90f0a0b0 (diff)
Added by Dominic Cleal almost 5 years ago

fixes #5427 - skip user roles FK removal if it's missing

Revision cc847871 (diff)
Added by Dominic Cleal almost 5 years ago

fixes #5427 - skip user roles FK removal if it's missing

(cherry picked from commit 90f0a0b0b85ec589a8951b5bc0cddf7499bfc186)

History

#1 Updated by Dominic Cleal almost 5 years ago

  • Category set to DB migrations

I suspect this could happen if FKs weren't originally added due to a DB migration (e.g. from sqlite) or the old "mysql" adapter was in use when our FKs were originally added, then it was changed to "mysql2" in 1.4 (as "mysql" didn't support FKs).

We should add a check for existence of FKs before removal.

Please comment out the remove_foreign_key line in db/migrate/20131114084718_extend_user_role.rb as a workaround.

#2 Updated by Dominic Cleal almost 5 years ago

  • Target version set to 1.8.3

#3 Updated by Marc Richter almost 5 years ago

Hi Dominic, thanks for the ultra-fast response!

This seems to have done the trick. After commenting that line out, everything seems to be fine and I get the following:

[root@monitor foreman]# ruby193-rake db:migrate RAILS_ENV=production
==  ExtendUserRole: migrating =================================================
-- add_column(:user_roles, :owner_type, :string, {:default=>"User", :null=>false})
   -> 0.2804s
-- rename_column(:user_roles, :user_id, :owner_id)
   -> 0.0637s
-- add_index(:user_roles, :owner_type)
   -> 0.0377s
-- add_index(:user_roles, :owner_id)
   -> 0.0339s
-- add_index(:user_roles, [:owner_id, :owner_type])
   -> 0.0430s
-- change_column(:user_roles, :owner_id, :integer, {:null=>false})
   -> 0.1113s
==  ExtendUserRole: migrated (0.5713s) ========================================

==  CreateCachedUserRoles: migrating ==========================================
-- create_table(:cached_user_roles)
   -> 0.0103s
-- add_index(:cached_user_roles, :user_id)
   -> 0.0451s
-- add_index(:cached_user_roles, :role_id)
   -> 0.0467s
-- add_index(:cached_user_roles, :user_role_id)
   -> 0.0542s
==  CreateCachedUserRoles: migrated (0.1572s) =================================

==  CalculateCacheForUserRole: migrating ======================================
==  CalculateCacheForUserRole: migrated (0.6594s) =============================

==  CreateCachedUsergroupMembers: migrating ===================================
-- create_table(:cached_usergroup_members)
   -> 0.0270s
-- add_index(:cached_usergroup_members, :user_id)
   -> 0.0540s
-- add_index(:cached_usergroup_members, :usergroup_id)
   -> 0.0364s
==  CreateCachedUsergroupMembers: migrated (0.1532s) ==========================

==  CreateRealms: migrating ===================================================
-- create_table(:realms)
   -> 0.0122s
-- add_index(:realms, :name, {:unique=>true})
   -> 0.0395s
-- column_exists?(:hosts, :otp)
   -> 0.0044s
-- add_column(:hosts, :otp, :string)
   -> 0.1752s
-- column_exists?(:hosts, :realm_id)
   -> 0.0042s
-- add_column(:hosts, :realm_id, :integer)
   -> 0.1987s
-- column_exists?(:hostgroups, :realm_id)
   -> 0.0031s
-- add_column(:hostgroups, :realm_id, :integer)
   -> 0.0622s
-- add_foreign_key(:realms, :smart_proxies, {:name=>"realms_realm_proxy_id_fk", :column=>"realm_proxy_id"})
   -> 0.0406s
-- add_foreign_key(:hosts, :realms, {:name=>"hosts_realms_id_fk"})
   -> 0.2416s
-- add_foreign_key(:hostgroups, :realms, {:name=>"hostgroups_realms_id_fk"})
   -> 0.0587s
==  CreateRealms: migrated (0.8422s) ==========================================

==  AddAdminFlagToUsergroup: migrating ========================================
-- add_column(:usergroups, :admin, :boolean, {:null=>false, :default=>false})
   -> 0.0654s
==  AddAdminFlagToUsergroup: migrated (0.0656s) ===============================

==  CreatePermissions: migrating ==============================================
-- create_table(:permissions)
   -> 0.0352s
-- add_index(:permissions, [:name, :resource_type])
   -> 0.0576s
==  CreatePermissions: migrated (0.0933s) =====================================

==  CreateFilters: migrating ==================================================
-- create_table(:filters)
   -> 0.0385s
==  CreateFilters: migrated (0.0387s) =========================================

==  CreateFilterings: migrating ===============================================
-- create_table(:filterings)
   -> 0.0124s
-- add_index(:filterings, :filter_id)
   -> 0.0458s
-- add_index(:filterings, :permission_id)
   -> 0.0548s
==  CreateFilterings: migrated (0.1136s) ======================================

==  AddLdapAvatarSupport: migrating ===========================================
-- add_column(:auth_sources, :attr_photo, :string)
   -> 0.0534s
-- add_column(:users, :avatar_hash, :string, {:limit=>128})
   -> 0.0459s
==  AddLdapAvatarSupport: migrated (0.0996s) ==================================

==  AddForeignKeysToFiltersAndFilterings: migrating ===========================
-- add_foreign_key("filters", "roles", {:name=>"filters_roles_id_fk"})
   -> 0.1515s
-- add_foreign_key("filterings", "filters", {:name=>"filterings_filters_id_fk"})
   -> 0.0502s
-- add_foreign_key("filterings", "permissions", {:name=>"filterings_permissions_id_fk"})
   -> 0.0564s
==  AddForeignKeysToFiltersAndFilterings: migrated (0.2590s) ==================

==  AddPasswordToImages: migrating ============================================
-- add_column(:images, :password, :string)
   -> 0.0988s
==  AddPasswordToImages: migrated (0.0994s) ===================================

==  AddDefaultOrganizationIdToUsers: migrating ================================
-- add_column(:users, :default_organization_id, :integer)
   -> 0.0750s
==  AddDefaultOrganizationIdToUsers: migrated (0.0752s) =======================

==  AddDefaultLocationIdToUsers: migrating ====================================
-- add_column(:users, :default_location_id, :integer)
   -> 0.1947s
==  AddDefaultLocationIdToUsers: migrated (0.1950s) ===========================

==  AddAncestryToTaxonomies: migrating ========================================
-- add_column(:taxonomies, :ancestry, :string)
   -> 0.0658s
-- add_index(:taxonomies, :ancestry)
   -> 0.0458s
-- add_column(:taxonomies, :label, :string)
   -> 0.0743s
==  AddAncestryToTaxonomies: migrated (0.1884s) ===============================

==  ChangeLabelToTitle: migrating =============================================
-- rename_column(:hostgroups, :label, :title)
   -> 0.0657s
-- rename_column(:taxonomies, :label, :title)
   -> 0.0622s
-- execute("UPDATE taxonomies set title = name WHERE ancestry IS NULL")
   -> 0.0008s
==  ChangeLabelToTitle: migrated (0.1358s) ====================================

==  MigratePermissions: migrating =============================================
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_architectures'
-- ... with permission 'create_architectures'
-- ... with permission 'edit_architectures'
-- ... with permission 'destroy_architectures'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_audit_logs'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_authenticators'
-- ... with permission 'create_authenticators'
-- ... with permission 'edit_authenticators'
-- ... with permission 'destroy_authenticators'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_bookmarks'
-- ... with permission 'create_bookmarks'
-- ... with permission 'edit_bookmarks'
-- ... with permission 'destroy_bookmarks'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_compute_resources'
-- ... with permission 'create_compute_resources'
-- ... with permission 'edit_compute_resources'
-- ... with permission 'destroy_compute_resources'
-- ... with permission 'view_compute_resources_vms'
-- ... with permission 'create_compute_resources_vms'
-- ... with permission 'destroy_compute_resources_vms'
-- ... with permission 'power_compute_resources_vms'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_templates'
-- ... with permission 'create_templates'
-- ... with permission 'edit_templates'
-- ... with permission 'destroy_templates'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'access_dashboard'
-- ... with permission 'access_settings'
-- ... with permission 'view_statistics'
-- ... with permission 'view_tasks'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_domains'
-- ... with permission 'create_domains'
-- ... with permission 'edit_domains'
-- ... with permission 'destroy_domains'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_environments'
-- ... with permission 'create_environments'
-- ... with permission 'edit_environments'
-- ... with permission 'destroy_environments'
-- ... with permission 'import_environments'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_external_variables'
-- ... with permission 'create_external_variables'
-- ... with permission 'edit_external_variables'
-- ... with permission 'destroy_external_variables'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_facts'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_globals'
-- ... with permission 'create_globals'
-- ... with permission 'edit_globals'
-- ... with permission 'destroy_globals'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'edit_classes'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'create_params'
-- ... with permission 'edit_params'
-- ... with permission 'destroy_params'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_hostgroups'
-- ... with permission 'create_hostgroups'
-- ... with permission 'edit_hostgroups'
-- ... with permission 'destroy_hostgroups'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_hosts'
-- ... with permission 'create_hosts'
-- ... with permission 'edit_hosts'
-- ... with permission 'destroy_hosts'
-- ... with permission 'build_hosts'
-- ... with permission 'power_hosts'
-- ... with permission 'console_hosts'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_media'
-- ... with permission 'create_media'
-- ... with permission 'edit_media'
-- ... with permission 'destroy_media'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_models'
-- ... with permission 'create_models'
-- ... with permission 'edit_models'
-- ... with permission 'destroy_models'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_operatingsystems'
-- ... with permission 'create_operatingsystems'
-- ... with permission 'edit_operatingsystems'
-- ... with permission 'destroy_operatingsystems'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_ptables'
-- ... with permission 'create_ptables'
-- ... with permission 'edit_ptables'
-- ... with permission 'destroy_ptables'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_puppetclasses'
-- ... with permission 'create_puppetclasses'
-- ... with permission 'edit_puppetclasses'
-- ... with permission 'destroy_puppetclasses'
-- ... with permission 'import_puppetclasses'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_reports'
-- ... with permission 'destroy_reports'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_smart_proxies'
-- ... with permission 'create_smart_proxies'
-- ... with permission 'edit_smart_proxies'
-- ... with permission 'destroy_smart_proxies'
-- ... with permission 'view_smart_proxies_autosign'
-- ... with permission 'create_smart_proxies_autosign'
-- ... with permission 'destroy_smart_proxies_autosign'
-- ... with permission 'view_smart_proxies_puppetca'
-- ... with permission 'edit_smart_proxies_puppetca'
-- ... with permission 'destroy_smart_proxies_puppetca'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_subnets'
-- ... with permission 'create_subnets'
-- ... with permission 'edit_subnets'
-- ... with permission 'destroy_subnets'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_trends'
-- ... with permission 'create_trends'
-- ... with permission 'edit_trends'
-- ... with permission 'destroy_trends'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_usergroups'
-- ... with permission 'create_usergroups'
-- ... with permission 'edit_usergroups'
-- ... with permission 'destroy_usergroups'
-- Created an unlimited filter for role 'Manager'
-- ... with permission 'view_users'
-- ... with permission 'create_users'
-- ... with permission 'edit_users'
-- ... with permission 'destroy_users'
-- Clearing old permissions for role 'Manager'
-- ... OK
-- Created an unlimited filter for role 'Edit partition tables'
-- ... with permission 'create_ptables'
-- ... with permission 'destroy_ptables'
-- ... with permission 'edit_ptables'
-- ... with permission 'view_ptables'
-- Clearing old permissions for role 'Edit partition tables'
-- ... OK
-- Created an unlimited filter for role 'View hosts'
-- ... with permission 'view_hosts'
-- Clearing old permissions for role 'View hosts'
-- ... OK
-- Created an unlimited filter for role 'Edit hosts'
-- ... with permission 'build_hosts'
-- ... with permission 'create_hosts'
-- ... with permission 'destroy_hosts'
-- ... with permission 'edit_hosts'
-- ... with permission 'view_hosts'
-- Clearing old permissions for role 'Edit hosts'
-- ... OK
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_architectures'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_audit_logs'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_authenticators'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'access_dashboard'
-- ... with permission 'access_settings'
-- ... with permission 'view_statistics'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_domains'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_environments'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_external_variables'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_facts'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_globals'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_hostgroups'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_hosts'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_locations'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_media'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_models'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_operatingsystems'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_organizations'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_ptables'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_puppetclasses'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_reports'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_smart_proxies'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_subnets'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_usergroups'
-- Created an unlimited filter for role 'Viewer'
-- ... with permission 'view_users'
-- Clearing old permissions for role 'Viewer'
-- ... OK
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_architectures'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_audit_logs'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_authenticators'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'access_dashboard'
-- ... with permission 'access_settings'
-- ... with permission 'view_statistics'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_domains'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_environments'
-- ... with permission 'import_environments'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_external_variables'
-- ... with permission 'create_external_variables'
-- ... with permission 'edit_external_variables'
-- ... with permission 'destroy_external_variables'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_facts'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_globals'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_hostgroups'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_hosts'
-- ... with permission 'create_hosts'
-- ... with permission 'edit_hosts'
-- ... with permission 'destroy_hosts'
-- ... with permission 'build_hosts'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_media'
-- ... with permission 'create_media'
-- ... with permission 'edit_media'
-- ... with permission 'destroy_media'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_models'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_operatingsystems'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_ptables'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_puppetclasses'
-- ... with permission 'import_puppetclasses'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_reports'
-- ... with permission 'destroy_reports'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_smart_proxies'
-- ... with permission 'edit_smart_proxies'
-- ... with permission 'view_smart_proxies_autosign'
-- ... with permission 'view_smart_proxies_puppetca'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_subnets'
-- ... with permission 'edit_subnets'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_usergroups'
-- ... with permission 'create_usergroups'
-- ... with permission 'edit_usergroups'
-- ... with permission 'destroy_usergroups'
-- Created an unlimited filter for role 'Site manager'
-- ... with permission 'view_users'
-- ... with permission 'edit_users'
-- Clearing old permissions for role 'Site manager'
-- ... OK
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_architectures'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_authenticators'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'access_dashboard'
-- ... with permission 'access_settings'
-- ... with permission 'view_statistics'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_domains'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_environments'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_external_variables'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_facts'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_globals'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_hostgroups'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_hosts'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_locations'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_media'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_models'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_operatingsystems'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_organizations'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_ptables'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_puppetclasses'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_reports'
-- Created an unlimited filter for role 'Default user'
-- ... with permission 'view_subnets'
-- Clearing old permissions for role 'Default user'
-- ... OK
-- Created an unlimited filter for role 'Anonymous'
-- ... with permission 'view_bookmarks'
-- Created an unlimited filter for role 'Anonymous'
-- ... with permission 'view_hosts'
-- Created an unlimited filter for role 'Anonymous'
-- ... with permission 'view_tasks'
-- Clearing old permissions for role 'Anonymous'
-- ... OK
-- Migrating user 'admin'
-- ... cloning all roles
-- ... done
-- ... compute resource filters applied
-- ... hostgroups filters applied
-- ... all other filters applied
-- Removing old filter
-- ... done
==  MigratePermissions: migrated (3.0683s) ====================================

==  AddTaxonomySearchesToFilter: migrating ====================================
-- add_column(:filters, :taxonomy_search, :text)
   -> 0.0543s
==  AddTaxonomySearchesToFilter: migrated (0.0630s) ===========================

==  AddProvisionMethodToHosts: migrating ======================================
-- add_column(:hosts, :provision_method, :string)
   -> 0.1379s
==  AddProvisionMethodToHosts: migrated (1.6479s) =============================

==  AddCounterCaches: migrating ===============================================
-- add_column(:architectures, :hosts_count, :integer, {:default=>0})
   -> 0.1793s
-- add_column(:architectures, :hostgroups_count, :integer, {:default=>0})
   -> 0.0329s
-- add_column(:domains, :hosts_count, :integer, {:default=>0})
   -> 0.0788s
-- add_column(:domains, :hostgroups_count, :integer, {:default=>0})
   -> 0.0589s
-- add_column(:environments, :hosts_count, :integer, {:default=>0})
   -> 0.0703s
-- add_column(:environments, :hostgroups_count, :integer, {:default=>0})
   -> 0.1316s
-- add_column(:models, :hosts_count, :integer, {:default=>0})
   -> 3.8089s
-- add_column(:operatingsystems, :hosts_count, :integer, {:default=>0})
   -> 0.1376s
-- add_column(:operatingsystems, :hostgroups_count, :integer, {:default=>0})
   -> 0.0603s
-- add_column(:puppetclasses, :hosts_count, :integer, {:default=>0})
   -> 0.3800s
-- add_column(:puppetclasses, :hostgroups_count, :integer, {:default=>0})
   -> 0.0985s
-- add_column(:puppetclasses, :lookup_keys_count, :integer, {:default=>0})
   -> 0.0837s
==  AddCounterCaches: migrated (6.5843s) ======================================

==  FixPuppetclassCounters: migrating =========================================
-- rename_column(:puppetclasses, :lookup_keys_count, :global_class_params_count)
   -> 0.0437s
-- add_column(:puppetclasses, :lookup_keys_count, :integer, {:default=>0})
   -> 0.0508s
==  FixPuppetclassCounters: migrated (0.1452s) ================================

==  ChangeHostManagedDefaultToFalse: migrating ================================
-- change_column(:hosts, :managed, :boolean, {:null=>false, :default=>false})
   -> 0.1175s
==  ChangeHostManagedDefaultToFalse: migrated (0.1208s) =======================

==  CreateConfigGroups: migrating =============================================
-- create_table(:config_groups)
   -> 0.0172s
==  CreateConfigGroups: migrated (0.0174s) ====================================

==  CreateConfigGroupClasses: migrating =======================================
-- create_table(:config_group_classes)
   -> 0.0351s
==  CreateConfigGroupClasses: migrated (0.0354s) ==============================

==  CreateHostConfigGroups: migrating =========================================
-- create_table(:host_config_groups)
   -> 0.0435s
==  CreateHostConfigGroups: migrated (0.0440s) ================================

==  AddCountersToConfigGroups: migrating ======================================
-- add_column(:config_groups, :hosts_count, :integer)
   -> 0.0372s
-- add_column(:config_groups, :hostgroups_count, :integer)
   -> 0.0190s
-- add_column(:config_groups, :config_group_classes_count, :integer)
   -> 0.0410s
==  AddCountersToConfigGroups: migrated (0.0977s) =============================

==  AddConfigGroupCounterDefaults: migrating ==================================
-- change_column(:config_groups, :hosts_count, :integer, {:default=>0})
   -> 0.0079s
-- change_column(:config_groups, :hostgroups_count, :integer, {:default=>0})
   -> 0.0108s
-- change_column(:config_groups, :config_group_classes_count, :integer, {:default=>0})
   -> 0.0093s
==  AddConfigGroupCounterDefaults: migrated (0.1011s) =========================

Recreating cache
[root@monitor foreman]#

Thank you for the help!

#4 Updated by Dominic Cleal almost 5 years ago

  • Has duplicate Bug #5480: Extend user role migration fails on Mysql added

#5 Updated by Dominic Cleal almost 5 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Dominic Cleal

#6 Updated by Dominic Cleal almost 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF