table creation added

This commit is contained in:
2025-12-15 22:44:12 +10:00
parent 5c7d16f418
commit 641df7cfe8
2 changed files with 6 additions and 2 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,4 @@
build
.vscode
**__pycache__
**__pycache__
data

View File

@@ -1,8 +1,11 @@
import os
import sqlite3
from fastapi import FastAPI
DB_PATH = "./data/database.db"
conn = sqlite3.connect(DB_PATH)
cursor = conn.cursor()
cursor.execute("CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, login TEXT NOT NULL UNIQUE, password TEXT NOT NULL)")
app = FastAPI(
docs_url=None, # Disable Swagger UI