feat(bugtracker, tokens): Add project search, push_id, target_agent, tags, edit modal, extended severities (idea, wishlist), token actions (copy/toggle/delete), and agent integration guide
This commit is contained in:
@@ -47,6 +47,34 @@ try {
|
||||
}
|
||||
}
|
||||
|
||||
// Execute migration files in sql/migrations/
|
||||
$migrationDir = __DIR__ . '/../sql/migrations';
|
||||
if (is_dir($migrationDir)) {
|
||||
$files = glob($migrationDir . '/*.sql');
|
||||
sort($files);
|
||||
foreach ($files as $mFile) {
|
||||
$mSql = file_get_contents($mFile);
|
||||
$mLines = explode("\n", $mSql);
|
||||
$mClean = [];
|
||||
foreach ($mLines as $l) {
|
||||
$t = trim($l);
|
||||
if (str_starts_with($t, '--') || str_starts_with($t, '#')) continue;
|
||||
$mClean[] = $l;
|
||||
}
|
||||
$mQueries = array_filter(array_map('trim', explode(';', implode("\n", $mClean))));
|
||||
foreach ($mQueries as $mq) {
|
||||
if (!empty($mq)) {
|
||||
try {
|
||||
$pdo->exec($mq);
|
||||
$executed++;
|
||||
} catch (Throwable $e) {
|
||||
// Ignore harmless duplicate column / migration errors
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create / update Admin user: admin / Admin1337!
|
||||
$adminUsername = 'admin';
|
||||
$adminPassword = 'Admin1337!';
|
||||
|
||||
Reference in New Issue
Block a user