闭社主体 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.

25 lines
707 B

8 years ago
  1. class CreateAccounts < ActiveRecord::Migration[4.2]
  2. def change
  3. create_table :accounts do |t|
  4. t.string :username, null: false, default: ''
  5. t.string :domain, null: true
  6. # PuSH credentials
  7. t.string :verify_token, null: false, default: ''
  8. t.string :secret, null: false, default: ''
  9. # RSA key pair
  10. t.text :private_key, null: true
  11. t.text :public_key, null: false, default: ''
  12. # URLs
  13. t.string :remote_url, null: false, default: ''
  14. t.string :salmon_url, null: false, default: ''
  15. t.string :hub_url, null: false, default: ''
  16. t.timestamps null: false
  17. end
  18. add_index :accounts, [:username, :domain], unique: true
  19. end
  20. end