debian-mirror-gitlab/db/migrate/20220513093615_add_ding_talk_tracker_data.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
626 B
Ruby
Raw Normal View History

2022-07-23 23:45:48 +05:30
# frozen_string_literal: true
class AddDingTalkTrackerData < Gitlab::Database::Migration[2.0]
INDEX_NAME = 'index_on_dingtalk_tracker_data_corpid'
def change
create_table :dingtalk_tracker_data, comment: 'JiHu-specific table' do |t|
t.references :integration, foreign_key: { on_delete: :cascade },
type: :bigint, index: true, null: false, comment: 'JiHu-specific column'
t.timestamps_with_timezone
t.text :corpid, comment: 'JiHu-specific column', limit: 255
t.index :corpid, where: "(corpid IS NOT NULL)", name: INDEX_NAME, comment: 'JiHu-specific index'
end
end
end