mirror of
https://github.com/directus/directus.git
synced 2026-02-15 08:45:31 -05:00
Fix things for MySQL
This commit is contained in:
@@ -42,14 +42,10 @@ export default class FieldsService {
|
||||
fields = (await this.service.readByQuery({})) as Field[];
|
||||
}
|
||||
|
||||
const fieldsQuery = this.knex.select('*').from('directus_fields');
|
||||
|
||||
if (collection) {
|
||||
fieldsQuery.where({ collection });
|
||||
}
|
||||
|
||||
const columns = await schemaInspector.columnInfo(collection);
|
||||
|
||||
console.log(columns);
|
||||
|
||||
return columns.map((column) => {
|
||||
const field = fields.find(
|
||||
(field) => field.field === column.name && field.collection === column.table
|
||||
|
||||
Reference in New Issue
Block a user