From f0e41c58aa91e9fece1e68c32f951f8d23222f8c Mon Sep 17 00:00:00 2001 From: aweso Date: Tue, 13 Jan 2026 21:36:48 +0900 Subject: [PATCH] update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- barobill_registration/init_db.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/barobill_registration/init_db.php b/barobill_registration/init_db.php index fb6abc4..ace1ac3 100644 --- a/barobill_registration/init_db.php +++ b/barobill_registration/init_db.php @@ -6,7 +6,11 @@ try { require_once("../lib/mydb.php"); $pdo = db_connect(); - $sql = file_get_contents("schema.sql"); + $schemaPath = __DIR__ . "/schema.sql"; + if (!file_exists($schemaPath)) { + throw new Exception("schema.sql file not found at: " . $schemaPath); + } + $sql = file_get_contents($schemaPath); $pdo->exec($sql); echo "Table 'barobill_members' initialized successfully."; } catch (Throwable $e) {