mirror of
https://github.com/jaypyles/Scraperr.git
synced 2025-12-12 10:45:58 +00:00
16 lines
341 B
Python
16 lines
341 B
Python
from api.backend.database.common import connect, QUERIES
|
|
import logging
|
|
|
|
LOG = logging.getLogger(__name__)
|
|
|
|
|
|
def init_database():
|
|
cursor = connect()
|
|
|
|
for query in QUERIES["init"].strip().split(";"):
|
|
if query.strip():
|
|
LOG.info(f"Executing query: {query}")
|
|
_ = cursor.execute(query)
|
|
|
|
cursor.close()
|