From 34b1b391d4b03659a96f868857c230002b351514 Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Mon, 9 Sep 2024 17:57:00 +0200 Subject: More updates --- src/application/mystic/forum/attributes/References.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/application/mystic/forum/attributes') diff --git a/src/application/mystic/forum/attributes/References.php b/src/application/mystic/forum/attributes/References.php index ac431ff..9e33927 100644 --- a/src/application/mystic/forum/attributes/References.php +++ b/src/application/mystic/forum/attributes/References.php @@ -7,9 +7,12 @@ class References { public function __construct( public readonly string $foreignTableName, public readonly ?string $foreignColumnName = null, + public readonly bool $cascadeOnDelete = false, ) {} public function __toString(): string { - return $this->foreignTableName . ($this->foreignColumnName !== null ? " ({$this->foreignColumnName})" : ""); + return $this->foreignTableName + . ($this->foreignColumnName !== null ? " ({$this->foreignColumnName})" : "") + . ($this->cascadeOnDelete ? " ON DELETE CASCADE" : ""); } } -- cgit v1.2.3