チャンネルを作成しているとアカウントを削除できないのを修正 (#7653)

* チャンネルを作成しているとアカウントを削除できないのを修正

* CHANGELOG

* nullable
This commit is contained in:
MeiMei 2021-08-18 22:04:04 +09:00 committed by GitHub
parent 6a3a8ba4d0
commit 881b914c6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 2 deletions

View file

@ -23,9 +23,10 @@ export class Channel {
@Index()
@Column({
...id(),
nullable: true,
comment: 'The owner ID.'
})
public userId: User['id'];
public userId: User['id'] | null;
@ManyToOne(type => User, {
onDelete: 'SET NULL'

View file

@ -90,7 +90,7 @@ export const packedChannelSchema = {
},
userId: {
type: 'string' as const,
nullable: false as const, optional: false as const,
nullable: true as const, optional: false as const,
format: 'id',
},
},