Commit Graph

1 Commits

Author SHA1 Message Date
Venk Natarajan 6345bb99ae Create a table for section specific announcements.
This creates a column in discussion_topics called
"is_section_specific" and also creates a table for storing
which sections go to which announcements.

Right now, as long as the section_specific_announcements
feature is disabled, it will not be possible to use rails
to set this new column to true, or add stuff to the new table,
so these tables should be frozen to empty.

Closes COMMS-550
Closes COMMS-551

Test Plan:
* Have a course with sections and discussion topics in it.
* Run "bundle exec rake db:migrate:up VERSION=20171208202812"
* Run "bundle exec rake db:migrate:up VERSION=20171208202825"
* "rails dbconsole"
* Verify that "is_section_specific" is present in the
  discussion_topics table and that it cannot be null.
* Verify that "is_section_specific" has an explicit false value
  in each row.
* Run "bundle exec rake db:migrate:down VERSION=20171208202825"
* Run "bundle exec rake db:migrate:down VERSION=20171208202812"
* (The order in which you run these migrations matters)
* Needless to say, the above stuff should all succeed.
* Specs pass.
* Make sure that, if the feature is disabled, we can't set the
  is_section_specific column to true and we can't put stuff in
  the new table.

Change-Id: I2b6e75872a1380a481d2ad15fca3d7e1b257a542
Reviewed-on: https://gerrit.instructure.com/135021
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Product-Review: Venk Natarajan <vnatarajan@instructure.com>
2017-12-13 04:15:32 +00:00