gitlab-org--gitlab-foss/spec/lib/gitlab/import_export/all_models.yml

651 lines
10 KiB
YAML
Raw Normal View History

---
issues:
- subscriptions
- award_emoji
- author
- assignees
- updated_by
- milestone
- iteration
- notes
2018-08-01 08:58:49 +00:00
- resource_label_events
- resource_weight_events
- resource_milestone_events
- resource_state_events
- sent_notifications
- sentry_issue
- label_links
- labels
2017-05-05 05:39:26 +00:00
- last_edited_by
- todos
- user_agent_detail
- moved_to
- moved_from
- duplicated_to
- promoted_to_epic
- events
2016-09-21 11:01:46 +00:00
- merge_requests_closing_issues
- metrics
- timelogs
- issue_assignees
2018-03-01 14:42:50 +00:00
- closed_by
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- epic_issue
- epic
- designs
- design_versions
- description_versions
- prometheus_alerts
- prometheus_alert_events
- self_managed_prometheus_alert_events
- zoom_meetings
- vulnerability_links
- related_vulnerabilities
- user_mentions
- system_note_metadata
- alert_management_alert
- status_page_published_incident
events:
- author
- project
- group
- target
Migrate events into a new format This commit migrates events data in such a way that push events are stored much more efficiently. This is done by creating a shadow table called "events_for_migration", and a table called "push_event_payloads" which is used for storing push data of push events. The background migration in this commit will copy events from the "events" table into the "events_for_migration" table, push events in will also have a row created in "push_event_payloads". This approach allows us to reclaim space in the next release by simply swapping the "events" and "events_for_migration" tables, then dropping the old events (now "events_for_migration") table. The new table structure is also optimised for storage space, and does not include the unused "title" column nor the "data" column (since this data is moved to "push_event_payloads"). == Newly Created Events Newly created events are inserted into both "events" and "events_for_migration", both using the exact same primary key value. The table "push_event_payloads" in turn has a foreign key to the _shadow_ table. This removes the need for recreating and validating the foreign key after swapping the tables. Since the shadow table also has a foreign key to "projects.id" we also don't have to worry about orphaned rows. This approach however does require some additional storage as we're duplicating a portion of the events data for at least 1 release. The exact amount is hard to estimate, but for GitLab.com this is expected to be between 10 and 20 GB at most. The background migration in this commit deliberately does _not_ update the "events" table as doing so would put a lot of pressure on PostgreSQL's auto vacuuming system. == Supporting Both Old And New Events Application code has also been adjusted to support push events using both the old and new data formats. This is done by creating a PushEvent class which extends the regular Event class. Using Rails' Single Table Inheritance system we can ensure the right class is used for the right data, which in this case is based on the value of `events.action`. To support displaying old and new data at the same time the PushEvent class re-defines a few methods of the Event class, falling back to their original implementations for push events in the old format. Once all existing events have been migrated the various push event related methods can be removed from the Event model, and the calls to `super` can be removed from the methods in the PushEvent model. The UI and event atom feed have also been slightly changed to better handle this new setup, fortunately only a few changes were necessary to make this work. == API Changes The API only displays push data of events in the new format. Supporting both formats in the API is a bit more difficult compared to the UI. Since the old push data was not really well documented (apart from one example that used an incorrect "action" nmae) I decided that supporting both was not worth the effort, especially since events will be migrated in a few days _and_ new events are created in the correct format.
2017-07-10 15:43:57 +00:00
- push_event_payload
notes:
- award_emoji
- project
- noteable
- author
- updated_by
2017-05-05 05:39:26 +00:00
- last_edited_by
- resolved_by
- todos
- events
- system_note_metadata
- note_diff_file
- suggestions
- diff_note_positions
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- review
label_links:
- target
- label
label:
- subscriptions
- project
- lists
- label_links
- issues
- merge_requests
- priorities
milestone:
2017-07-07 15:08:49 +00:00
- group
- project
- issues
- labels
- merge_requests
- participants
- events
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- boards
- milestone_releases
- releases
snippets:
- author
- project
- notes
- award_emoji
- user_agent_detail
- user_mentions
- snippet_repository
releases:
- author
- project
- links
- milestone_releases
- milestones
- evidences
links:
- release
project_members:
- created_by
- user
- source
- project
merge_requests:
- subscriptions
- award_emoji
- author
- assignee
- updated_by
- milestone
- iteration
- notes
2018-08-01 08:58:49 +00:00
- resource_label_events
- resource_milestone_events
- resource_state_events
- label_links
- labels
2017-05-05 05:39:26 +00:00
- last_edited_by
- todos
- target_project
- source_project
- merge_user
- merge_request_diffs
- merge_request_diff
- merge_request_context_commits
- merge_request_context_commit_diff_files
- events
2016-09-21 11:01:46 +00:00
- merge_requests_closing_issues
- cached_closes_issues
2016-09-21 11:01:46 +00:00
- metrics
- timelogs
2017-03-22 19:36:14 +00:00
- head_pipeline
Use latest_merge_request_diff association Compared to the merge_request_diff association: 1. It's simpler to query. The query uses a foreign key to the merge_request_diffs table, so no ordering is necessary. 2. It's faster for preloading. The merge_request_diff association has to load every diff for the MRs in the set, then discard all but the most recent for each. This association means that Rails can just query for N diffs from N MRs. 3. It's more complicated to update. This is a bidirectional foreign key, so we need to update two tables when adding a diff record. This also means we need to handle this as a special case when importing a GitLab project. There is some juggling with this association in the merge request model: * `MergeRequest#latest_merge_request_diff` is _always_ the latest diff. * `MergeRequest#merge_request_diff` reuses `MergeRequest#latest_merge_request_diff` unless: * Arguments are passed. These are typically to force-reload the association. * It doesn't exist. That means we might be trying to implicitly create a diff. This only seems to happen in specs. * The association is already loaded. This is important for the reasons explained in the comment, which I'll reiterate here: if we a) load a non-latest diff, then b) get its `merge_request`, then c) get that MR's `merge_request_diff`, we should get the diff we loaded in c), even though that's not the latest diff. Basically, `MergeRequest#merge_request_diff` is the latest diff in most cases, but not quite all.
2017-11-15 17:22:18 +00:00
- latest_merge_request_diff
- pipelines_for_merge_request
- merge_request_assignees
- suggestions
- diff_note_positions
- unresolved_notes
- assignees
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- reviews
- approval_rules
- approvals
- approvers
- approver_users
- approver_groups
- approved_by_users
- draft_notes
- merge_train
- blocks_as_blocker
- blocks_as_blockee
- blocking_merge_requests
- blocked_merge_requests
- description_versions
- deployment_merge_requests
- deployments
- user_mentions
- system_note_metadata
external_pull_requests:
- project
merge_request_diff:
- merge_request
- merge_request_diff_commits
- merge_request_diff_files
merge_request_diff_commits:
- merge_request_diff
merge_request_diff_files:
- merge_request_diff
merge_request_context_commits:
- merge_request
- diff_files
2018-12-05 14:39:15 +00:00
ci_pipelines:
- project
- user
- stages
- statuses
- latest_statuses_ordered_by_stage
- builds
- processables
- trigger_requests
2017-07-26 09:31:09 +00:00
- variables
2017-03-19 15:47:37 +00:00
- auto_canceled_by
- auto_canceled_pipelines
- auto_canceled_jobs
2017-04-06 19:37:28 +00:00
- pending_builds
- failed_builds
2017-04-06 19:37:28 +00:00
- retryable_builds
- cancelable_statuses
- manual_actions
2018-10-02 09:10:58 +00:00
- scheduled_actions
2017-04-06 19:37:28 +00:00
- artifacts
- pipeline_schedule
- merge_requests_as_head_pipeline
2018-12-05 06:57:00 +00:00
- merge_request
- external_pull_request
Squashed commit of the following: commit 04b06a2293fa12660a9c213a9db27fe90b83248b Merge: d580841d4ed a445aa0a926 Author: Shinya Maeda <shinya@gitlab.com> Date: Mon Dec 3 10:51:55 2018 +0900 Merge branch 'master-ce' into fix-mr-widget-unrelated-deployment-status commit d580841d4ed944f01e6417fa77842826843b6a04 Author: Shinya Maeda <shinya@gitlab.com> Date: Fri Nov 30 18:11:04 2018 +0900 Add environment to all_models.yml commit 689fbe2699a3adf10804312e680fa336e4560eaf Author: Shinya Maeda <shinya@gitlab.com> Date: Fri Nov 30 17:00:35 2018 +0900 Proper way to get uniq relationship commit c0733c6ecd535a6a1b6243080a2226836890f479 Author: Shinya Maeda <shinya@gitlab.com> Date: Fri Nov 30 16:20:40 2018 +0900 Revert build change commit 19dc55a8fe6e0fa575858d51144516b7fb0120de Author: Shinya Maeda <shinya@gitlab.com> Date: Fri Nov 30 16:19:18 2018 +0900 Add uniq option commit 0a6995f311c09b453fd0aecff2f6052de38efc27 Author: Shinya Maeda <shinya@gitlab.com> Date: Fri Nov 30 16:14:30 2018 +0900 Drop persisted_environment commit 3f68fc783b0ee0d66e03de6d979616c4c4892118 Author: Shinya Maeda <shinya@gitlab.com> Date: Wed Nov 28 13:59:04 2018 +0900 Return empty array if pipeline is nil commit 73801c5c3d06339e38dce7461a71285bcdbb8f45 Author: Shinya Maeda <shinya@gitlab.com> Date: Tue Nov 27 16:34:47 2018 +0900 Add changelog commit d461699abf2835cc51949a5138e829628209dd6d Author: Shinya Maeda <shinya@gitlab.com> Date: Tue Nov 27 16:32:20 2018 +0900 Squashed commit of the following: commit 77ab5259605e217a39b04d2cea6204277e42d2b5 Merge: 7ac1ed50612 2ee8c40fc16 Author: Shinya Maeda <shinya@gitlab.com> Date: Tue Nov 27 16:31:07 2018 +0900 Merge branch 'master-ce' into fix-mr-widget-unrelated-deployment-status commit 7ac1ed50612620df6408220b0a7cfcb626a04c48 Merge: 49ba5c5aeff b55aeca25e7 Author: Shinya Maeda <shinya@gitlab.com> Date: Mon Nov 26 20:01:43 2018 +0900 Merge branch 'master-ce' into fix-mr-widget-unrelated-deployment-status commit 49ba5c5aeff3efee7b7498d443372021c3f4f8b5 Merge: aa3fd0ff9e8 fbbe5ccd1be Author: Shinya Maeda <shinya@gitlab.com> Date: Mon Nov 26 15:27:36 2018 +0900 Merge branch 'master-ce' into fix-mr-widget-unrelated-deployment-status commit aa3fd0ff9e8a418a233ebaa60b38c081cab50099 Author: Shinya Maeda <shinya@gitlab.com> Date: Tue Nov 20 18:28:53 2018 +0900 Fix static analysis commit 7afe5f37003869a73dbb297229f8533f78b82684 Merge: e65b9580ff4 8a581d531ba Author: Shinya Maeda <shinya@gitlab.com> Date: Tue Nov 20 18:27:33 2018 +0900 Merge branch 'master-ce' into fix-mr-widget-unrelated-deployment-status commit e65b9580ff422359113e1a4e37c212f7b13aba4d Author: Shinya Maeda <shinya@gitlab.com> Date: Mon Nov 19 17:59:48 2018 +0900 Ignore deployments from project import/export commit 9eb4ddab8415c1ef61a3c646bdc4602bcf4ebe24 Author: Shinya Maeda <shinya@gitlab.com> Date: Mon Nov 19 16:26:00 2018 +0900 Add memoization commit 57f0bea3aaaa07b75d18e52068c532277350cda0 Author: Shinya Maeda <shinya@gitlab.com> Date: Mon Nov 19 16:21:39 2018 +0900 Fix unrelated deployment status in MR widget
2018-12-03 06:46:45 +00:00
- deployments
- environments
- chat_data
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- source_pipeline
- ref_status
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- source_bridge
- source_job
- sourced_pipelines
- source_project
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- triggered_by_pipeline
- triggered_pipelines
- child_pipelines
- parent_pipeline
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- downstream_bridges
- job_artifacts
- vulnerabilities_occurrence_pipelines
- vulnerability_findings
- pipeline_config
- security_scans
- daily_build_group_report_results
2017-07-26 09:31:09 +00:00
pipeline_variables:
- pipeline
stages:
- project
- pipeline
- statuses
- processables
- builds
- bridges
- latest_statuses
statuses:
- project
- pipeline
- stage
- user
- auto_canceled_by
- needs
variables:
- project
triggers:
- project
- trigger_requests
2017-03-05 20:23:57 +00:00
- owner
pipeline_schedules:
- project
- owner
- pipelines
- last_pipeline
2017-07-03 13:13:10 +00:00
- variables
pipeline_schedule:
- pipelines
pipeline_schedule_variables:
- pipeline_schedule
deploy_tokens:
- project_deploy_tokens
- projects
deploy_keys:
- user
- deploy_keys_projects
- projects
services:
- project
- service_hook
- jira_tracker_data
- issue_tracker_data
- open_project_tracker_data
hooks:
- project
- web_hook_logs
protected_branches:
- project
- merge_access_levels
- push_access_levels
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- unprotect_access_levels
protected_tags:
- project
- create_access_levels
2016-09-21 11:01:46 +00:00
merge_access_levels:
- protected_branch
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- user
- group
2016-09-21 11:01:46 +00:00
push_access_levels:
- protected_branch
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- user
- group
create_access_levels:
- user
- protected_tag
- group
container_repositories:
- project
2016-12-16 03:24:05 +00:00
- name
project:
- taggings
- base_tags
- tag_taggings
- tags
2016-11-18 10:38:54 +00:00
- chat_services
- cluster
2017-11-06 17:06:02 +00:00
- clusters
2017-11-03 11:26:38 +00:00
- cluster_project
- creator
- cycle_analytics_stages
- group
- namespace
- management_clusters
- boards
- last_event
- services
- campfire_service
2018-10-30 11:23:20 +00:00
- discord_service
- drone_ci_service
- emails_on_push_service
- pipelines_email_service
- mattermost_slash_commands_service
2016-12-18 22:32:53 +00:00
- slack_slash_commands_service
- irker_service
2017-09-21 20:05:44 +00:00
- packagist_service
- pivotaltracker_service
- prometheus_service
- hipchat_service
- flowdock_service
- assembla_service
- asana_service
- slack_service
- microsoft_teams_service
- mattermost_service
- hangouts_chat_service
- unify_circuit_service
- buildkite_service
- bamboo_service
- teamcity_service
- pushover_service
- jira_service
- redmine_service
- youtrack_service
- custom_issue_tracker_service
- bugzilla_service
- gitlab_issue_tracker_service
- external_wiki_service
- mock_ci_service
- mock_deployment_service
- mock_monitoring_service
- forked_to_members
- forked_from_project
- forks
- merge_requests
- fork_merge_requests
- issues
- labels
- events
- milestones
- iterations
- notes
- snippets
- hooks
- protected_branches
- protected_tags
- project_members
- project_repository
- users
- requesters
- deploy_keys_projects
- deploy_keys
- users_star_projects
- starrers
- releases
- lfs_objects_projects
- lfs_objects
- project_group_links
- invited_groups
- todos
- notification_settings
- import_data
- commit_statuses
2018-12-05 14:39:15 +00:00
- ci_pipelines
- all_pipelines
- stages
- ci_refs
- builds
- runner_projects
- runners
- variables
- triggers
- pipeline_schedules
- environments
- environments_for_dashboard
- deployments
- project_feature
- auto_devops
- pages_domains
- authorized_users
- project_authorizations
- remote_mirrors
- route
- redirect_routes
- statistics
- container_repositories
- uploads
- file_uploads
- import_state
- members_and_requesters
2017-09-25 16:54:08 +00:00
- build_trace_section_names
- build_trace_chunks
- job_artifacts
- root_of_fork_network
- fork_network_member
- fork_network
- fork_network_projects
2017-09-18 13:03:24 +00:00
- custom_attributes
2018-02-07 13:00:53 +00:00
- lfs_file_locks
2018-03-05 17:51:40 +00:00
- project_badges
- source_of_merge_requests
- internal_ids
- project_deploy_tokens
- deploy_tokens
- settings
- ci_cd_settings
- import_export_upload
- repository_languages
2018-10-19 03:44:41 +00:00
- pool_repository
- kubernetes_namespaces
- error_tracking_setting
- metrics_setting
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- gitlab_slack_application_service
- github_service
- protected_environments
- mirror_user
- push_rule
- jenkins_service
- index_status
- feature_usage
- approval_rules
2019-09-09 23:52:54 +00:00
- approval_merge_request_rules
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- approvers
- approver_users
- pages_domains
- audit_events
- path_locks
- approver_groups
- repository_state
- source_pipelines
- sourced_pipelines
- prometheus_metrics
- vulnerabilities
- vulnerability_exports
- vulnerability_findings
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- vulnerability_feedback
- vulnerability_identifiers
- vulnerability_scanners
- operations_feature_flags
- operations_feature_flags_client
- operations_feature_flags_user_lists
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- prometheus_alerts
- prometheus_alert_events
- self_managed_prometheus_alert_events
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- software_license_policies
- project_registry
- packages
- package_files
- tracing_setting
- alerting_setting
- project_setting
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- webide_pipelines
- reviews
- incident_management_setting
- merge_trains
- designs
- project_aliases
- external_pull_requests
- pages_metadatum
- alerts_service
- grafana_integration
- remove_source_branch_after_merge
- deleting_user
- upstream_projects
- downstream_projects
- upstream_project_subscriptions
- downstream_project_subscriptions
- service_desk_setting
- import_failures
- container_expiration_policy
- resource_groups
- autoclose_referenced_issues
- status_page_setting
- requirements
- export_jobs
- daily_build_group_report_results
- jira_imports
- compliance_framework_setting
- metrics_users_starred_dashboards
- alert_management_alerts
- repository_storage_moves
- freeze_periods
- webex_teams_service
award_emoji:
- awardable
- user
priorities:
2016-11-18 10:38:54 +00:00
- label
2018-09-04 09:55:45 +00:00
prometheus_metrics:
- project
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
- prometheus_alerts
timelogs:
- issue
- merge_request
- user
Migrate events into a new format This commit migrates events data in such a way that push events are stored much more efficiently. This is done by creating a shadow table called "events_for_migration", and a table called "push_event_payloads" which is used for storing push data of push events. The background migration in this commit will copy events from the "events" table into the "events_for_migration" table, push events in will also have a row created in "push_event_payloads". This approach allows us to reclaim space in the next release by simply swapping the "events" and "events_for_migration" tables, then dropping the old events (now "events_for_migration") table. The new table structure is also optimised for storage space, and does not include the unused "title" column nor the "data" column (since this data is moved to "push_event_payloads"). == Newly Created Events Newly created events are inserted into both "events" and "events_for_migration", both using the exact same primary key value. The table "push_event_payloads" in turn has a foreign key to the _shadow_ table. This removes the need for recreating and validating the foreign key after swapping the tables. Since the shadow table also has a foreign key to "projects.id" we also don't have to worry about orphaned rows. This approach however does require some additional storage as we're duplicating a portion of the events data for at least 1 release. The exact amount is hard to estimate, but for GitLab.com this is expected to be between 10 and 20 GB at most. The background migration in this commit deliberately does _not_ update the "events" table as doing so would put a lot of pressure on PostgreSQL's auto vacuuming system. == Supporting Both Old And New Events Application code has also been adjusted to support push events using both the old and new data formats. This is done by creating a PushEvent class which extends the regular Event class. Using Rails' Single Table Inheritance system we can ensure the right class is used for the right data, which in this case is based on the value of `events.action`. To support displaying old and new data at the same time the PushEvent class re-defines a few methods of the Event class, falling back to their original implementations for push events in the old format. Once all existing events have been migrated the various push event related methods can be removed from the Event model, and the calls to `super` can be removed from the methods in the PushEvent model. The UI and event atom feed have also been slightly changed to better handle this new setup, fortunately only a few changes were necessary to make this work. == API Changes The API only displays push data of events in the new format. Supporting both formats in the API is a bit more difficult compared to the UI. Since the old push data was not really well documented (apart from one example that used an incorrect "action" nmae) I decided that supporting both was not worth the effort, especially since events will be migrated in a few days _and_ new events are created in the correct format.
2017-07-10 15:43:57 +00:00
push_event_payload:
- event
2017-10-31 15:13:09 +00:00
issue_assignees:
- issue
2017-11-06 17:06:02 +00:00
- assignee
merge_request_assignees:
- merge_request
- assignee
2018-02-07 13:00:53 +00:00
lfs_file_locks:
- user
2018-03-05 17:51:40 +00:00
project_badges:
- project
metrics:
- merge_request
- latest_closed_by
- merged_by
- pipeline
resource_label_events:
- user
- issue
- merge_request
- epic
- label
error_tracking_setting:
- project
suggestions:
- note
diff_note_positions:
- note
metrics_setting:
- project
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
protected_environments:
- project
- deploy_access_levels
deploy_access_levels:
- protected_environment
- user
- group
unprotect_access_levels:
- user
- protected_branch
- group
prometheus_alerts:
- project
- prometheus_alert_events
prometheus_alert_events:
- project
self_managed_prometheus_alert_events:
- project
Backport the EE schema and migrations to CE This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-04-29 12:16:03 +00:00
epic_issues:
- issue
- epic
tracing_setting:
- project
reviews:
- project
- merge_request
- author
- notes
incident_management_setting:
- project
merge_trains:
- project
- merge_request
boards:
- group
- lists
- destroyable_lists
- milestone
- board_labels
- board_assignee
- assignee
- labels
lists:
- user
- milestone
- board
- label
- list_user_preferences
milestone_releases:
- milestone
- release
evidences:
- release
design: &design
- issue
- actions
- versions
- notes
- user_mentions
designs: *design
actions:
- design
- version
- uploads
- file_uploads
versions: &version
- author
- issue
- designs
- actions
zoom_meetings:
- issue
sentry_issue:
- issue
design_versions: *version
epic:
- subscriptions
- award_emoji
- description_versions
- author
- assignee
- issues
- epic_issues
- milestone
- notes
- label_links
- labels
- todos
- metrics
- group
- parent
- children
- updated_by
- last_edited_by
- closed_by
- start_date_sourcing_milestone
- due_date_sourcing_milestone
- start_date_sourcing_epic
- due_date_sourcing_epic
- events
- resource_label_events
- user_mentions
epic_issue:
- epic
- issue
system_note_metadata:
- note
- description_version
status_page_published_incident:
- issue