|
2 년 전 | |
---|---|---|
.. | ||
1685715079776-CreateOnboarding.ts | 2 년 전 | |
1686062614694-AddOnboardingProduct.ts | 2 년 전 | |
1690996567455-CorrectOnboardingFields.ts | 2 년 전 | |
README.md | 2 년 전 |
You may define custom models (entities) that will be registered on the global container by creating files in the src/models
directory that export an instance of BaseEntity
.
In that case you also need to provide a migration in order to create the table in the database.
See How to Create Migrations in the documentation.
// src/migration/my-migration.ts
import { MigrationInterface, QueryRunner } from "typeorm"
export class MyMigration1617703530229 implements MigrationInterface {
name = "myMigration1617703530229"
public async up(queryRunner: QueryRunner): Promise<void> {
// write you migration here
}
public async down(queryRunner: QueryRunner): Promise<void> {
// write you migration here
}
}