Skip to content

Commit

Permalink
Fixed enums not being created in the same schema as the tables
Browse files Browse the repository at this point in the history
Fixes #885.
  • Loading branch information
agronholm committed May 11, 2024
1 parent 8feb98f commit c921db4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/versionhistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ APScheduler, see the :doc:`migration section <migration>`.
reached and then a job was completed, thus making job processing possible again
(PR by MohammadAmin Vahedinia)
- Fixed the shutdown procedure of the Redis event broker
- Fixed ``SQLAlchemyDataStore`` not respecting custom schema name when creating enums

**4.0.0a4**

Expand Down
4 changes: 2 additions & 2 deletions src/apscheduler/datastores/sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def get_table_definitions(self) -> MetaData:
Column("args", LargeBinary),
Column("kwargs", LargeBinary),
Column("paused", Boolean, nullable=False, server_default=literal(False)),
Column("coalesce", Enum(CoalescePolicy), nullable=False),
Column("coalesce", Enum(CoalescePolicy, metadata=metadata), nullable=False),
Column("misfire_grace_time", interval_type),
Column("max_jitter", interval_type),
*next_fire_time_tzoffset_columns,
Expand Down Expand Up @@ -324,7 +324,7 @@ def get_table_definitions(self) -> MetaData:
"job_results",
metadata,
Column("job_id", Uuid, primary_key=True),
Column("outcome", Enum(JobOutcome), nullable=False),
Column("outcome", Enum(JobOutcome, metadata=metadata), nullable=False),
Column("started_at", timestamp_type, index=True),
Column("finished_at", timestamp_type, nullable=False, index=True),
Column("expires_at", timestamp_type, nullable=False, index=True),
Expand Down

0 comments on commit c921db4

Please sign in to comment.