add list for databases with schemas (#248)

This commit is contained in:
Guy Ben-Aharon
2024-10-07 09:56:34 +03:00
committed by GitHub
parent 2efa7fe696
commit 0345f2e6a7
2 changed files with 12 additions and 3 deletions

View File

@@ -15,7 +15,10 @@ import { useNavigate } from 'react-router-dom';
import { useConfig } from '@/hooks/use-config';
import type { DatabaseEdition } from '@/lib/domain/database-edition';
import type { DBSchema } from '@/lib/domain/db-schema';
import { schemaNameToSchemaId } from '@/lib/domain/db-schema';
import {
databasesWithSchemas,
schemaNameToSchemaId,
} from '@/lib/domain/db-schema';
import { useLocalConfig } from '@/hooks/use-local-config';
import { defaultSchemas } from '@/lib/data/default-schemas';
import { useEventEmitter } from 'ahooks';
@@ -57,8 +60,7 @@ export const ChartDBProvider: React.FC<React.PropsWithChildren> = ({
const schemas = useMemo(
() =>
databaseType === DatabaseType.POSTGRESQL ||
databaseType === DatabaseType.SQL_SERVER
databasesWithSchemas.includes(databaseType)
? [
...new Set(
tables