- typeorm migration:create -n {migrationName}
- typeorm migration:run
{
"isPrimary": true,
"name": "id",
"type": "uuid",
"generationStrategy": "uuid",
"default": "uuid_generate_v4()",
}
Before use uuid_generate_v4()
you should execute this command bellow
await queryRunner.query(`CREATE EXTENSION IF NOT EXISTS "uuid-ossp"`);