0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-04 10:39:43 +08:00
discourse/db/migrate/20211106085605_create_group_associated_groups.rb
2023-01-09 11:59:41 +00:00

16 lines
453 B
Ruby
Vendored

# frozen_string_literal: true
class CreateGroupAssociatedGroups < ActiveRecord::Migration[6.1]
def change
create_table :group_associated_groups do |t|
t.references :group, null: false
t.references :associated_group, null: false
t.timestamps
end
add_index :group_associated_groups,
%i[group_id associated_group_id],
unique: true,
name: "index_group_associated_groups"
end
end