1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-06 10:52:31 +01:00

Merge pull request #555 from unknownPerson115/patch-1

Fixed potential guild message SQL constraints
This commit is contained in:
Erkin Alp Güney 2022-01-24 20:51:16 +03:00 committed by GitHub
commit efd6b4bfbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,8 +84,10 @@ export class Message extends BaseClass {
@RelationId((message: Message) => message.member)
member_id: string;
@JoinColumn({ name: "member_id" })
@ManyToOne(() => Member)
@JoinColumn({ name: "author_id", referencedColumnName: "id" })
@ManyToOne(() => User, {
onDelete: "CASCADE",
})
member?: Member;
@Column({ nullable: true })