malo čiščenja kode in robustnostni popravek (kreiranje prazne sheme)

This commit is contained in:
2026-03-22 16:42:28 +01:00
parent 48536d57ab
commit dbf4c2da16
3 changed files with 24 additions and 8 deletions

15
db_schema.py Normal file
View File

@@ -0,0 +1,15 @@
import sqlite3
def create_tables(conn):
"""
Ustvari potrebne tabele v bazi, če še ne obstajajo.
"""
cursor = conn.cursor()
cursor.execute('''
CREATE TABLE IF NOT EXISTS songs (
id INTEGER PRIMARY KEY,
title TEXT,
lyrics TEXT
)
''')
conn.commit()