Sha256: cf8a6564e0ae211f4b7ee3b31eb38817dce5a8155eca08c337b774e82a404b39
Contents?: true
Size: 882 Bytes
Versions: 148
Compression:
Stored size: 882 Bytes
Contents
class MigrateDistributionReferenceToUseRepoId < ActiveRecord::Migration[5.2] class DistributionReference < Katello::Model self.table_name = 'katello_distribution_references' end def up #this was done before being deployed in production, so this should be okay, # although existing pulp3 repos will not work properly DistributionReference.destroy_all #work around sqlite add_column with non_null issue add_column :katello_distribution_references, :repository_id, :integer, :index => true change_column :katello_distribution_references, :repository_id, :integer, :null => false remove_column :katello_distribution_references, :root_repository_id add_foreign_key :katello_distribution_references, :katello_repositories, :column => :repository_id, :primary_key => :id end def down fail ActiveRecord::IrreversibleMigration end end
Version data entries
148 entries across 148 versions & 1 rubygems