chore(backend): update template to v0.6.0, conflicts left
This commit is contained in:
1 parent
aa5361c88b
commit
e730b88d6d
12 files changed
+109
-21
No files matched your search
@@ -16,14 +16,20 @@ if config.config_file_name is not None:
|
||||
target_metadata = SQLModel.metadata
|
||||
|
||||
|
||||
<<<<<<< before updating
|
||||
def _async_url() -> str:
|
||||
return env.db.connection_url.replace("postgresql://", "postgresql+asyncpg://", 1)
|
||||
=======
|
||||
def include_name(name: str | None, type_: str, _parents: object) -> bool:
|
||||
return not (type_ == "table" and name is not None and name.startswith("taskiq_"))
|
||||
>>>>>>> after updating
|
||||
|
||||
|
||||
def run_migrations_offline() -> None:
|
||||
context.configure(
|
||||
url=_async_url(),
|
||||
target_metadata=target_metadata,
|
||||
include_name=include_name,
|
||||
literal_binds=True,
|
||||
dialect_opts={"paramstyle": "named"},
|
||||
)
|
||||
@@ -31,8 +37,17 @@ def run_migrations_offline() -> None:
|
||||
context.run_migrations()
|
||||
|
||||
|
||||
<<<<<<< before updating
|
||||
def _do_run_migrations(connection) -> None: # noqa: ANN001
|
||||
context.configure(connection=connection, target_metadata=target_metadata)
|
||||
=======
|
||||
def do_run_migrations(connection: Connection) -> None:
|
||||
context.configure(
|
||||
connection=connection,
|
||||
target_metadata=target_metadata,
|
||||
include_name=include_name,
|
||||
)
|
||||
>>>>>>> after updating
|
||||
with context.begin_transaction():
|
||||
context.run_migrations()
|
||||
|
||||
|
||||
Reference in new issue
Block a user