Import full distant schema and store in remote server (#5211)

We should not depend on the foreign data wrapper type to manage distant
table. The remote server should be enough to handle the table creation.

Here is the new flow to fetch available tables:
- check if the remote server have available tables already stored
- if not, import full schema in a temporary schema
- copy the tables into the available tables field 
- delete the schema

Left todo:
- update remote server input for postgres so we receive the schema

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
Thomas Trompette
2024-04-30 14:18:33 +02:00
committed by GitHub
parent 907f0a1ea6
commit 3a61c922f1
27 changed files with 356 additions and 332 deletions

View File

@ -811,7 +811,6 @@ export type RemoteTable = {
export type RemoteTableInput = {
name: Scalars['String']['input'];
remoteServerId: Scalars['ID']['input'];
schema: Scalars['String']['input'];
};
/** Status of the table */