adding documents
Deploy / deploy (push) Successful in 38s

This commit is contained in:
2026-05-08 00:33:37 +02:00
parent 4f18b193c9
commit b70e8cd6e4
6 changed files with 530 additions and 1 deletions
+11
View File
@@ -16,6 +16,17 @@ function getDbConnection() {
}
function migrate($db) {
$db->exec("CREATE TABLE IF NOT EXISTS documents (
id INT AUTO_INCREMENT PRIMARY KEY,
doc_type VARCHAR(50) NOT NULL,
team_id INT NOT NULL,
title VARCHAR(255) NOT NULL,
content TEXT,
occurred_at DATETIME NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (team_id) REFERENCES teams(id) ON DELETE CASCADE
)");
$db->exec("CREATE TABLE IF NOT EXISTS network_shapes (
id INT AUTO_INCREMENT PRIMARY KEY,
label VARCHAR(255) NOT NULL DEFAULT '',