Home > @infiniteobjects/models > Migration
A class defining Schema migrations for an Entity
Signature:
export declare class Migration<EntityType extends BaseFirebaseEntity, CurrentSchema, AnySchema = CurrentSchema>
Constructor | Modifiers | Description |
---|---|---|
(constructor)(entity) | Constructs a new instance of the Migration class |
Property | Modifiers | Type | Description |
---|---|---|---|
debug | readonly |
DebugInstance | A debugger function under the name io:model:name:migration |
Entity | readonly |
ClassConstructor<EntityType> | The Entity this Repository manages |
entityName | readonly |
string | The name of the entity (kebabCase of Class name) |
run | (data: AnySchema) => CurrentSchema | Migrates the schemas to the latest version |
Method | Modifiers | Description |
---|---|---|
addMigration(migration) |