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

17 lines
624 B

  1. class CreatePolls < ActiveRecord::Migration[5.2]
  2. def change
  3. create_table :polls do |t|
  4. t.belongs_to :account, foreign_key: { on_delete: :cascade }
  5. t.belongs_to :status, foreign_key: { on_delete: :cascade }
  6. t.datetime :expires_at
  7. t.string :options, null: false, array: true, default: []
  8. t.bigint :cached_tallies, null: false, array: true, default: []
  9. t.boolean :multiple, null: false, default: false
  10. t.boolean :hide_totals, null: false, default: false
  11. t.bigint :votes_count, null: false, default: 0
  12. t.datetime :last_fetched_at
  13. t.timestamps
  14. end
  15. end
  16. end