mirror of
https://github.com/discourse/discourse.git
synced 2024-12-19 16:23:48 +08:00
9 lines
255 B
Ruby
9 lines
255 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class AddExternalIdToTopics < ActiveRecord::Migration[6.1]
|
||
|
def change
|
||
|
add_column :topics, :external_id, :string, null: true
|
||
|
add_index :topics, :external_id, unique: true, where: 'external_id IS NOT NULL'
|
||
|
end
|
||
|
end
|