Skip to content

Commit

Permalink
@mbridak removed primary key, adjusted column sizes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbridak committed Oct 31, 2024
1 parent 47d6ddb commit bb8dc1a
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions not1mm/lib/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,21 +162,21 @@ def create_callhistory_table(self) -> None:
sql_command = (
"CREATE TABLE IF NOT EXISTS CALLHISTORY ("
"Call VARCHAR(15) NOT NULL, "
"Name VARCHAR(15), "
"Loc1 VARCHAR(10) DEFAULT '', "
"Loc2 VARCHAR(10) DEFAULT '', "
"Name VARCHAR(20), "
"Loc1 VARCHAR(6) DEFAULT '', "
"Loc2 VARCHAR(6) DEFAULT '', "
"Sect VARCHAR(8) DEFAULT '', "
"State VARCHAR(8) DEFAULT '', "
"CK TINYINT DEFAULT 0, "
"BirthDate DATETIME, "
"Exch1 VARCHAR(20) DEFAULT '', "
"Misc VARCHAR(20) DEFAULT '', "
"BirthDate DATE, "
"Exch1 VARCHAR(12) DEFAULT '', "
"Misc VARCHAR(15) DEFAULT '', "
"Power VARCHAR(8) DEFAULT '', "
"CqZone TINYINT DEFAULT 0, "
"ITUZone TINYINT DEFAULT 0, "
"UserText VARCHAR(20) DEFAULT '', "
"LastUpdateNote VARCHAR(20) DEFAULT '', "
"PRIMARY KEY (`Call`) );"
"UserText VARCHAR(60) DEFAULT '', "
"LastUpdateNote VARCHAR(20) DEFAULT '' "
");"
)
cursor.execute(sql_command)
conn.commit()
Expand Down Expand Up @@ -426,7 +426,8 @@ def add_callhistory_items(self, history_list: list) -> None:
cur = conn.cursor()
cur.execute(sql, tuple(values))
conn.commit()
except sqlite3.Error:
except sqlite3.Error as exception:
print(exception)
logger.info("%s", exception)

def add_contest(self, contest: dict) -> None:
Expand Down

0 comments on commit bb8dc1a

Please sign in to comment.