We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f576d2 commit d06c521Copy full SHA for d06c521
1 file changed
init.php
@@ -58,6 +58,26 @@ function initDatabase() {
58
echo $e->getMessage();
59
}
60
61
-
+
62
+ function initStorageDatabase() {
63
+ $statements = [
64
+ 'CREATE TABLE IF NOT EXISTS storage (
65
+ storage_id VARCHAR(255) NOT NULL PRIMARY KEY,
66
+ owner VARCHAR(255) NOT NULL
67
+ )'
68
+ ];
69
70
+ try {
71
+ $pdo = new \PDO("sqlite:" . DBPATH);
72
73
+ // create tables
74
+ foreach($statements as $statement){
75
+ $pdo->exec($statement);
76
+ }
77
+ } catch(\PDOException $e) {
78
+ echo $e->getMessage();
79
80
81
initKeys();
82
initDatabase();
83
+ initStorageDatabase();
0 commit comments