feat: Adds Sunburst chart migration logic (#25343)

This commit is contained in:
Michael S. Molina
2023-09-22 09:44:40 -03:00
committed by GitHub
parent 9bd97ef4f2
commit 0c083bdc1a
4 changed files with 16 additions and 3 deletions

View File

@@ -28,6 +28,7 @@ class VizType(str, Enum):
DUAL_LINE = "dual_line"
AREA = "area"
PIVOT_TABLE = "pivot_table"
SUNBURST = "sunburst"
@click.group()
@@ -76,6 +77,7 @@ def migrate(viz_type: VizType, is_downgrade: bool = False) -> None:
MigrateAreaChart,
MigrateDualLine,
MigratePivotTable,
MigrateSunburst,
MigrateTreeMap,
)
@@ -84,6 +86,7 @@ def migrate(viz_type: VizType, is_downgrade: bool = False) -> None:
VizType.DUAL_LINE: MigrateDualLine,
VizType.AREA: MigrateAreaChart,
VizType.PIVOT_TABLE: MigratePivotTable,
VizType.SUNBURST: MigrateSunburst,
}
if is_downgrade:
migrations[viz_type].downgrade(db.session)