This is an automated email from the ASF dual-hosted git repository.

alexandrusoare pushed a commit to branch 
alexandrusoare/feat/folders-testing-phase2-v2
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to 
refs/heads/alexandrusoare/feat/folders-testing-phase2-v2 by this push:
     new b259aab6ce5 meh
b259aab6ce5 is described below

commit b259aab6ce54a1b2976154fa53d47ffffea291a7
Author: alexandrusoare <[email protected]>
AuthorDate: Fri Sep 25 14:47:22 2026 +0300

    meh
---
 superset-frontend/src/pages/AnalyticsList/index.tsx      | 16 +++++++++++++++-
 .../2026-05-27_16-01_4567cf3d03cc_add_folder_tables.py   | 11 +++++++++--
 2 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/superset-frontend/src/pages/AnalyticsList/index.tsx 
b/superset-frontend/src/pages/AnalyticsList/index.tsx
index 6a4938a9ef6..c83265f8361 100644
--- a/superset-frontend/src/pages/AnalyticsList/index.tsx
+++ b/superset-frontend/src/pages/AnalyticsList/index.tsx
@@ -183,6 +183,16 @@ const BreadcrumbWrap = styled.div`
   padding: 0;
 `;
 
+const SubMenuWrap = styled.div`
+  .nav-right {
+    gap: ${({ theme }) => theme.sizeUnit * 2}px;
+
+    .superset-button + .superset-button:not(.ant-btn-compact-item) {
+      margin-left: 0;
+    }
+  }
+`;
+
 const chartRegistry = getChartMetadataRegistry();
 
 const createFetchDatasets = async (
@@ -1715,7 +1725,11 @@ function AnalyticsList({
           }
         />
       )}
-      {!breadcrumbLoading && <SubMenu {...menuData} />}
+      {!breadcrumbLoading && (
+        <SubMenuWrap>
+          <SubMenu {...menuData} />
+        </SubMenuWrap>
+      )}
       {!breadcrumbLoading && (
         <ConfirmStatusChange
           title={t('Please confirm')}
diff --git 
a/superset/migrations/versions/2026-05-27_16-01_4567cf3d03cc_add_folder_tables.py
 
b/superset/migrations/versions/2026-05-27_16-01_4567cf3d03cc_add_folder_tables.py
index 70a633f629d..107205db120 100644
--- 
a/superset/migrations/versions/2026-05-27_16-01_4567cf3d03cc_add_folder_tables.py
+++ 
b/superset/migrations/versions/2026-05-27_16-01_4567cf3d03cc_add_folder_tables.py
@@ -80,8 +80,14 @@ def upgrade():
     create_index(FOLDERS_TABLE, "ix_folders_deleted_at", ["deleted_at"])
     op.execute(
         "CREATE UNIQUE INDEX ix_folders_active_parent_name_type "
-        f"ON {FOLDERS_TABLE} (parent_id, name, folder_type) "
-        "WHERE deleted_at IS NULL"
+        f"ON {FOLDERS_TABLE} (COALESCE(parent_id, 0), name, folder_type) "
+        "WHERE deleted_at IS NULL AND is_only_me = false"
+    )
+    # One Only Me folder per user — prevents concurrent creation dupes.
+    op.execute(
+        "CREATE UNIQUE INDEX ix_folders_one_only_me_per_user "
+        f"ON {FOLDERS_TABLE} (created_by_fk) "
+        "WHERE is_only_me = true AND deleted_at IS NULL"
     )
     create_fks_for_table(
         foreign_key_name="fk_folders_parent_id_folders",
@@ -338,6 +344,7 @@ def downgrade():
     )
     drop_table(FOLDER_OBJECTS_TABLE)
 
+    op.execute("DROP INDEX IF EXISTS ix_folders_one_only_me_per_user")
     op.execute("DROP INDEX IF EXISTS ix_folders_active_parent_name_type")
     drop_index(FOLDERS_TABLE, "ix_folders_deleted_at")
     drop_index(FOLDERS_TABLE, "idx_folders_uuid")

Reply via email to