summaryrefslogtreecommitdiff
path: root/src/application/mystic/forum/attributes
diff options
context:
space:
mode:
authorJonas Kohl2024-09-09 17:57:00 +0200
committerJonas Kohl2024-09-09 17:57:00 +0200
commit34b1b391d4b03659a96f868857c230002b351514 (patch)
tree4173dd2831963d2bf85676de7e821b913640e43a /src/application/mystic/forum/attributes
parent415a0a96a76afbe7f1ad2f51862641793caf1b6c (diff)
More updates
Diffstat (limited to 'src/application/mystic/forum/attributes')
-rw-r--r--src/application/mystic/forum/attributes/References.php5
1 files changed, 4 insertions, 1 deletions
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" : "");
}
}