discourse/db/migrate/20211106085344_create_assoc...

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

19 lines
540 B
Ruby
Raw Normal View History

# 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