mirror of
https://github.com/cupcakearmy/firemorph.git
synced 2024-12-22 08:16:33 +00:00
rename collection
This commit is contained in:
parent
607d7e1893
commit
d11dfd1c03
16
README.md
Normal file
16
README.md
Normal 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
|
@ -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 = {
|
||||||
|
Loading…
Reference in New Issue
Block a user