stack

Home > @infiniteobjects/models > Migration

Migration class

A class defining Schema migrations for an Entity

Signature:

export declare class Migration<EntityType extends BaseFirebaseEntity, CurrentSchema, AnySchema = CurrentSchema> 

Constructors

Constructor Modifiers Description
(constructor)(entity)   Constructs a new instance of the Migration class

Properties

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

Methods

Method Modifiers Description
addMigration(migration)