diff --git a/src/components/admin/ColumnDialog.tsx b/src/components/admin/ColumnDialog.tsx index bb7db87..2269a95 100644 --- a/src/components/admin/ColumnDialog.tsx +++ b/src/components/admin/ColumnDialog.tsx @@ -22,7 +22,7 @@ type ColumnDialogProps = { columns?: Array<{ column_name: string }>; onClose: () => void; onSubmit: (data: any) => Promise; - dataTypes?: string[]; + dataTypes: string[]; }; export default function ColumnDialog({ @@ -32,7 +32,7 @@ export default function ColumnDialog({ columns = [], onClose, onSubmit, - dataTypes = ['INTEGER', 'BIGINT', 'VARCHAR', 'TEXT', 'BOOLEAN', 'TIMESTAMP', 'DATE', 'JSON', 'JSONB'], + dataTypes, }: ColumnDialogProps) { const [columnName, setColumnName] = useState(''); const [columnType, setColumnType] = useState('VARCHAR'); diff --git a/src/components/admin/CreateTableDialog.tsx b/src/components/admin/CreateTableDialog.tsx index 45dc4da..a5e31ce 100644 --- a/src/components/admin/CreateTableDialog.tsx +++ b/src/components/admin/CreateTableDialog.tsx @@ -31,14 +31,14 @@ type CreateTableDialogProps = { open: boolean; onClose: () => void; onCreate: (tableName: string, columns: Column[]) => Promise; - dataTypes?: string[]; + dataTypes: string[]; }; export default function CreateTableDialog({ open, onClose, onCreate, - dataTypes = ['INTEGER', 'BIGINT', 'SERIAL', 'VARCHAR', 'TEXT', 'BOOLEAN', 'TIMESTAMP', 'DATE', 'JSON', 'JSONB'], + dataTypes, }: CreateTableDialogProps) { const [tableName, setTableName] = useState(''); const [columns, setColumns] = useState([