[data_migration] Fixes for export. Added option to get just export commands via script or UI.#6265
Merged
Cookiezaurs merged 7 commits intomasterfrom May 30, 2025
Merged
[data_migration] Fixes for export. Added option to get just export commands via script or UI.#6265Cookiezaurs merged 7 commits intomasterfrom
Cookiezaurs merged 7 commits intomasterfrom
Conversation
added 2 commits
May 30, 2025 13:38
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds an option for users to retrieve only the database export commands instead of running the full migration, with support in both UI and API, and fixes a malformed events_data query.
- Exposes a new “Get only database export commands” radio button in the export drawer
- Implements
create_export_commandsin the backend and wires uponly_commandsin the API - Updates frontend to download a
.shscript when the “only export” option is selected
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/data_migration/scripts/getExportScripts.js | New standalone script for generating export command lists |
| plugins/data_migration/frontend/public/templates/drawer-export.html | Adds radio button for “only export scripts” option |
| plugins/data_migration/frontend/public/localization/data_migration.properties | Adds localization key for the new export type |
| plugins/data_migration/frontend/public/javascripts/countly.views.js | Downloads and notifies on export-commands script |
| plugins/data_migration/frontend/public/javascripts/countly.models.js | Normalizes AJAX callback when command data is returned |
| plugins/data_migration/api/data_migration_helper.js | Introduces create_export_commands and fixes events_data regex |
| plugins/data_migration/api/api.js | Recognizes only_export=2 as only_commands and streams .sh |
Comments suppressed due to low confidence (1)
plugins/data_migration/frontend/public/templates/drawer-export.html:72
- [nitpick] Using a raw number (
2) for the export mode is a magic value. Consider defining a constant or enum for export types to improve readability.
<el-radio ... :label="2" ...>
…ws.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… into anna/master
ar2rsawseen
approved these changes
May 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.