discourse/db/migrate/20211106085344_create_associated_groups.rb
2023-01-09 11:59:41 +00:00

19 lines
540 B
Ruby

# frozen_string_literal: true
class CreateAssociatedGroups < ActiveRecord::Migration[6.1]
def change
create_table :associated_groups do |t|
t.string :name, null: false
t.string :provider_name, null: false
t.string :provider_id, null: false
t.datetime :last_used, null: false, default: -> { "CURRENT_TIMESTAMP" }
t.timestamps
end
add_index :associated_groups,
%i[provider_name provider_id],
unique: true,
name: "associated_groups_provider_id"
end
end