Replies: 3 comments
-
This template has most of the groundwork laid for you and already and includes a User model (along with an authentication flow) and an Item example model. Take a look into the |
Beta Was this translation helpful? Give feedback.
-
@teschmitt I'm not sure your answer here address the question raised by @lesourcil If I spin up a stack from this template then during migrations tables get created in the Altering the db.base_class to have some metadata from sqlalchemy import MetaData
@as_declarative(metadata=MetaData(schema='some_schema_name'))
... should setup the models to be under
|
Beta Was this translation helpful? Give feedback.
-
In the def run_migrations(connection):
context.configure(connection=connection, target_metadata=target_metadata, compare_type=True, include_schemas=True,
version_table_schema="some_schema_name")
connection.execute(text("CREATE SCHEMA IF NOT EXISTS some_schema_name"))
with context.begin_transaction():
context.run_migrations()
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi normally to add a schema in sqlalchemy i do
Base = declarative_base() Base.metadata.schema = 'schema_name
How can i add this to this stack please ?
Beta Was this translation helpful? Give feedback.
All reactions