Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: remove ghost table name hack (#15260)
Danny Xu7492ef19e763
diff --git a/frontend/src/components/TableDataTable.vue b/frontend/src/components/TableDataTable.vueindex 97349be5a2..26c44d2d2d 100644--- a/frontend/src/components/TableDataTable.vue+++ b/frontend/src/components/TableDataTable.vue@@ -43,7 +43,7 @@ import type { ComposedDatabase } from "@/types";import { Engine } from "@/types/proto/v1/common";import type { TableMetadata } from "@/types/proto/v1/database_service";import { DataClassificationSetting_DataClassificationConfig as DataClassificationConfig } from "@/types/proto/v1/setting_service";-import { bytesToString, hasSchemaProperty, isGhostTable } from "@/utils";+import { bytesToString, hasSchemaProperty } from "@/utils";import TableDetailDrawer from "./TableDetailDrawer.vue";type LocalState = {@@ -239,15 +239,8 @@ const rowProps = (row: TableMetadata) => {};};-const regularTableList = computed(() =>- props.tableList.filter((table) => !isGhostTable(table))-);-const reservedTableList = computed(() =>- props.tableList.filter((table) => isGhostTable(table))-);-const mixedTableList = computed(() => {- const tableList = [...regularTableList.value, ...reservedTableList.value];+ const tableList = props.tableList;if (props.search) {return tableList.filter((table) => {return table.name.toLowerCase().includes(props.search.toLowerCase());diff --git a/frontend/src/components/TableDetailDrawer.vue b/frontend/src/components/TableDetailDrawer.vueindex 9e3f49cccb..f7dfa0ce5b 100644--- a/frontend/src/components/TableDetailDrawer.vue+++ b/frontend/src/components/TableDetailDrawer.vue@@ -22,12 +22,6 @@class="pt-2 pb-2.5 text-xl font-bold leading-6 text-main truncate flex items-center gap-x-3">{{ getTableName(table.name) }}- <BBBadge- v-if="isGhostTable(table)"- text="gh-ost"- :can-remove="false"- class="text-xs"- /></h1></div></div>@@ -256,7 +250,6 @@ import { computedAsync } from "@vueuse/core";import { CodeIcon } from "lucide-vue-next";import { NButton, NPopover } from "naive-ui";import { computed, reactive, ref } from "vue";-import { BBBadge } from "@/bbkit";import ClassificationLevelBadge from "@/components/SchemaTemplate/ClassificationLevelBadge.vue";import TableSchemaViewer from "@/components/TableSchemaViewer.vue";import {@@ -286,7 +279,6 @@ import {hasTableEngineProperty,instanceV1SupportsTrigger,isDatabaseV1Queryable,- isGhostTable,supportStringifyMetadata,} from "@/utils";import ColumnDataTable from "./ColumnDataTable/index.vue";diff --git a/frontend/src/utils/index.ts b/frontend/src/utils/index.tsindex 6c27e76c9c..17de3f0d9d 100644--- a/frontend/src/utils/index.ts+++ b/frontend/src/utils/index.ts@@ -4,7 +4,6 @@ export * from "./collections";export * from "./link";export * from "./role";export * from "./slug";-export * from "./table";export * from "./types";export * from "./util";export * from "./label";diff --git a/frontend/src/utils/table.ts b/frontend/src/utils/table.tsdeleted file mode 100644index 3ec866be8e..0000000000--- a/frontend/src/utils/table.ts+++ /dev/null@@ -1,15 +0,0 @@-import type { TableMetadata } from "@/types/proto/v1/database_service";--export function isGhostTable(table: TableMetadata): boolean {- const { name } = table;- // for future name support with timestamp, e.g. ~table_1234567890_del or _table_1234567890_del- if (name.match(/^(_|~)(.+?)_(\d+)_(ghc|gho|del)$/)) {- return true;- }- // for legacy name support without timestamp, e.g. _table_del or ~table_del- if (name.match(/^(_|~)(.+?)_(ghc|gho|del)$/)) {- return true;- }-- return false;-}