Last active
December 18, 2019 03:00
-
-
Save songthamtung/6bd077edc2605c8a388c5d0cca116804 to your computer and use it in GitHub Desktop.
{TIMESTAMP}-AddCityColumnToCompany.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {MigrationInterface, QueryRunner} from "typeorm"; | |
export class AddCityColumnToCompany1576405409745 implements MigrationInterface { | |
public async up(queryRunner: QueryRunner): Promise<any> { | |
await queryRunner.query("ALTER TABLE `company` ADD `city` varchar(255) NOT NULL"); | |
} | |
public async down(queryRunner: QueryRunner): Promise<any> { | |
await queryRunner.query("ALTER TABLE `company` DROP COLUMN `city`"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment