Added sql
This commit is contained in:
12
jokes-bot-v3.0/database.py
Normal file
12
jokes-bot-v3.0/database.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import sqlite3
|
||||
conn = sqlite3.connect('jokes.db')
|
||||
cursor = conn.cursor()
|
||||
cursor.execute('''CREATE TABLE IF NOT EXISTS jokes (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
joke TEXT NOT NULL,
|
||||
contributor TEXT NOT NULL,
|
||||
published TEXT NOT NULL
|
||||
)''')
|
||||
conn.commit()
|
||||
print("✅ Database and table created successfully!")
|
||||
conn.close()
|
||||
Reference in New Issue
Block a user