show right import script on create diagram

This commit is contained in:
Guy Ben-Aharon
2024-08-22 23:52:26 +03:00
committed by Jonathan Fishner
parent a915d8fd16
commit c6287cd51a
9 changed files with 85 additions and 58 deletions

View File

@@ -1,7 +1,4 @@
import { minimizeQuery } from './minimize-script';
const rawPostgresQuery = `
WITH fk_info AS (
export const postgresQuery = `WITH fk_info AS (
select array_to_string(array_agg(CONCAT('{"schema":"', schema_name, '"',
',"table":"', table_name, '"',
',"column":"', fk_column, '"',
@@ -130,4 +127,3 @@ select CONCAT('{ "fk_info": [', coalesce(fk_metadata, ''),
'"}') as " "
from fk_info, pk_info, cols, indexes_metadata, tbls, config, views;
`;
export const postgresQuery = minimizeQuery(rawPostgresQuery);