I created collection but when i create collection inside fields i got this issues #22331
Closed
raselmiazi
started this conversation in
Feature Requests
Replies: 1 comment
-
This is not a feature request, judging from the error you are likely building an invalid payload somewhere. Feel free to ask the community for support in Discord |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I got the error message
here is my All code
import {
createDirectus,
rest,
withToken,
createCollection,
createField
} from '@directus/sdk';
const client = createDirectus(process.env.DIRECTUS_HOST).with(rest());
// Collection schemas
const collectionSchemas = {
"about_us": {
meta: {
collection: 'about_us',
icon: 'supervised_user_circle',
note: null,
display_template: null,
hidden: false,
singleton: false,
translations: null,
archive_field: null,
archive_app_filter: true,
archive_value: null,
unarchive_value: null,
sort_field: null,
accountability: 'all',
color: null,
item_duplication_fields: null,
sort: null,
group: null,
collapse: 'open',
preview_url: null,
versioning: false
},
schema: {
schema: 'public',
name: 'about_us',
comment: null,
fields: {
"id": "integer NOT NULL",
"status": "character varying(255) DEFAULT 'draft'::character varying NOT NULL",
"user_created": "uuid",
"date_created": "timestamp with time zone",
"user_updated": "uuid",
"date_updated": "timestamp with time zone",
"Page_name": "character varying(255)",
"Browser_title": "character varying(255)",
"Disclaimer": "boolean",
"Sitemap": "boolean",
"Page_URL": "character varying(255)",
"Meta_description": "character varying(255)",
"Keywords": "character varying(255)"
}
}
},
"ESG_info_page": {
meta: {
collection: 'ESG_info_page',
icon: 'supervised_user_circle',
note: null,
display_template: null,
hidden: false,
singleton: false,
translations: null,
archive_field: null,
archive_app_filter: true,
archive_value: null,
unarchive_value: null,
sort_field: null,
accountability: 'all',
color: null,
item_duplication_fields: null,
sort: null,
group: null,
collapse: 'open',
preview_url: null,
versioning: false
},
schema: {
schema: 'public',
name: 'ESG_info_page',
comment: null,
fields: {
"id": "integer NOT NULL",
"status": "character varying(255) DEFAULT 'draft'::character varying NOT NULL",
"user_created": "uuid",
"date_created": "timestamp with time zone",
"user_updated": "uuid",
"date_updated": "timestamp with time zone",
"Page_name": "character varying(255)",
"Browser_title": "character varying(255)",
"Disclaimer": "boolean",
"Sitemap": "boolean",
"Page_URL": "character varying(255)",
"Meta_description": "character varying(255)",
"Keywords": "character varying(255)"
}
}
},
"AMC_info_page": {
meta: {
collection: 'AMC_info_page',
icon: 'supervised_user_circle',
note: null,
display_template: null,
hidden: false,
singleton: false,
translations: null,
archive_field: null,
archive_app_filter: true,
archive_value: null,
unarchive_value: null,
sort_field: null,
accountability: 'all',
color: null,
item_duplication_fields: null,
sort: null,
group: null,
collapse: 'open',
preview_url: null,
versioning: false
},
schema: {
schema: 'public',
name: 'AMC_info_page',
comment: null,
fields: {
"id": "integer NOT NULL",
"status": "character varying(255) DEFAULT 'draft'::character varying NOT NULL",
"user_created": "uuid",
"date_created": "timestamp with time zone",
"user_updated": "uuid",
"date_updated": "timestamp with time zone",
"Page_name": "character varying(255)",
"Browser_title": "character varying(255)",
"Disclaimer": "boolean",
"Sitemap": "boolean",
"Page_URL": "character varying(255)",
"Meta_description": "character varying(255)",
"Keywords": "character varying(255)"
}
}
}
};
(async () => {
try {
for (const collectionName in collectionSchemas) {
console.log(
Creating fields for collection ${collectionName}...
);})();
console.log(
[IMPORT DONE]
);Basic Example
No response
Motivation
Detailed Design
Requirements List
Must Have:
Should Have:
Could Have:
Won't Have:
Drawbacks
Alternatives
Adoption Strategy
Unresolved Questions
No response
Beta Was this translation helpful? Give feedback.
All reactions