diff --git a/src/misc/fetch-meta.ts b/src/misc/fetch-meta.ts index cf1fc474c..a459f0772 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 f3ac23bac..be41cf358 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', {