mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
@@ -51,6 +51,8 @@ export default async function runSeed(database: Knex) {
|
||||
column = tableBuilder.increments();
|
||||
} else if (columnInfo.type === 'csv') {
|
||||
column = tableBuilder.string(columnName);
|
||||
} else if (columnInfo.type === 'hash') {
|
||||
column = tableBuilder.string(columnName, 255);
|
||||
} else {
|
||||
column = tableBuilder[columnInfo.type!](columnName);
|
||||
}
|
||||
|
||||
@@ -331,6 +331,8 @@ export class FieldsService {
|
||||
column = table[type](field.field, field.schema?.numeric_precision || 10, field.schema?.numeric_scale || 5);
|
||||
} else if (field.type === 'csv') {
|
||||
column = table.string(field.field);
|
||||
} else if (field.type === 'hash') {
|
||||
column = table.string(field.field, 255);
|
||||
} else {
|
||||
column = table[field.type](field.field);
|
||||
}
|
||||
|
||||
@@ -526,5 +526,8 @@ class OASService implements SpecificationSubService {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
hash: {
|
||||
type: 'string',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ export const types = [
|
||||
'timestamp',
|
||||
'binary',
|
||||
'uuid',
|
||||
'hash',
|
||||
'csv',
|
||||
] as const;
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ export default function getLocalType(
|
||||
}
|
||||
|
||||
if (field?.special?.includes('json')) return 'json';
|
||||
if (field?.special?.includes('hash')) return 'hash';
|
||||
if (field?.special?.includes('csv')) return 'csv';
|
||||
if (field?.special?.includes('uuid')) return 'uuid';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user