Skip to content

Conversation

@ericscales
Copy link

Adds schema and bind key as options for SQLAlchemy

@Lxstr
Copy link
Contributor

Lxstr commented Jan 5, 2024

Hi @ericscales just wondering if you could provide some background to this, eg why it's needed, how it works. I don't use SQLAlchemy so may be unaware.

@ericscales
Copy link
Author

Sure thing. These are used as part of Flask-Sqlalchemy when you have multiple binds and a database with multiple schemas.

An example in my case is that I have two DBs I bind to - one is SQL Server and another is postgresql. So I use the functionality described here to setup binds: https://flask-sqlalchemy.palletsprojects.com/en/3.1.x/binds/

For the schemas, in my postgresql database, I may have a schema titled "main" and another titled "secondary". In both cases, the model object has bind = "xyz" and schema= "abc" added.

@Lxstr
Copy link
Contributor

Lxstr commented Jan 20, 2024

Thanks please try the latest release and let me know if that satisfies this need 😃

@Lxstr Lxstr closed this in f07e28f Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants