| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/seaside2.pacim.de/web/database/migrations/ |
Upload File : |
-- 032: Mehrere Notizen pro Buchung mit Timestamp, editier-/löschbar.
--
-- Bisher hatte jede Buchung nur ein freies `notes`-Feld (überschrieben).
-- Für das Check-in-Modal sind aber chronologische Counter-Notizen sinnvoll
-- ("13:42 Familie noch nicht da", "14:05 angerufen", "14:30 vor Ort").
--
-- Hier eine separate Tabelle, damit das Bestandsfeld unangetastet bleibt
-- (z.B. Buchungs-Notiz aus Wizard) und nicht migriert werden muss.
CREATE TABLE IF NOT EXISTS `booking_notes` (
`id` INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
`booking_id` INT UNSIGNED NOT NULL,
`body` TEXT NOT NULL,
`created_by` VARCHAR(191) DEFAULT NULL,
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` DATETIME DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
KEY `idx_booking_notes_booking` (`booking_id`, `created_at`),
CONSTRAINT `fk_booking_notes_booking` FOREIGN KEY (`booking_id`)
REFERENCES `bookings`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;