import { MigrationInterface , QueryRunner , Table } from 'typeorm' ; export class Categories1602208512002 implements MigrationInterface { public async up ( queryRunner ) { await queryRunner . createTable ( new Table ( { name : 'categories' , columns : [ { name : 'id' , type : 'uuid' , isPrimary : true , generationStrategy : 'uuid' , default : 'uuid_generate_v4()' , } , { name : 'name' , type : 'varchar' , } , { name : 'slug' , type : 'varchar' , } , ] , } ) ) ; } public async down ( queryRunner ) { await queryRunner . dropTable ( 'categories' ) ; } }