- Fix mustChangePassword session flag for users with pw=NULL - Add PrF (Private Führung) as new ArtFuehrung type - Split datetime-local into separate date + TimePicker5 (5-min steps, auto-repeat) - Responsive Beginn/Ende layout: stacked on mobile, inline on desktop - Sort BEOs alphabetically by Kürzel in selector - Title shows active kuppel; hide user display in header - Selected BEOs show Kürzel only (name stays in dropdown) - Session timeout reduced to 1 hour - Add CLAUDE.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
43 lines
1.3 KiB
SQL
43 lines
1.3 KiB
SQL
-- Datenbank: sternwarte
|
|
-- Die Tabelle 'beos' ist bereits vorhanden und wird hier nicht neu angelegt.
|
|
|
|
CREATE TABLE objekte (
|
|
ID INT AUTO_INCREMENT PRIMARY KEY,
|
|
Name VARCHAR(200) NOT NULL UNIQUE,
|
|
LastUsed TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
CREATE TABLE logbuch (
|
|
ID INT AUTO_INCREMENT PRIMARY KEY,
|
|
Kuppel ENUM('West','Ost','Süd','Pluto') NOT NULL DEFAULT 'West',
|
|
ArtFuehrung ENUM('RF','SF','PrF','BEOS','SonF','TD','Beob','ToT','Sonst') NOT NULL DEFAULT 'RF',
|
|
Beginn DATETIME NOT NULL,
|
|
Ende DATETIME NOT NULL,
|
|
Besucher INT DEFAULT 0,
|
|
Bemerkungen TEXT,
|
|
WetterTemp DECIMAL(5,1),
|
|
WetterFeuchte DECIMAL(5,1),
|
|
WetterDruck DECIMAL(7,1),
|
|
created_by INT,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
FOREIGN KEY (created_by) REFERENCES beos(id)
|
|
);
|
|
|
|
CREATE TABLE logbuch_beos (
|
|
ID INT AUTO_INCREMENT PRIMARY KEY,
|
|
LogbuchID INT NOT NULL,
|
|
BeoID INT NOT NULL,
|
|
FOREIGN KEY (LogbuchID) REFERENCES logbuch(ID) ON DELETE CASCADE,
|
|
FOREIGN KEY (BeoID) REFERENCES beos(id)
|
|
);
|
|
|
|
CREATE TABLE logbuch_objekte (
|
|
ID INT AUTO_INCREMENT PRIMARY KEY,
|
|
LogbuchID INT NOT NULL,
|
|
ObjektID INT,
|
|
ObjektName VARCHAR(200) NOT NULL,
|
|
FOREIGN KEY (LogbuchID) REFERENCES logbuch(ID) ON DELETE CASCADE,
|
|
FOREIGN KEY (ObjektID) REFERENCES objekte(ID)
|
|
);
|