61 lines
1.1 KiB
Python
61 lines
1.1 KiB
Python
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
|
|
)
|
|
"""
|
|
)
|
|
|
|
# Define the table schema for ammo
|
|
cursor.execute(
|
|
"""
|
|
CREATE TABLE IF NOT EXISTS craft (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
type TEXT,
|
|
name TEXT,
|
|
rarity INTEGER,
|
|
weight REAL,
|
|
width INTEGER,
|
|
height INTEGER,
|
|
stack INTEGER,
|
|
value INTEGER
|
|
)
|
|
"""
|
|
)
|
|
|
|
# Close the connection
|
|
conn.close()
|