Sha256: 5262212f2d86787ee0b22a8fa576a8a92fee7ee309d237750821bd70cf26f766

Contents?: true

Size: 691 Bytes

Versions: 12

Compression:

Stored size: 691 Bytes

Contents

class RemoveRepositoryInformationFromStacks < ActiveRecord::Migration[6.0]
  def up
    change_column_null :stacks, :repository_id, false
    change_table(:stacks) do |t|
      t.remove_index ["repo_owner", "repo_name", "environment"]
      t.remove :repo_owner
      t.remove :repo_name
      t.index ["repository_id", "environment"], name: "stack_unicity", unique: true
    end
  end

  def down
    change_table(:stacks) do |t|
      t.column :repo_name, :string, limit: 100
      t.column :repo_owner, :string, limit: 39
      t.remove_index ["repository_id", "environment"]
      t.index ["repo_owner", "repo_name", "environment"], name: "stack_unicity", unique: true
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
shipit-engine-0.39.0 db/migrate/20191216163010_remove_repository_information_from_stacks.rb
shipit-engine-0.38.0 db/migrate/20191216163010_remove_repository_information_from_stacks.rb
shipit-engine-0.37.0 db/migrate/20191216163010_remove_repository_information_from_stacks.rb
shipit-engine-0.36.1 db/migrate/20191216163010_remove_repository_information_from_stacks.rb
shipit-engine-0.36.0 db/migrate/20191216163010_remove_repository_information_from_stacks.rb
shipit-engine-0.35.1 db/migrate/20191216163010_remove_repository_information_from_stacks.rb
shipit-engine-0.35.0 db/migrate/20191216163010_remove_repository_information_from_stacks.rb
shipit-engine-0.34.0 db/migrate/20191216163010_remove_repository_information_from_stacks.rb
shipit-engine-0.33.0 db/migrate/20191216163010_remove_repository_information_from_stacks.rb
shipit-engine-0.32.0 db/migrate/20191216163010_remove_repository_information_from_stacks.rb
shipit-engine-0.31.0 db/migrate/20191216163010_remove_repository_information_from_stacks.rb
shipit-engine-0.30.0 db/migrate/20191216163010_remove_repository_information_from_stacks.rb