scinote-web/db/migrate/20231006141428_create_asset_sync_tokens.rb
2023-10-25 09:30:42 +02:00

15 lines
406 B
Ruby

# frozen_string_literal: true
class CreateAssetSyncTokens < ActiveRecord::Migration[7.0]
def change
create_table :asset_sync_tokens do |t|
t.references :user, null: false, foreign_key: true
t.references :asset, null: false, foreign_key: true
t.string :token, index: { unique: true }
t.timestamp :expires_at
t.timestamp :revoked_at
t.timestamps
end
end
end