aminghadersohi commented on code in PR #40129: URL: https://github.com/apache/superset/pull/40129#discussion_r3342338608
########## superset/migrations/versions/2026-05-08_12-00_7c4a8d09ca37_add_deleted_at_to_slices.py: ########## @@ -0,0 +1,52 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +"""Add deleted_at column and index to slices for soft-delete. + +Adds a nullable ``deleted_at`` column and an index on it to the +``slices`` table to support soft deletion of charts. Companion to +the ``SoftDeleteMixin`` infrastructure shipped in PR #39977. + +Revision ID: 7c4a8d09ca37 +Revises: 33d7e0e21daa +Create Date: 2026-05-08 12:00:00.000000 +""" + +from sqlalchemy import Column, DateTime + +from superset.migrations.shared.utils import ( + add_columns, + create_index, + drop_columns, + drop_index, +) + +# revision identifiers, used by Alembic. +revision = "7c4a8d09ca37" +down_revision = "33d7e0e21daa" Review Comment: **MEDIUM — sibling `down_revision` conflict must be resolved before any two of the three PRs land together** This migration shares `down_revision = "33d7e0e21daa"` with #40128 (dashboards) and #40130 (datasets). When any two of the three land in the same DB, Alembic raises `ValueError: Multiple head revisions` on the third. A merge migration is required — e.g.: ```python # merge_charts_dashboards_soft_delete.py down_revision = ("7c4a8d09ca37", "9e1f3b8c4d2a") # charts + dashboards (example) revision = "<new_hash>" ``` Please write and land the merge migration alongside whichever of the three PRs merges second. The PR description documents the need but does not include a plan or PR link for the merge migration. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
