import { MigrationInterface, QueryRunner } from "typeorm"; export class SuggestionsMetadataCreate1635230537428 implements MigrationInterface { public async up(queryRunner: QueryRunner): Promise { await queryRunner.query( `CREATE TABLE IF NOT EXISTS suggestions_metadata ( id INTEGER PRIMARY KEY, user TEXT NOT NULL, suggestion_id INTEGER NOT NULL, time TEXT NOT NULL, language TEXT, filename TEXT, line INTEGER, character INTEGER, offset INTEGER, git_index_sha1 TEXT, git_branch TEXT, git_repo TEXT )` ); } public async down(queryRunner: QueryRunner): Promise { await queryRunner.query(`DROP TABLE IF EXISTS suggestions_metadata`); } }