Update foreign table to distant table schema (#5508)
Closes #5069 back-end part And: - do not display schemaPendingUpdates status on remote server lists as this call will become too costly if there are dozens of servers - (refacto) create foreignTableService After this is merged we will be able to delete remoteTable's availableTables column
This commit is contained in:
@ -53,6 +53,7 @@ export const SettingsIntegrationDatabaseConnectionSummaryCard = ({
|
||||
<>
|
||||
<SettingsIntegrationDatabaseConnectionSyncStatus
|
||||
connectionId={connectionId}
|
||||
shouldFetchPendingSchemaUpdates
|
||||
/>
|
||||
<Dropdown
|
||||
dropdownId={dropdownId}
|
||||
|
||||
@ -6,15 +6,18 @@ import { isDefined } from '~/utils/isDefined';
|
||||
type SettingsIntegrationDatabaseConnectionSyncStatusProps = {
|
||||
connectionId: string;
|
||||
skip?: boolean;
|
||||
shouldFetchPendingSchemaUpdates?: boolean;
|
||||
};
|
||||
|
||||
export const SettingsIntegrationDatabaseConnectionSyncStatus = ({
|
||||
connectionId,
|
||||
skip,
|
||||
shouldFetchPendingSchemaUpdates,
|
||||
}: SettingsIntegrationDatabaseConnectionSyncStatusProps) => {
|
||||
const { tables, error } = useGetDatabaseConnectionTables({
|
||||
connectionId,
|
||||
skip,
|
||||
shouldFetchPendingSchemaUpdates,
|
||||
});
|
||||
|
||||
if (isDefined(error)) {
|
||||
|
||||
@ -42,6 +42,7 @@ export const useDatabaseConnection = () => {
|
||||
const { tables } = useGetDatabaseConnectionTables({
|
||||
connectionId,
|
||||
skip: !connection,
|
||||
shouldFetchPendingSchemaUpdates: true,
|
||||
});
|
||||
|
||||
return { connection, integration, databaseKey, tables };
|
||||
|
||||
Reference in New Issue
Block a user