From 52e3bcfd2968ffdab8c124dc8dad9cb9e3e995ac Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 17 Apr 2019 00:33:02 +0900 Subject: [PATCH] =?UTF-8?q?Meta=20=E3=82=92=E4=BA=8C=E9=87=8D=E3=81=AB?= =?UTF-8?q?=E3=83=87=E3=83=BC=E3=82=BF=E3=83=99=E3=83=BC=E3=82=B9=E3=81=AB?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/misc/fetch-meta.ts | 3 +-- src/models/entities/meta.ts | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/misc/fetch-meta.ts b/src/misc/fetch-meta.ts index cf1fc474ce..a459f07729 100644 --- a/src/misc/fetch-meta.ts +++ b/src/misc/fetch-meta.ts @@ -1,6 +1,5 @@ import { Meta } from '../models/entities/meta'; import { Metas } from '../models'; -import { genId } from './gen-id'; export default async function(): Promise { const meta = await Metas.findOne(); @@ -8,7 +7,7 @@ export default async function(): Promise { return meta; } else { return Metas.save({ - id: genId(), + id: 'x' } as Meta); } } diff --git a/src/models/entities/meta.ts b/src/models/entities/meta.ts index f3ac23bac7..be41cf3589 100644 --- a/src/models/entities/meta.ts +++ b/src/models/entities/meta.ts @@ -1,9 +1,11 @@ import { Entity, Column, PrimaryColumn } from 'typeorm'; -import { id } from '../id'; @Entity() export class Meta { - @PrimaryColumn(id()) + @PrimaryColumn({ + type: 'varchar', + length: 32 + }) public id: string; @Column('varchar', {