fix(migrations): ♻️ Adjust name of migration

This commit is contained in:
Hugo Falcao
2022-08-09 00:39:43 -03:00
parent ef1e3c578b
commit 87e8a49a63

View File

@@ -0,0 +1,38 @@
import {MigrationInterface, QueryRunner, Table} from "typeorm";
export class CreateRouteHistoric1660010491828 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({
name: 'route_historic',
columns: [
{
name: 'id_historic',
type: 'integer',
isPrimary: true,
isGenerated: true,
generationStrategy: 'increment',
},
{
name: 'route_id',
type: 'integer',
},
{
name: 'user_id',
type: 'uuid',
},
{
name: 'date',
type: 'date',
},
],
}),
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropTable('route_historic');
}
}