mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-14 14:33:07 +01:00
better handling of db connections, return timestamp for found builds
This commit is contained in:
28
webinstall/create_db.php
Normal file
28
webinstall/create_db.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
echo "CREATEDB\n";
|
||||
include("functions.php");
|
||||
$database=openDb();
|
||||
if (! isset($database)){
|
||||
die("ERROR: db not set\n");
|
||||
}
|
||||
try{
|
||||
$sql="CREATE TABLE `CIBUILDS` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`tag` varchar(255),
|
||||
`status` varchar(255) NOT NULL,
|
||||
`config` longtext,
|
||||
`environment` VARCHAR(255),
|
||||
`buildflags` longtext,
|
||||
`timestamp` timestamp ,
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
echo "executing $sql<br>";
|
||||
$rt=$database->query($sql);
|
||||
echo "execute OK<br>";
|
||||
} catch (Exception $e){
|
||||
echo "ERROR: ".$e;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user