20190306145741_add_lock_version_to_polls.rb 348 B

123456789101112131415161718192021
  1. # frozen_string_literal: true
  2. class AddLockVersionToPolls < ActiveRecord::Migration[5.2]
  3. disable_ddl_transaction!
  4. def up
  5. safety_assured do
  6. add_column(
  7. :polls,
  8. :lock_version,
  9. :integer,
  10. null: false,
  11. default: 0
  12. )
  13. end
  14. end
  15. def down
  16. remove_column :polls, :lock_version
  17. end
  18. end