Feat: start sqlite tribe repository
This commit is contained in:
18
backend/adapters/sqlite.py
Normal file
18
backend/adapters/sqlite.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import sqlite3
|
||||
|
||||
|
||||
def create_tribe_table(conn) -> None:
|
||||
cursor = conn.cursor()
|
||||
cursor.execute(
|
||||
"""
|
||||
CREATE TABLE IF NOT EXISTS tribes(
|
||||
name TEXT PRIMARY KEY UNIQUE,
|
||||
level TEXT
|
||||
)
|
||||
"""
|
||||
)
|
||||
conn.commit()
|
||||
|
||||
|
||||
def create_db(conn) -> None:
|
||||
create_tribe_table(conn)
|
||||
Reference in New Issue
Block a user