agronholm / apscheduler

Task scheduling library for Python
MIT License
6.18k stars 704 forks source link

Table Prefix for SQLAlchemyDataStore #928

Open jgz opened 3 months ago

jgz commented 3 months ago

Things to check first

Feature description

Ability to add a prefix to the table names when setting up a SQLAlchemyDataStore.

I tried doing what's mentioned in #722 but it doesn't work. The table name is still hardcoded in other places and I didn't want to go down that rabbit hole.

Use case

Would save me some mental damage every time I look at my tables in pgadmin.

dgtlmoon commented 2 months ago

Very cool :)

agronholm commented 2 months ago

Could you elaborate what you mean by "it doesn't work"? What did you try and why didn't it work?

agronholm commented 2 months ago

Have you considered using a separate schema (by passing the schema parameter to SQLAlchemyDataStore?

jgz commented 2 months ago

I did consider using a different schema, but ultimately the table names not having a prefix wasn't a deal breaker for me so I just used it the way it is. It's just annoying and triggers my OCD a bit and I could see it being a problem for others.

It's been a few weeks since I set it up and posted this, so I forget exactly what the issue was with the proposed fix from the #722 . I'll try and look into it again this week and post a better explanation.