Repository navigation
feat(cli): add firecms migrate rowy to turn Rowy tables into collections - #1026
Merged
Merged
Conversation
…tions Rowy keeps every table's settings in the project's own Firestore, under `_rowy_`. The command reads them and writes, into a local folder: - one FireCMS collection per table, plus an index exporting `rowyCollections` - the derivative, action, default value, formula, extension and webhook scripts Rowy ran, to port by hand - MIGRATION_REPORT.md: what each column became and what is left to do It only reads Rowy's configuration: no documents, and nothing is written to the project. It signs in with the person's gcloud account through the Firestore REST API, so no service account key and no new dependencies. `--input` reads the same configuration from JSON for offline use. Nothing is guessed. A column Rowy did not fully describe (a reference without a target, files stored as metadata objects, linked document snapshots) is converted read-only and listed in the report. Webhook verification secrets are never copied, and lines in copied scripts that look like a hardcoded credential are reported by file and line, without the value. `--target cloud` imports from @firecms/cloud, `--target self-hosted` (the default) from @firecms/core. The generated files type-check against both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…caping or encoding' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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.
What
A new CLI command,
firecms migrate rowy, that turns Rowy tables into FireCMS collections.Rowy keeps every table's settings in the project's own Firestore, under
_rowy_(_rowy_/settings, and the columns in_rowy_/settings/schema/{tableId}). The command reads them and writes a local folder:collections/: one collection per table, and anindex.tsexportingrowyCollectionsrowy-scripts/: the derivative, action, default value, formula, extension and webhook code Rowy ran, to portMIGRATION_REPORT.md: what each column became and what is left to do, plus roles, extensions and webhooksHow it behaves
gcloudsign-in against the Firestore REST API, so no service account key and no new dependencies.{ downloadURL, ref, ... }, and Connect table snapshots. Unknown types are left out. Their data stays in the document and the JSON tab (includeJsonView) shows it.authsettings are never copied. A line in a copied script that looks like a hardcoded credential is reported by file and line, never the value._createdBy.timestamp) nest into maps. Sub-tables become subcollections. Collection group tables getcollectionGroup: true. AnonPreSavecallback keeps writing Rowy's_createdBy/_updatedByaudit fields unless the table had auditing off.--target cloudimports from@firecms/cloud,self-hosted(default) from@firecms/core.The full column mapping is in
convert.ts, and the article in the companion PR explains it for users.Testing
test/migrate_rowy.test.ts. They cover every Rowy column type against a fixture that follows Rowy's own types, plus output files, the secret handling, the overwrite guard and Firestore REST decoding.dist(npx vite build). The one checked in locally was from February.strictagainst the@firecms/coreand@firecms/clouddeclarations. A deliberately broken file fails the same check.bin/firecms.jsend to end with--input, and with--projectagainst a non-existent project. That read-only request fails with a clear 403 message.The Rowy internals it relies on were checked in Rowy's source:
rowyio/rowyfor paths, column config and value shapes, and Rowy Run (buildship-ai/backend) for theR-<table>function naming and what that function runs.🤖 Generated with Claude Code