mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
correct publicKey length and table name of entity
This commit is contained in:
parent
c3971222f0
commit
3a17a3491b
@ -1,11 +1,11 @@
|
||||
import { BaseEntity, Entity, PrimaryGeneratedColumn, Column } from 'typeorm'
|
||||
|
||||
@Entity('community')
|
||||
@Entity('communities')
|
||||
export class Community extends BaseEntity {
|
||||
@PrimaryGeneratedColumn('increment', { unsigned: true })
|
||||
id: number
|
||||
|
||||
@Column({ name: 'public_key', type: 'binary', length: 32, default: null, nullable: true })
|
||||
@Column({ name: 'public_key', type: 'binary', length: 64, default: null, nullable: true })
|
||||
publicKey: Buffer
|
||||
|
||||
@Column({ name: 'api_version', length: 10, nullable: false })
|
||||
|
||||
@ -10,7 +10,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
|
||||
await queryFn(`
|
||||
CREATE TABLE IF NOT EXISTS communities (
|
||||
id int unsigned NOT NULL AUTO_INCREMENT,
|
||||
public_key binary(32),
|
||||
public_key binary(64),
|
||||
api_version varchar(10) NOT NULL,
|
||||
endpoint varchar(255) NOT NULL,
|
||||
last_announced_at datetime(3) NOT NULL,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user