2022-05-19 08:08:42 -04:00
|
|
|
# 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 },
|
2022-08-11 05:11:50 -04:00
|
|
|
type: :bigint, index: true, null: false, comment: 'JiHu-specific column'
|
2022-05-19 08:08:42 -04:00
|
|
|
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
|