diff --git a/backend/db.py b/backend/db.py index 994231d..7945515 100644 --- a/backend/db.py +++ b/backend/db.py @@ -12,15 +12,14 @@ def init_db(): print("Database already initialized.") return - # Connect to SQLite database (it will create the file if it doesn't exist) conn = sqlite3.connect(db_path) create_tables(conn) - # Insert initial data (e.g., a test animal) cursor = conn.cursor() - cursor.execute('''INSERT INTO animals (name, species, breed, age, personality, image_path) - VALUES (?, ?, ?, ?, ?, ?)''', - ('TestDog', 'Dog', 'Mixed', 2, 'Friendly', '/images/test.jpg')) + cursor.execute(''' + INSERT INTO animals (name, species, breed, age, personality, image_path) + VALUES (?, ?, ?, ?, ?, ?)''', + ('TestDog', 'Dog', 'Mixed', 2, 'Friendly', '/images/test.jpg')) conn.commit() conn.close()