one time code default NULL

This commit is contained in:
einhornimmond 2025-10-13 13:09:51 +02:00
parent 6e13f5d8ab
commit a31ba3756a
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
CREATE TABLE community_handshake_states (
id int unsigned NOT NULL AUTO_INCREMENT,
handshake_id int unsigned NOT NULL,
one_time_code int unsigned NOT NULL,
one_time_code int unsigned NULL DEFAULT NULL,
public_key binary(32) NOT NULL,
api_version varchar(255) NOT NULL,
status varchar(255) NOT NULL DEFAULT 'OPEN_CONNECTION',

View File

@ -10,8 +10,8 @@ export class CommunityHandshakeState extends BaseEntity {
@Column({ name: 'handshake_id', type: 'int', unsigned: true })
handshakeId: number
@Column({ name: 'one_time_code', type: 'int', unsigned: true })
oneTimeCode: number
@Column({ name: 'one_time_code', type: 'int', unsigned: true, default: null, nullable: true })
oneTimeCode?: number
@Column({ name: 'public_key', type: 'binary', length: 32 })
publicKey: Buffer