From fc89e22eef0fd72f3f48be5ae7b5b3f00902ecb3 Mon Sep 17 00:00:00 2001 From: Meir Tseitlin Date: Tue, 10 Oct 2017 00:10:23 +0300 Subject: Adding optional schema argument to SQLAlchemy (#224) --- apscheduler/jobstores/sqlalchemy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apscheduler/jobstores/sqlalchemy.py b/apscheduler/jobstores/sqlalchemy.py index b82696e..6bfdc81 100644 --- a/apscheduler/jobstores/sqlalchemy.py +++ b/apscheduler/jobstores/sqlalchemy.py @@ -36,7 +36,7 @@ class SQLAlchemyJobStore(BaseJobStore): """ def __init__(self, url=None, engine=None, tablename='apscheduler_jobs', metadata=None, - pickle_protocol=pickle.HIGHEST_PROTOCOL): + pickle_protocol=pickle.HIGHEST_PROTOCOL, tableschema=None): super(SQLAlchemyJobStore, self).__init__() self.pickle_protocol = pickle_protocol metadata = maybe_ref(metadata) or MetaData() @@ -54,7 +54,8 @@ class SQLAlchemyJobStore(BaseJobStore): tablename, metadata, 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) + Column('job_state', LargeBinary, nullable=False), + schema=tableschema ) def start(self, scheduler, alias): -- cgit v1.2.1