selena/modules/user/birthday_db.py
2024-06-21 13:22:13 -04:00

19 lines
363 B
Python

import sqlite3
def initialize_db():
conn = sqlite3.connect('birthdays.db')
cursor = conn.cursor()
cursor.execute('''
CREATE TABLE IF NOT EXISTS birthdays (
user_id TEXT PRIMARY KEY,
birthday TEXT
)
''')
conn.commit()
conn.close()
def get_connection():
return sqlite3.connect('birthdays.db')