From 0f940705c0b47561ac4b82540f40a84585c8a1eb Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 30 May 2019 10:55:48 -0400 Subject: [PATCH] test --- sopel_modules/SpiceBot/Database.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/sopel_modules/SpiceBot/Database.py b/sopel_modules/SpiceBot/Database.py index 88231d9..2a10747 100644 --- a/sopel_modules/SpiceBot/Database.py +++ b/sopel_modules/SpiceBot/Database.py @@ -7,7 +7,7 @@ This is the SpiceBot Database # sopel imports from sopel.tools import Identifier import sopel.db -from sopel.db import SopelDB, _deserialize, Nicknames, NickIDs +from sopel.db import SopelDB, _deserialize from .Config import config as botconfig @@ -21,6 +21,24 @@ import json BASE = declarative_base() +class NickIDs(BASE): + """ + NickIDs SQLAlchemy Class + """ + __tablename__ = 'spice_nick_ids' + nick_id = Column(Integer, primary_key=True) + + +class Nicknames(BASE): + """ + Nicknames SQLAlchemy Class + """ + __tablename__ = 'spice_nicknames' + nick_id = Column(Integer, ForeignKey('spice_nick_ids.nick_id'), primary_key=True) + slug = Column(String(255), primary_key=True) + canonical = Column(String(255)) + + class NickValues(BASE): """ NickValues SQLAlchemy Class