summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2014-08-12 11:33:13 +0300
committerAlex Grönholm <alex.gronholm@nextday.fi>2014-08-12 11:34:48 +0300
commit68116a34956a8a92dbeeeefcba0ba23061a2e587 (patch)
treef950cab13edd4bbd6f87d0f908cbb78c60030cfc
parentd89b5b42a8731358891cbf2bcea4307c1b9560a0 (diff)
downloadapscheduler-68116a34956a8a92dbeeeefcba0ba23061a2e587.tar.gz
Shortened the ID column of the apscheduler_jobs table in the SQLAlchemy job store to accommodate MySQL limitations (again).
-rw-r--r--apscheduler/jobstores/sqlalchemy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/apscheduler/jobstores/sqlalchemy.py b/apscheduler/jobstores/sqlalchemy.py
index 4e0c0e2..f8a3c15 100644
--- a/apscheduler/jobstores/sqlalchemy.py
+++ b/apscheduler/jobstores/sqlalchemy.py
@@ -44,10 +44,10 @@ class SQLAlchemyJobStore(BaseJobStore):
else:
raise ValueError('Need either "engine" or "url" defined')
- # 767 = max key length in MySQL for InnoDB tables, 25 = precision that translates to an 8-byte float
+ # 191 = max key length in MySQL for InnoDB/utf8mb4 tables, 25 = precision that translates to an 8-byte float
self.jobs_t = Table(
tablename, metadata,
- Column('id', Unicode(767, _warn_on_bytestring=False), primary_key=True),
+ Column('id', Unicode(191, _warn_on_bytestring=False), primary_key=True),
Column('next_run_time', Float(25), index=True),
Column('job_state', LargeBinary, nullable=False)
)