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

  1. class CreateMarkers < ActiveRecord::Migration[5.2]
  2. def change
  3. create_table :markers do |t|
  4. t.references :user, foreign_key: { on_delete: :cascade, index: false }
  5. t.string :timeline, default: '', null: false
  6. t.bigint :last_read_id, default: 0, null: false
  7. t.integer :lock_version, default: 0, null: false
  8. t.timestamps
  9. end
  10. add_index :markers, [:user_id, :timeline], unique: true
  11. end
  12. end