2020-08-07 01:14:14 +02:00
|
|
|
class CreateInvites < ActiveRecord::Migration[4.2]
|
2009-01-06 11:49:19 +01:00
|
|
|
def self.up
|
|
|
|
create_table :invites do |t|
|
2023-05-12 13:01:12 +02:00
|
|
|
t.column :token, :string, null: false
|
|
|
|
t.column :expires_at, :timestamp, null: false
|
|
|
|
t.column :group_id, :integer, null: false
|
|
|
|
t.column :user_id, :integer, null: false
|
|
|
|
t.column :email, :string, null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
add_index :invites, :token
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
drop_table :invites
|
|
|
|
end
|
|
|
|
end
|