Initial Kaffeekasse SaaS restart
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
$app = require dirname(__DIR__) . '/app/bootstrap.php';
|
||||
|
||||
if (!$app['database']->isConfigured()) {
|
||||
fwrite(STDERR, "Database config missing.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$schema = file_get_contents(dirname(__DIR__) . '/database/schema.sql');
|
||||
|
||||
if (!is_string($schema) || $schema === '') {
|
||||
fwrite(STDERR, "Schema missing.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$app['database']->pdo()->exec($schema);
|
||||
fwrite(STDOUT, "Schema applied successfully.\n");
|
||||
Reference in New Issue
Block a user