fix(migrations): ♻️ Adjust name of migration
This commit is contained in:
38
src/database/migrations/1660010491828-CreateRouteHistoric.ts
Normal file
38
src/database/migrations/1660010491828-CreateRouteHistoric.ts
Normal 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');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user