Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20231017095738_create_activity_pub_releases_subscriptions.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 19693c29a33c0a0461987968546ea1cde3397cc0 (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
# frozen_string_literal: true

class CreateActivityPubReleasesSubscriptions < Gitlab::Database::Migration[2.1]
  enable_lock_retries!

  def up
    create_table :activity_pub_releases_subscriptions do |t|
      t.references :project, index: false, foreign_key: { on_delete: :cascade }, null: false
      t.timestamps_with_timezone null: false
      t.integer :status, null: false, limit: 2, default: 1
      t.text :shared_inbox_url, limit: 1024
      t.text :subscriber_inbox_url, limit: 1024
      t.text :subscriber_url, limit: 1024, null: false
      t.jsonb :payload, null: true
      t.index 'project_id, LOWER(subscriber_url)', name: :index_activity_pub_releases_sub_on_project_id_sub_url,
        unique: true
      t.index 'project_id, LOWER(subscriber_inbox_url)',
        name: :index_activity_pub_releases_sub_on_project_id_inbox_url, unique: true
    end
  end

  def down
    drop_table :activity_pub_releases_subscriptions
  end
end