Merge pull request 'Dev' (#16) from dev into main
Reviewed-on: #16
This commit was merged in pull request #16.
This commit is contained in:
+6
-1
@@ -118,7 +118,12 @@ function ensure_tables_exist(PDO $pdo): void {
|
||||
// Controleer of de hoofdtabel 'users' al bestaat
|
||||
$result = $pdo->query("SHOW TABLES LIKE 'users'");
|
||||
if ($result && $result->rowCount() > 0) {
|
||||
// Tabellen bestaan al! Geen actie nodig.
|
||||
// Tabellen bestaan al. Voer eventuele niet-destructieve kolom-upgrades uit indien nodig
|
||||
try {
|
||||
$pdo->exec("ALTER TABLE tasks MODIFY external_id VARCHAR(255) NULL");
|
||||
} catch (Throwable $t) {
|
||||
// Kolom bestaat wellicht al of heeft al de juiste lengte
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ CREATE TABLE IF NOT EXISTS `tasks` (
|
||||
`duration_minutes` INT NULL DEFAULT 30,
|
||||
`is_completed` TINYINT(1) NOT NULL DEFAULT 0,
|
||||
`source` VARCHAR(50) NOT NULL DEFAULT 'FOCIZ',
|
||||
`external_id` VARCHAR(100) NULL,
|
||||
`external_id` VARCHAR(255) NULL,
|
||||
`external_url` TEXT NULL,
|
||||
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
|
||||
Reference in New Issue
Block a user