Sha256: e48f546e9d62f572e4c490da1304a95563e5205be38d795a510b8378dced8d09
Contents?: true
Size: 519 Bytes
Versions: 196
Compression:
Stored size: 519 Bytes
Contents
class AddNextVersionToKatelloContentViews < ActiveRecord::Migration[4.2] def up add_column :katello_content_views, :next_version, :int, :null => false, :default => 1 Katello::ContentView.reset_column_information # update the next version field based on max version Katello::ContentView.all.each do |view| view.update_attribute(:next_version, view.versions.maximum(:version) + 1) if view.versions.any? end end def down remove_column :katello_content_views, :next_version end end
Version data entries
196 entries across 196 versions & 1 rubygems