projectEli/Database/createTables.py

44 lines
843 B
Python
Raw Normal View History

import sqlite3
# Connect to the SQLite database
conn = sqlite3.connect("items.db")
cursor = conn.cursor()
# Define the table schema for reloading
cursor.execute(
"""
CREATE TABLE IF NOT EXISTS reloading (
id INTEGER PRIMARY KEY AUTOINCREMENT,
type TEXT,
name TEXT,
rarity INTEGER,
weight REAL,
width INTEGER,
height INTEGER,
stack INTEGER,
value INTEGER
)
"""
)
# Define the table schema for ammo
cursor.execute(
"""
CREATE TABLE IF NOT EXISTS ammo (
id INTEGER PRIMARY KEY AUTOINCREMENT,
type TEXT,
name TEXT,
rarity INTEGER,
weight REAL,
width INTEGER,
height INTEGER,
stack INTEGER,
value INTEGER,
gunpowder INTEGER
)
"""
)
# Close the connection
conn.close()