闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
528 B

  1. class CreateDevices < ActiveRecord::Migration[5.2]
  2. def change
  3. create_table :devices do |t|
  4. t.references :access_token, foreign_key: { to_table: :oauth_access_tokens, on_delete: :cascade, index: :unique }
  5. t.references :account, foreign_key: { on_delete: :cascade }
  6. t.string :device_id, default: '', null: false
  7. t.string :name, default: '', null: false
  8. t.text :fingerprint_key, default: '', null: false
  9. t.text :identity_key, default: '', null: false
  10. t.timestamps
  11. end
  12. end
  13. end