summaryrefslogtreecommitdiff
path: root/db/post_migrate/20230502182754_drop_clusters_applications_crossplane.rb
blob: c35cfc8fd963a1600d13864d07b7f006421a3118 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true

# See https://docs.gitlab.com/ee/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.

class DropClustersApplicationsCrossplane < Gitlab::Database::Migration[2.1]
  def up
    drop_table :clusters_applications_crossplane
  end

  # Based on original migration:
  # https://gitlab.com/gitlab-org/gitlab/-/blob/8b1637296b286a5c46e0d8fdf6da42a43a7c9986/db/migrate/20191017191341_create_clusters_applications_crossplane.rb
  # rubocop:disable Migration/SchemaAdditionMethodsNoPost
  def down
    create_table :clusters_applications_crossplane, id: :integer do |t|
      t.timestamps_with_timezone null: false
      t.references :cluster, null: false, index: false
      t.integer :status, null: false
      t.string :version, null: false, limit: 255
      t.string :stack, null: false, limit: 255
      t.text :status_reason
      t.index :cluster_id, unique: true
    end
  end
  # rubocop:enable Migration/SchemaAdditionMethodsNoPost
end