Skip to content

Commit a54ab8d

Browse files
feat(cat-voices): database migration (#3585)
* docs: capture initial times * chore: remove cacheDocument * turn off logging * chore: use debugPrint instead of logger * feat: bulk documents save * batching sync * chore: move exact ref resoling to getDocumentData instead of index * fix: DocumentRepository * chore: simplify getting documents data * remove getAllDocumentsRefs and getCachedDocumentsRefs from DocumentRepository. Index is only available in DocumentDataRemoteSource * chore: update docs * simplified document index endpoint * remove randomness from LocalCatGateway * indexing by batch size * wip: filtering by types * Rework filtering refs + checking all refs if already cached in parallel * docs * update indexing.csv * update indexing csv * chore: cleanup * trailing new line * chore * move performance tab to docs * bulk saving typed docs in parallel * chore: revert hardcoded timestamp * chore: typos * split _sync into smaller functions + add documentation * little refactor * fix: analyzer * initial v2 tables * wip * wip * feat: database migration * chore: cleanup * bump batch size * cleanup * chore: remove defensive content decoding * spelling * test on platform * chore: update build scripts * more migration test data * clean up constructors * cleanup * fix: template tests * fix: spelling * fix code-generator earthly target * use logger in migration + wrap in transaction * chore: move migration transaction level higher
1 parent f293bd7 commit a54ab8d

File tree

15 files changed

+2251
-10
lines changed

15 files changed

+2251
-10
lines changed

catalyst_voices/Earthfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ code-generator:
3232

3333
LET gen_code_path = lib/generated/api
3434
LET local_gen_code_path = packages/internal/catalyst_voices_repositories/lib/generated/api/
35+
LET local_gen_db_code_path = packages/internal/catalyst_voices_repositories/test/src/database/migration/catalyst_database/generated/
3536

3637
WORKDIR packages/internal/catalyst_voices_repositories
3738

3839
WORKDIR /frontend
3940

4041
RUN melos l10n
42+
RUN melos build-db-migration
4143
RUN melos build-runner
4244
RUN melos build-runner-repository
4345

@@ -58,6 +60,11 @@ code-generator:
5860
-o -name "*.drift.dart" \))
5961
SAVE ARTIFACT $generated_file AS LOCAL $generated_file
6062
END
63+
64+
# Save database migration generated files
65+
WORKDIR packages/internal/catalyst_voices_repositories/test/src/database/migration/catalyst_database
66+
SAVE ARTIFACT generated/* AS LOCAL $local_gen_db_code_path
67+
WORKDIR /frontend
6168
ELSE
6269
SAVE ARTIFACT .
6370
END

0 commit comments

Comments
 (0)