v0.2.2 - Working on config setup
This commit is contained in:
10
db/init.sh
10
db/init.sh
@@ -114,12 +114,12 @@ verify_database() {
|
||||
local schema_version=$(sqlite3 "$DB_PATH" "PRAGMA user_version;")
|
||||
log_info "Database schema version: $schema_version"
|
||||
|
||||
# Check that main tables exist
|
||||
local table_count=$(sqlite3 "$DB_PATH" "SELECT count(*) FROM sqlite_master WHERE type='table' AND name IN ('events', 'schema_info');")
|
||||
if [ "$table_count" -eq 2 ]; then
|
||||
log_success "Core tables created successfully"
|
||||
# Check that main tables exist (including configuration tables)
|
||||
local table_count=$(sqlite3 "$DB_PATH" "SELECT count(*) FROM sqlite_master WHERE type='table' AND name IN ('events', 'schema_info', 'server_config');")
|
||||
if [ "$table_count" -eq 3 ]; then
|
||||
log_success "Core tables created successfully (including configuration tables)"
|
||||
else
|
||||
log_error "Missing core tables (expected 2, found $table_count)"
|
||||
log_error "Missing core tables (expected 3, found $table_count)"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user