rename collection

This commit is contained in:
cupcakearmy 2021-03-21 18:38:45 +01:00
parent 607d7e1893
commit d11dfd1c03
No known key found for this signature in database
GPG Key ID: 81C683415BBD86B0
2 changed files with 17 additions and 1 deletions

16
README.md Normal file
View File

@ -0,0 +1,16 @@
# firemorph
Migration tool for Firestore
## Gotchas
- 500 Limit https://firebase.google.com/docs/firestore/manage-data/transactions
## Local testing
- FIRESTORE_EMULATOR_HOST="localhost:8080"
- GCLOUD_PROJECT="lovoo-dna-2"
## Migrations
## CLI

View File

@ -9,7 +9,7 @@ import ms from 'ms'
const App = admin.initializeApp() const App = admin.initializeApp()
const DB = admin.firestore() const DB = admin.firestore()
const Timestamp = admin.firestore.Timestamp const Timestamp = admin.firestore.Timestamp
const MigrationCollection = DB.collection('migrations') const MigrationCollection = DB.collection('_migrations')
export type MigrationFN = (db: FirebaseFirestore.Firestore, firestore: typeof admin.firestore) => Promise<void> export type MigrationFN = (db: FirebaseFirestore.Firestore, firestore: typeof admin.firestore) => Promise<void>
export type MigrationFile = { export type MigrationFile = {