You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by shaounak February 27, 2024
Modern data warehouses supports create table if not exists or drop table if exists. Is there a way in alembic to run the migrations using this feature. e.g. in the op.create_table, can we create flag. If the value is set for the flag, then issue CREATE TABLE IF NOT EXISTS else issue the default CREATE TABLE statement.
The text was updated successfully, but these errors were encountered:
Just if you are wondering how this will be useful, one of the use cases I would like to present is the migration from tools like Liquibase or any other schema migration tools to Alembic. For the existing systems, many of the entities will already be deployed, hence when the first migration is executed in the upgrade scenario, there will no effect in the structural changes as all the statements will be executed as create table if not exists.
Discussed in #1432
Originally posted by shaounak February 27, 2024
Modern data warehouses supports
create table if not exists
ordrop table if exists
. Is there a way in alembic to run the migrations using this feature. e.g. in the op.create_table, can we create flag. If the value is set for the flag, then issueCREATE TABLE IF NOT EXISTS
else issue the defaultCREATE TABLE
statement.The text was updated successfully, but these errors were encountered: