discourse/db/migrate/20201027110546_create_linke...

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

17 lines
443 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class CreateLinkedTopics < ActiveRecord::Migration[6.0]
def change
create_table :linked_topics do |t|
t.bigint :topic_id, null: false
t.bigint :original_topic_id, null: false
t.integer :sequence, null: false
t.timestamps
end
add_index :linked_topics, %i[topic_id original_topic_id], unique: true
add_index :linked_topics, %i[topic_id sequence], unique: true
end
end