18 lines
406 B
Python
18 lines
406 B
Python
import sqlite3
|
|
|
|
def init_db():
|
|
conn = sqlite3.connect('games.db')
|
|
cursor = conn.cursor()
|
|
cursor.execute('''
|
|
CREATE TABLE IF NOT EXISTS games (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
image TEXT,
|
|
title TEXT NOT NULL,
|
|
date TEXT,
|
|
buyer TEXT,
|
|
owned BOOLEAN NOT NULL
|
|
)
|
|
''')
|
|
conn.commit()
|
|
conn.close()
|