Remove varchar, json, timetz and timestamp from being able to be selected when creating column in table editor

This commit is contained in:
Joshen Lim committed 2023-01-21 15:21:14 +08:00
1 parent befecabba9
commit 1d1cabda36
1 file changed
+4 -24
@@ -3,12 +3,12 @@ import { PostgresDataTypeOption } from './SidePanelEditor.types'
export const DATE_FORMAT = 'YYYY-MM-DDTHH:mm:ssZ'
export const NUMERICAL_TYPES = ['int2', 'int4', 'int8', 'float4', 'float8', 'numeric']
export const JSON_TYPES = ['jsonb']
export const TEXT_TYPES = ['text']
export const JSON_TYPES = ['json', 'jsonb']
export const TEXT_TYPES = ['text', 'varchar']
export const TIMESTAMP_TYPES = ['timestamptz']
export const TIMESTAMP_TYPES = ['timestamp', 'timestamptz']
export const DATE_TYPES = ['date']
export const TIME_TYPES = ['time']
export const TIME_TYPES = ['time', 'timetz']
export const DATETIME_TYPES = concat(TIMESTAMP_TYPES, DATE_TYPES, TIME_TYPES)
export const OTHER_DATA_TYPES = ['uuid', 'bool']
@@ -47,11 +47,6 @@ export const POSTGRES_DATA_TYPE_OPTIONS: PostgresDataTypeOption[] = [
description: 'Exact numeric of selectable precision',
type: 'number',
},
{
name: 'json',
description: 'Textual JSON data',
type: 'json',
},
{
name: 'jsonb',
description: 'Binary JSON data, decomposed',
@@ -62,11 +57,6 @@ export const POSTGRES_DATA_TYPE_OPTIONS: PostgresDataTypeOption[] = [
description: 'Variable-length character string',
type: 'text',
},
{
name: 'varchar',
description: 'Variable-length character string',
type: 'text',
},
{
name: 'uuid',
description: 'Universally unique identifier',
@@ -82,16 +72,6 @@ export const POSTGRES_DATA_TYPE_OPTIONS: PostgresDataTypeOption[] = [
description: 'Time of day (no time zone)',
type: 'time',
},
{
name: 'timetz',
description: 'Time of day, including time zone',
type: 'time',
},
{
name: 'timestamp',
description: 'Date and time (no time zone)',
type: 'time',
},
{
name: 'timestamptz',
description: 'Date and time, including time zone',