Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import sqlite3
  2. import datetime
  3. import pytz
  4. from tzlocal import get_localzone
  5.  
  6. db = sqlite3.connect("tztestings.sqlite", detect_types=sqlite3.PARSE_DECLTYPES)
  7. db.execute("CREATE TABLE IF NOT EXISTS accounts (name TEXT PRIMARY KEY NOT NULL, balance INTEGER NOT NULL)")
  8. db.execute("CREATE TABLE IF NOT EXISTS history (time TIMESTAMP NOT NULL, timediff TZINFO,"
  9. " account TEXT NOT NULL, amount INTEGER NOT NULL, PRIMARY KEY (time, account))")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement