Shahed Nasser 4bc053af83 [WIP]: enhancements for a better onboarding experience (#53) 2 years ago
..
1685715079776-CreateOnboarding.ts 4bc053af83 [WIP]: enhancements for a better onboarding experience (#53) 2 years ago
1686062614694-AddOnboardingProduct.ts 4bc053af83 [WIP]: enhancements for a better onboarding experience (#53) 2 years ago
1690996567455-CorrectOnboardingFields.ts 4bc053af83 [WIP]: enhancements for a better onboarding experience (#53) 2 years ago
README.md 2ce270dd96 address feedback 2 years ago

README.md

Custom migrations

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.

Example

1. Create the migration

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
  }
}