This commit is contained in:
askeluv
2019-03-08 20:07:26 +08:00
parent 9f69d2cb76
commit 88704ce417
14 changed files with 505 additions and 522 deletions

View File

@@ -1,9 +1,9 @@
import {MigrationInterface, QueryRunner, Table} from "typeorm";
import { MigrationInterface, QueryRunner, Table } from 'typeorm';
const table = new Table({
name: 'raw.github_fork',
columns: [
{ name: 'observed_timestamp', type: 'numeric', isPrimary: true},
{ name: 'observed_timestamp', type: 'numeric', isPrimary: true },
{ name: 'name', type: 'varchar', isPrimary: true },
{ name: 'owner_login', type: 'varchar', isPrimary: true },
@@ -17,12 +17,11 @@ const table = new Table({
{ name: 'forks', type: 'numeric', isNullable: false },
{ name: 'open_issues', type: 'numeric', isNullable: false },
{ name: 'network', type: 'numeric', isNullable: true },
{ name: 'subscribers', type: 'numeric', isNullable: true }
{ name: 'subscribers', type: 'numeric', isNullable: true },
],
});
export class CreateGithubFork1552044685566 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<any> {
await queryRunner.createTable(table);
}
@@ -30,5 +29,4 @@ export class CreateGithubFork1552044685566 implements MigrationInterface {
public async down(queryRunner: QueryRunner): Promise<any> {
await queryRunner.dropTable(table);
}
}