mirror of
https://github.com/chartdb/chartdb.git
synced 2025-11-04 22:13:15 +00:00
fix(import-database): remove the default fetch from import database (#718)
* fix(import-database): remove the default fetch from import database * fix(import-default): keep the option to fetch extras like default and comments
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import { DatabaseEdition } from '@/lib/domain/database-edition';
|
||||
import { DatabaseClient } from '@/lib/domain/database-clients';
|
||||
|
||||
const withExtras = true;
|
||||
|
||||
const withDefault = `COALESCE(REPLACE(p.dflt_value, '"', '\\"'), '')`;
|
||||
const withoutDefault = `null`;
|
||||
|
||||
const sqliteQuery = `${`/* Standard SQLite */`}
|
||||
WITH fk_info AS (
|
||||
SELECT
|
||||
@@ -114,7 +119,7 @@ WITH fk_info AS (
|
||||
END
|
||||
ELSE null
|
||||
END,
|
||||
'default', COALESCE(REPLACE(p.dflt_value, '"', '\\"'), '')
|
||||
'default', ${withExtras ? withDefault : withoutDefault}
|
||||
)
|
||||
) AS cols_metadata
|
||||
FROM
|
||||
@@ -287,7 +292,7 @@ WITH fk_info AS (
|
||||
END
|
||||
ELSE null
|
||||
END,
|
||||
'default', COALESCE(REPLACE(p.dflt_value, '"', '\\"'), '')
|
||||
'default', ${withExtras ? withDefault : withoutDefault}
|
||||
)
|
||||
) AS cols_metadata
|
||||
FROM
|
||||
|
||||
Reference in New Issue
Block a user