Skip to content

Commit eb6b31c

Browse files
author
RedTea
authored
Merge pull request #36 from RedCokeDevelopment/dev
Fix Database Incorrect Schema
2 parents 0ce530f + cedeb08 commit eb6b31c

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/python-app.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v2
23-
- name: Set up Python 3.8
23+
- name: Set up Python 3.8.0
2424
uses: actions/setup-python@v2
2525
with:
26-
python-version: 3.8
26+
python-version: 3.8.0
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip

Teapot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
time_start = time.perf_counter()
6565
database = teapot.managers.database.__init__()
6666
db = teapot.managers.database.db(database)
67-
db.execute('ALTER DATABASE teapot CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci')
67+
db.execute('ALTER DATABASE `' + teapot.config.db_schema() + '` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci')
6868
db.execute(
6969
'CREATE TABLE IF NOT EXISTS `guilds` (`guild_id` BIGINT, `guild_name` TINYTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci')
7070
db.execute(

teapot/config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ def bot_owner():
1010
def bot_token():
1111
return os.getenv('BOT_TOKEN')
1212

13+
def osu_api_key():
14+
return os.getenv('OSU_API_KEY')
15+
16+
def trn_api_key():
17+
return os.getenv('TRN_API_KEY')
18+
1319

1420
def bot_prefix():
1521
return eval(os.getenv('BOT_PREFIX', "['/teapot ', '/tp']"))

0 commit comments

Comments
 (0)