import { MigrationInterface , QueryRunner , Table } from "typeorm" ; import { query } from "express" ; export class CreateUsers1596555350634 implements MigrationInterface { public async up ( queryRunner ) { await queryRunner . createTable ( new Table ( { name : "users" , columns : [ { name : "id" , type : "uuid" , isPrimary : true , generationStrategy : "uuid" , default : "uuid_generate_v4()" , } , { name : "name" , type : "varchar" , } , { name : "username" , type : "varchar" , } , { name : "password" , type : "varchar" , } , { name : "created_at" , type : "timestamp" , default : "now()" , } , ] , } ) ) ; } public async down ( queryRunner ) { await queryRunner . dropTable ( "users" ) ; } }