[PATCH conductor] Fix the regression introduced by the dc:setup rake task fix
Jan Provaznik
jprovazn at redhat.com
Tue Jun 19 12:08:13 UTC 2012
On 06/15/2012 05:44 PM, ifarkas at redhat.com wrote:
> From: Imre Farkas<ifarkas at redhat.com>
>
> ---
> src/db/migrate/20120520151500_change_permission_user.rb | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/db/migrate/20120520151500_change_permission_user.rb b/src/db/migrate/20120520151500_change_permission_user.rb
> index d9432d3..f71ee33 100644
> --- a/src/db/migrate/20120520151500_change_permission_user.rb
> +++ b/src/db/migrate/20120520151500_change_permission_user.rb
> @@ -19,6 +19,9 @@ class ChangePermissionUser< ActiveRecord::Migration
> add_column :permissions, :entity_id, :integer
> add_column :derived_permissions, :entity_id, :integer
>
> + Permission.reset_column_information
> + DerivedPermission.reset_column_information
> +
> Permission.skip_callback(:save, :after, :update_derived_permissions)
> counter = 0
> total_perms = Permission.count
> @@ -50,6 +53,9 @@ class ChangePermissionUser< ActiveRecord::Migration
> add_column :permissions, :user_id, :integer
> add_column :derived_permissions, :user_id, :integer
>
> + Permission.reset_column_information
> + DerivedPermission.reset_column_information
> +
> Permission.skip_callback(:save, :after, :update_derived_permissions)
> Permission.all.each do |p|
> entity = Entity.find(p.entity_id)
ACK
I wasn't able to reproduce the regression now (w/o this patch applied),
it probably depends on content of DB when running this migration, but
the patch looks good and both db:migrate and dc:setup pass with it.
Jan
More information about the aeolus-devel
mailing list