@nodeboot/starter-persistence
Version:
Nodeboot starter package for persistence. Supports data access layer auto-configuration providing features like database initialization, consistency check, entity mapping, repository pattern, transactions, paging, migrations, persistence listeners, persis
27 lines • 929 B
TypeScript
import { MigrationInterface } from "typeorm";
/**
* Decorator to register a class as a database migration within the persistence context.
*
* Use this decorator on classes implementing TypeORM's MigrationInterface to
* include them in the migration lifecycle of the application.
*
* @template T - A class type extending MigrationInterface.
* @returns {ClassDecorator} The class decorator function.
*
* @example
* ```ts
* @Migration()
* class AddUsersTable1616161616161 implements MigrationInterface {
* async up(queryRunner: QueryRunner): Promise<void> {
* // migration logic here
* }
* async down(queryRunner: QueryRunner): Promise<void> {
* // rollback logic here
* }
* }
* ```
*
* @author Manuel Santos <https://github.com/manusant>
*/
export declare function Migration<T extends new (...args: any[]) => MigrationInterface>(): (target: T) => void;
//# sourceMappingURL=Migration.d.ts.map