Add model for tracking published issues
What does this MR do?
Adds a DB (join) table which represents when an issues is published to an external status page instance. Currently, if a status page app is configured for a project, all non-confidential issues will be published automatically. With an ability to track when an issue is published, issues can be published on an as-needed basis at the discretion of the user.
How table is intended to be utilized:
- When an issue is published, a StatusPage::PublishedIncidentis created.
- When an issue is unpublished, the corresponding StatusPage::PublishedIncidentis deleted.
- Already-published issues will have the StatusPage::PublishedIncidenttable back-filled with the date the status page was configured.
Changelog isn't in EE as the migration affects CE as well.
MRs for full feature:
- 
!29994 (merged) - Adds status_page_published_incidentstable
- !30120 (closed) - Saves records to table when issues are published/unpublished
- TBD - Disable auto-publishing issues & Add /publishcommand
Migration logs:
$ rake db:migrate
== 20200416005331 CreateStatusPagePublishedIncidents: migrating ===============
-- create_table(:status_page_published_incidents)
   -> 0.0560s
== 20200416005331 CreateStatusPagePublishedIncidents: migrated (0.0560s) ======
$ rake db:migrate:down VERSION=20200416005331
== 20200416005331 CreateStatusPagePublishedIncidents: reverting ==================
-- drop_table(:status_page_published_incidents)
   -> 0.0192s
== 20200416005331 CreateStatusPagePublishedIncidents: reverted (0.0231s) =========
Related issue: #209849 (closed)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
- 
Changelog entry 
- 
Documentation (if required) 
- 
Code review guidelines 
- 
Merge request performance guidelines 
- 
Style guides 
- 
Database guides 
- 
Separation of EE specific content 
Availability and Testing
- 
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. 
- 
Tested in all supported browsers 
- 
Informed Infrastructure department of a default or new setting change, if applicable per definition of done 
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- 
Label as security and @ mention @gitlab-com/gl-security/appsec
- 
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods 
- 
Security reports checked/validated by a reviewer from the AppSec team 
Edited  by Sarah Yasonik