-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
44 lines (40 loc) · 888 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { Firestore } from "firebase-admin/firestore";
export type MigrationFile =
| {
migrate: MigrationFunction;
default: undefined;
}
| {
migrate: undefined;
default: MigrationFunction;
};
export type MigrationFunction = (
params: MigrationParameters
) => Promise<void> | void;
export type MigrationParameters = {
firestore: Firestore;
};
export type RunMigrationOptions = {
/**
* Path to the folder containing the migration files
*/
migrations: string;
/**
* Id of the Firestore database to run the migrations on
*/
databaseId?: string;
/**
* Path to the tsconfig file
*/
tsconfig?: string;
/**
* Name of the collection to store migration information
* @default "firegration"
*/
migrationsCollectionName?: string;
/**
* Enable verbose logging
* @default false
*/
verbose?: boolean;
};