Files
astuto/db/migrate/20240902151945_create_invitations.rb
2024-09-06 20:27:15 +02:00

15 lines
359 B
Ruby

class CreateInvitations < ActiveRecord::Migration[6.1]
def change
create_table :invitations do |t|
t.string :email, null: false
t.string :token_digest, null: false
t.datetime :accepted_at
t.references :tenant, null: false, foreign_key: true
t.timestamps
t.index [:email, :tenant_id], unique: true
end
end
end