mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
chore: migrate to more db migration utils (#33155)
This commit is contained in:
committed by
GitHub
parent
ae48dba3e1
commit
b6628cdfd2
@@ -303,7 +303,7 @@ def add_columns(table_name: str, *columns: Column) -> None:
|
||||
"""
|
||||
Adds new columns to an existing database table.
|
||||
|
||||
If a column already exist, it logs an informational message and skips the adding process.
|
||||
If a column already exist, or the table doesn't exist, it logs an informational message and skips the adding process.
|
||||
Otherwise, it proceeds to add the new column to the table.
|
||||
|
||||
The operation is performed using Alembic's batch_alter_table.
|
||||
@@ -333,7 +333,7 @@ def drop_columns(table_name: str, *columns: str) -> None:
|
||||
"""
|
||||
Drops specified columns from an existing database table.
|
||||
|
||||
If a column does not exist, it logs an informational message and skips the dropping process.
|
||||
If a column or table does not exist, it logs an informational message and skips the dropping process.
|
||||
Otherwise, it proceeds to remove the column from the table.
|
||||
|
||||
The operation is performed using Alembic's batch_alter_table.
|
||||
|
||||
Reference in New Issue
Block a user