Skip to content

Commit

Permalink
db: update db_database to db_name
Browse files Browse the repository at this point in the history
  • Loading branch information
RustyBower committed Feb 8, 2019
1 parent 47c44e4 commit 2c0b884
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sopel/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class Nicknames(BASE):
"""
__tablename__ = 'nicknames'
nick_id = Column(Integer, ForeignKey('nick_ids.nick_id'), primary_key=True)
slug = Column(String(255), primary_key=True)
canonical = Column(String(255))
slug = Column(String, primary_key=True)
canonical = Column(String)


class NickValues(BASE):
Expand Down Expand Up @@ -122,15 +122,15 @@ def __init__(self, config):
db_pass = config.core.db_pass
db_host = config.core.db_host
db_port = config.core.db_port # Optional
db_database = config.core.db_database # Optional, depending on DB
db_name = config.core.db_name # Optional, depending on DB

# Ensure we have all our variables defined
if db_user is None or db_pass is None or db_host is None:
raise Exception('Please make sure the following core '
'configuration values are defined: '
'db_user, db_pass, db_host')
self.url = URL(drivername=drivername, username=db_user, password=db_pass,
host=db_host, port=db_port, database=db_database)
host=db_host, port=db_port, database=db_name)

self.engine = create_engine(self.url)

Expand Down

0 comments on commit 2c0b884

Please sign in to comment.