docbrown/db/migrate/20210531152321_create_discussion_locks.rb
Alex b02d43ca2d
Create DiscussionLocks (#13905)
* Create DiscussionLocks

* Fix specs

* Update nullify_blank_notes_and_reason

* Update before_validation call

* Updated DiscussionLockPolicy for clarity

* Move permitted_attributes to a constant

* Update route

* Apply suggestions from code review for frontend

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Add title tags

* Wrap unlock confirm in main element

* Wrap flash messages up in div

* Actually fix title tags

* Hide comment reply button when discussion is locked

* Add E2E tests

* Try to fix E2E tests

* Cypress...you work locally but not in CI...why!?

* PR feedback

* Update E2E tests

* More E2E updates 😭

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-06-10 11:04:33 -04:00

12 lines
379 B
Ruby

class CreateDiscussionLocks < ActiveRecord::Migration[6.1]
def change
create_table :discussion_locks do |t|
t.references :article, null: false, foreign_key: true, index: { unique: true }
t.references :locking_user, references: :users, foreign_key: { to_table: :users }, null: false
t.text :reason
t.text :notes
t.timestamps
end
end
end