diff options
author | Alex Grönholm <alex.gronholm@nextday.fi> | 2014-07-02 03:14:32 +0300 |
---|---|---|
committer | Alex Grönholm <alex.gronholm@nextday.fi> | 2014-07-02 03:14:32 +0300 |
commit | 2feff848e6f4e8c15ba6b9ab5c1b10e9590eb3f4 (patch) | |
tree | 3388df82b67084fa0b37ec3c9702942838477457 | |
parent | 2d794e22b335d45863ffe148a5b4afc6f3999e9e (diff) | |
download | apscheduler-2feff848e6f4e8c15ba6b9ab5c1b10e9590eb3f4.tar.gz |
Decreased maximum length of the "id" column in SQLAlchemyJobStore due to MySQL/InnoDB limitations
-rw-r--r-- | apscheduler/jobstores/sqlalchemy.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apscheduler/jobstores/sqlalchemy.py b/apscheduler/jobstores/sqlalchemy.py index f1692a5..2a13ad5 100644 --- a/apscheduler/jobstores/sqlalchemy.py +++ b/apscheduler/jobstores/sqlalchemy.py @@ -44,9 +44,10 @@ class SQLAlchemyJobStore(BaseJobStore): else: raise ValueError('Need either "engine" or "url" defined') + # 767 = max key length in MySQL for InnoDB tables self.jobs_t = Table( tablename, metadata, - Column('id', Unicode(1024, _warn_on_bytestring=False), primary_key=True), + Column('id', Unicode(767, _warn_on_bytestring=False), primary_key=True), Column('next_run_time', BigInteger, index=True), Column('job_state', LargeBinary, nullable=False) ) |