Skip to content

[data_migration] Fixes for export. Added option to get just export commands via script or UI.#6265

Merged
Cookiezaurs merged 7 commits intomasterfrom
anna/master
May 30, 2025
Merged

[data_migration] Fixes for export. Added option to get just export commands via script or UI.#6265
Cookiezaurs merged 7 commits intomasterfrom
anna/master

Conversation

@Cookiezaurs
Copy link
Copy Markdown
Contributor

No description provided.

@Cookiezaurs Cookiezaurs requested a review from Copilot May 30, 2025 10:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_commands in the backend and wires up only_commands in the API
  • Updates frontend to download a .sh script 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" ...>

Comment thread plugins/data_migration/frontend/public/javascripts/countly.views.js Outdated
Comment thread plugins/data_migration/frontend/public/javascripts/countly.views.js
Comment thread plugins/data_migration/api/api.js Outdated
Comment thread plugins/data_migration/api/data_migration_helper.js Outdated
Cookiezaurs and others added 3 commits May 30, 2025 13:44
@Cookiezaurs Cookiezaurs merged commit 2f18ed7 into master May 30, 2025
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants