chore(directus): rename *_key to key and skip system key autogen
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
-- Directus key auto-generation triggers
|
-- Directus key auto-generation triggers
|
||||||
-- Target tables: companies, sites, users, systems, roles
|
-- Target tables: companies, sites, users, roles
|
||||||
-- Key format: PREFIX + yyyymmdd + 'X' + 4 digits
|
-- Key format: PREFIX + yyyymmdd + 'X' + 4 digits
|
||||||
-- Example: CP20260404X1234
|
-- Example: CP20260404X1234
|
||||||
|
|
||||||
@@ -47,34 +47,35 @@ BEGIN
|
|||||||
END;
|
END;
|
||||||
$$;
|
$$;
|
||||||
|
|
||||||
DROP TRIGGER IF EXISTS trg_companies_company_key_autogen ON public.companies;
|
DROP TRIGGER IF EXISTS trg_companies_key_autogen ON public.companies;
|
||||||
CREATE TRIGGER trg_companies_company_key_autogen
|
CREATE TRIGGER trg_companies_key_autogen
|
||||||
BEFORE INSERT ON public.companies
|
BEFORE INSERT ON public.companies
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
EXECUTE FUNCTION public.directus_autogen_entity_key('company_key', 'CP');
|
EXECUTE FUNCTION public.directus_autogen_entity_key('key', 'CP');
|
||||||
|
|
||||||
DROP TRIGGER IF EXISTS trg_sites_site_key_autogen ON public.sites;
|
DROP TRIGGER IF EXISTS trg_sites_key_autogen ON public.sites;
|
||||||
CREATE TRIGGER trg_sites_site_key_autogen
|
CREATE TRIGGER trg_sites_key_autogen
|
||||||
BEFORE INSERT ON public.sites
|
BEFORE INSERT ON public.sites
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
EXECUTE FUNCTION public.directus_autogen_entity_key('site_key', 'ST');
|
EXECUTE FUNCTION public.directus_autogen_entity_key('key', 'ST');
|
||||||
|
|
||||||
DROP TRIGGER IF EXISTS trg_users_user_key_autogen ON public.users;
|
DROP TRIGGER IF EXISTS trg_users_key_autogen ON public.users;
|
||||||
CREATE TRIGGER trg_users_user_key_autogen
|
CREATE TRIGGER trg_users_key_autogen
|
||||||
BEFORE INSERT ON public.users
|
BEFORE INSERT ON public.users
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
EXECUTE FUNCTION public.directus_autogen_entity_key('user_key', 'UE');
|
EXECUTE FUNCTION public.directus_autogen_entity_key('key', 'UE');
|
||||||
|
|
||||||
DROP TRIGGER IF EXISTS trg_systems_system_key_autogen ON public.systems;
|
DROP TRIGGER IF EXISTS trg_roles_key_autogen ON public.roles;
|
||||||
CREATE TRIGGER trg_systems_system_key_autogen
|
CREATE TRIGGER trg_roles_key_autogen
|
||||||
BEFORE INSERT ON public.systems
|
|
||||||
FOR EACH ROW
|
|
||||||
EXECUTE FUNCTION public.directus_autogen_entity_key('system_key', 'SY');
|
|
||||||
|
|
||||||
DROP TRIGGER IF EXISTS trg_roles_role_key_autogen ON public.roles;
|
|
||||||
CREATE TRIGGER trg_roles_role_key_autogen
|
|
||||||
BEFORE INSERT ON public.roles
|
BEFORE INSERT ON public.roles
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
EXECUTE FUNCTION public.directus_autogen_entity_key('role_key', 'RL');
|
EXECUTE FUNCTION public.directus_autogen_entity_key('key', 'RL');
|
||||||
|
|
||||||
|
-- cleanup old trigger names to avoid duplicates from previous scripts
|
||||||
|
DROP TRIGGER IF EXISTS trg_companies_company_key_autogen ON public.companies;
|
||||||
|
DROP TRIGGER IF EXISTS trg_sites_site_key_autogen ON public.sites;
|
||||||
|
DROP TRIGGER IF EXISTS trg_users_user_key_autogen ON public.users;
|
||||||
|
DROP TRIGGER IF EXISTS trg_systems_system_key_autogen ON public.systems;
|
||||||
|
DROP TRIGGER IF EXISTS trg_roles_role_key_autogen ON public.roles;
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|||||||
@@ -258,10 +258,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collection": "companies",
|
"collection": "companies",
|
||||||
"field": "company_key",
|
"field": "key",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"schema": {
|
"schema": {
|
||||||
"name": "company_key",
|
"name": "key",
|
||||||
"table": "companies",
|
"table": "companies",
|
||||||
"data_type": "character varying",
|
"data_type": "character varying",
|
||||||
"default_value": null,
|
"default_value": null,
|
||||||
@@ -270,7 +270,7 @@
|
|||||||
"numeric_precision": null,
|
"numeric_precision": null,
|
||||||
"numeric_scale": null,
|
"numeric_scale": null,
|
||||||
"is_generated": false,
|
"is_generated": false,
|
||||||
"is_nullable": false,
|
"is_nullable": true,
|
||||||
"is_unique": true,
|
"is_unique": true,
|
||||||
"is_indexed": false,
|
"is_indexed": false,
|
||||||
"is_primary_key": false,
|
"is_primary_key": false,
|
||||||
@@ -282,20 +282,20 @@
|
|||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"collection": "companies",
|
"collection": "companies",
|
||||||
"field": "company_key",
|
"field": "key",
|
||||||
"special": null,
|
"special": null,
|
||||||
"interface": "input",
|
"interface": "input",
|
||||||
"options": null,
|
"options": null,
|
||||||
"display": null,
|
"display": null,
|
||||||
"display_options": null,
|
"display_options": null,
|
||||||
"readonly": false,
|
"readonly": true,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"sort": 2,
|
"sort": 1,
|
||||||
"width": "half",
|
"width": "half",
|
||||||
"translations": null,
|
"translations": null,
|
||||||
"note": null,
|
"note": null,
|
||||||
"conditions": null,
|
"conditions": null,
|
||||||
"required": true,
|
"required": false,
|
||||||
"group": null,
|
"group": null,
|
||||||
"validation": null,
|
"validation": null,
|
||||||
"validation_message": null,
|
"validation_message": null,
|
||||||
@@ -363,7 +363,7 @@
|
|||||||
},
|
},
|
||||||
"readonly": false,
|
"readonly": false,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"sort": 1,
|
"sort": 2,
|
||||||
"width": "half",
|
"width": "half",
|
||||||
"translations": null,
|
"translations": null,
|
||||||
"note": null,
|
"note": null,
|
||||||
@@ -459,8 +459,8 @@
|
|||||||
"display_options": null,
|
"display_options": null,
|
||||||
"readonly": false,
|
"readonly": false,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"sort": 2,
|
"sort": 3,
|
||||||
"width": "half",
|
"width": "full",
|
||||||
"translations": null,
|
"translations": null,
|
||||||
"note": null,
|
"note": null,
|
||||||
"conditions": null,
|
"conditions": null,
|
||||||
@@ -521,43 +521,6 @@
|
|||||||
"searchable": true
|
"searchable": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"collection": "companies",
|
|
||||||
"field": "sites",
|
|
||||||
"type": "alias",
|
|
||||||
"schema": null,
|
|
||||||
"meta": {
|
|
||||||
"collection": "companies",
|
|
||||||
"field": "sites",
|
|
||||||
"special": [
|
|
||||||
"o2m"
|
|
||||||
],
|
|
||||||
"interface": "list-o2m",
|
|
||||||
"options": {
|
|
||||||
"layout": "table",
|
|
||||||
"fields": [
|
|
||||||
"name",
|
|
||||||
"status",
|
|
||||||
"users",
|
|
||||||
"roles"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"display": "related-values",
|
|
||||||
"display_options": null,
|
|
||||||
"readonly": false,
|
|
||||||
"hidden": false,
|
|
||||||
"sort": 3,
|
|
||||||
"width": "full",
|
|
||||||
"translations": null,
|
|
||||||
"note": null,
|
|
||||||
"conditions": null,
|
|
||||||
"required": false,
|
|
||||||
"group": null,
|
|
||||||
"validation": null,
|
|
||||||
"validation_message": null,
|
|
||||||
"searchable": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"collection": "companies",
|
"collection": "companies",
|
||||||
"field": "date_updated",
|
"field": "date_updated",
|
||||||
@@ -610,20 +573,26 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collection": "companies",
|
"collection": "companies",
|
||||||
"field": "system_info",
|
"field": "sites",
|
||||||
"type": "alias",
|
"type": "alias",
|
||||||
"schema": null,
|
"schema": null,
|
||||||
"meta": {
|
"meta": {
|
||||||
"collection": "companies",
|
"collection": "companies",
|
||||||
"field": "system_info",
|
"field": "sites",
|
||||||
"special": [
|
"special": [
|
||||||
"alias",
|
"o2m"
|
||||||
"no-data",
|
|
||||||
"group"
|
|
||||||
],
|
],
|
||||||
"interface": "group-raw",
|
"interface": "list-o2m",
|
||||||
"options": null,
|
"options": {
|
||||||
"display": null,
|
"layout": "table",
|
||||||
|
"fields": [
|
||||||
|
"name",
|
||||||
|
"status",
|
||||||
|
"users",
|
||||||
|
"roles"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"display": "related-values",
|
||||||
"display_options": null,
|
"display_options": null,
|
||||||
"readonly": false,
|
"readonly": false,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
@@ -689,6 +658,37 @@
|
|||||||
"searchable": true
|
"searchable": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"collection": "companies",
|
||||||
|
"field": "system_info",
|
||||||
|
"type": "alias",
|
||||||
|
"schema": null,
|
||||||
|
"meta": {
|
||||||
|
"collection": "companies",
|
||||||
|
"field": "system_info",
|
||||||
|
"special": [
|
||||||
|
"alias",
|
||||||
|
"no-data",
|
||||||
|
"group"
|
||||||
|
],
|
||||||
|
"interface": "group-raw",
|
||||||
|
"options": null,
|
||||||
|
"display": null,
|
||||||
|
"display_options": null,
|
||||||
|
"readonly": false,
|
||||||
|
"hidden": false,
|
||||||
|
"sort": 5,
|
||||||
|
"width": "full",
|
||||||
|
"translations": null,
|
||||||
|
"note": null,
|
||||||
|
"conditions": null,
|
||||||
|
"required": false,
|
||||||
|
"group": null,
|
||||||
|
"validation": null,
|
||||||
|
"validation_message": null,
|
||||||
|
"searchable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"collection": "roles",
|
"collection": "roles",
|
||||||
"field": "id",
|
"field": "id",
|
||||||
@@ -749,7 +749,7 @@
|
|||||||
"numeric_precision": null,
|
"numeric_precision": null,
|
||||||
"numeric_scale": null,
|
"numeric_scale": null,
|
||||||
"is_generated": false,
|
"is_generated": false,
|
||||||
"is_nullable": true,
|
"is_nullable": false,
|
||||||
"is_unique": false,
|
"is_unique": false,
|
||||||
"is_indexed": false,
|
"is_indexed": false,
|
||||||
"is_primary_key": false,
|
"is_primary_key": false,
|
||||||
@@ -768,11 +768,12 @@
|
|||||||
"interface": "select-dropdown-m2o",
|
"interface": "select-dropdown-m2o",
|
||||||
"options": {
|
"options": {
|
||||||
"template": "{{name}}",
|
"template": "{{name}}",
|
||||||
"enableCreate": false
|
"enableCreate": false,
|
||||||
|
"enableLink": true
|
||||||
},
|
},
|
||||||
"display": null,
|
"display": null,
|
||||||
"display_options": null,
|
"display_options": null,
|
||||||
"readonly": false,
|
"readonly": true,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"sort": 1,
|
"sort": 1,
|
||||||
"width": "half",
|
"width": "half",
|
||||||
@@ -838,10 +839,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collection": "roles",
|
"collection": "roles",
|
||||||
"field": "role_key",
|
"field": "key",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"schema": {
|
"schema": {
|
||||||
"name": "role_key",
|
"name": "key",
|
||||||
"table": "roles",
|
"table": "roles",
|
||||||
"data_type": "character varying",
|
"data_type": "character varying",
|
||||||
"default_value": null,
|
"default_value": null,
|
||||||
@@ -850,7 +851,7 @@
|
|||||||
"numeric_precision": null,
|
"numeric_precision": null,
|
||||||
"numeric_scale": null,
|
"numeric_scale": null,
|
||||||
"is_generated": false,
|
"is_generated": false,
|
||||||
"is_nullable": false,
|
"is_nullable": true,
|
||||||
"is_unique": true,
|
"is_unique": true,
|
||||||
"is_indexed": false,
|
"is_indexed": false,
|
||||||
"is_primary_key": false,
|
"is_primary_key": false,
|
||||||
@@ -862,20 +863,20 @@
|
|||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"collection": "roles",
|
"collection": "roles",
|
||||||
"field": "role_key",
|
"field": "key",
|
||||||
"special": null,
|
"special": null,
|
||||||
"interface": "input",
|
"interface": "input",
|
||||||
"options": null,
|
"options": null,
|
||||||
"display": null,
|
"display": null,
|
||||||
"display_options": null,
|
"display_options": null,
|
||||||
"readonly": false,
|
"readonly": true,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"sort": 2,
|
"sort": 2,
|
||||||
"width": "half",
|
"width": "half",
|
||||||
"translations": null,
|
"translations": null,
|
||||||
"note": null,
|
"note": null,
|
||||||
"conditions": null,
|
"conditions": null,
|
||||||
"required": true,
|
"required": false,
|
||||||
"group": null,
|
"group": null,
|
||||||
"validation": null,
|
"validation": null,
|
||||||
"validation_message": null,
|
"validation_message": null,
|
||||||
@@ -932,6 +933,52 @@
|
|||||||
"searchable": true
|
"searchable": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"collection": "roles",
|
||||||
|
"field": "role_code",
|
||||||
|
"type": "string",
|
||||||
|
"schema": {
|
||||||
|
"name": "role_code",
|
||||||
|
"table": "roles",
|
||||||
|
"data_type": "character varying",
|
||||||
|
"default_value": null,
|
||||||
|
"generation_expression": null,
|
||||||
|
"max_length": 255,
|
||||||
|
"numeric_precision": null,
|
||||||
|
"numeric_scale": null,
|
||||||
|
"is_generated": false,
|
||||||
|
"is_nullable": false,
|
||||||
|
"is_unique": true,
|
||||||
|
"is_indexed": false,
|
||||||
|
"is_primary_key": false,
|
||||||
|
"has_auto_increment": false,
|
||||||
|
"foreign_key_schema": null,
|
||||||
|
"foreign_key_table": null,
|
||||||
|
"foreign_key_column": null,
|
||||||
|
"comment": null
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"collection": "roles",
|
||||||
|
"field": "role_code",
|
||||||
|
"special": null,
|
||||||
|
"interface": "input",
|
||||||
|
"options": null,
|
||||||
|
"display": null,
|
||||||
|
"display_options": null,
|
||||||
|
"readonly": false,
|
||||||
|
"hidden": false,
|
||||||
|
"sort": 3,
|
||||||
|
"width": "full",
|
||||||
|
"translations": null,
|
||||||
|
"note": null,
|
||||||
|
"conditions": null,
|
||||||
|
"required": true,
|
||||||
|
"group": null,
|
||||||
|
"validation": null,
|
||||||
|
"validation_message": null,
|
||||||
|
"searchable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"collection": "roles",
|
"collection": "roles",
|
||||||
"field": "status",
|
"field": "status",
|
||||||
@@ -993,7 +1040,7 @@
|
|||||||
},
|
},
|
||||||
"readonly": false,
|
"readonly": false,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"sort": 3,
|
"sort": 4,
|
||||||
"width": "half",
|
"width": "half",
|
||||||
"translations": null,
|
"translations": null,
|
||||||
"note": null,
|
"note": null,
|
||||||
@@ -1089,7 +1136,7 @@
|
|||||||
"display_options": null,
|
"display_options": null,
|
||||||
"readonly": false,
|
"readonly": false,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"sort": 4,
|
"sort": 5,
|
||||||
"width": "half",
|
"width": "half",
|
||||||
"translations": null,
|
"translations": null,
|
||||||
"note": null,
|
"note": null,
|
||||||
@@ -1175,7 +1222,7 @@
|
|||||||
"display_options": null,
|
"display_options": null,
|
||||||
"readonly": false,
|
"readonly": false,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"sort": 5,
|
"sort": 6,
|
||||||
"width": "full",
|
"width": "full",
|
||||||
"translations": null,
|
"translations": null,
|
||||||
"note": null,
|
"note": null,
|
||||||
@@ -1206,7 +1253,7 @@
|
|||||||
"display_options": null,
|
"display_options": null,
|
||||||
"readonly": false,
|
"readonly": false,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"sort": 6,
|
"sort": 7,
|
||||||
"width": "full",
|
"width": "full",
|
||||||
"translations": null,
|
"translations": null,
|
||||||
"note": null,
|
"note": null,
|
||||||
@@ -1402,52 +1449,6 @@
|
|||||||
"searchable": true
|
"searchable": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"collection": "sites",
|
|
||||||
"field": "site_key",
|
|
||||||
"type": "string",
|
|
||||||
"schema": {
|
|
||||||
"name": "site_key",
|
|
||||||
"table": "sites",
|
|
||||||
"data_type": "character varying",
|
|
||||||
"default_value": null,
|
|
||||||
"generation_expression": null,
|
|
||||||
"max_length": 255,
|
|
||||||
"numeric_precision": null,
|
|
||||||
"numeric_scale": null,
|
|
||||||
"is_generated": false,
|
|
||||||
"is_nullable": false,
|
|
||||||
"is_unique": true,
|
|
||||||
"is_indexed": false,
|
|
||||||
"is_primary_key": false,
|
|
||||||
"has_auto_increment": false,
|
|
||||||
"foreign_key_schema": null,
|
|
||||||
"foreign_key_table": null,
|
|
||||||
"foreign_key_column": null,
|
|
||||||
"comment": null
|
|
||||||
},
|
|
||||||
"meta": {
|
|
||||||
"collection": "sites",
|
|
||||||
"field": "site_key",
|
|
||||||
"special": null,
|
|
||||||
"interface": "input",
|
|
||||||
"options": null,
|
|
||||||
"display": null,
|
|
||||||
"display_options": null,
|
|
||||||
"readonly": false,
|
|
||||||
"hidden": false,
|
|
||||||
"sort": 2,
|
|
||||||
"width": "half",
|
|
||||||
"translations": null,
|
|
||||||
"note": null,
|
|
||||||
"conditions": null,
|
|
||||||
"required": true,
|
|
||||||
"group": null,
|
|
||||||
"validation": null,
|
|
||||||
"validation_message": null,
|
|
||||||
"searchable": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"collection": "sites",
|
"collection": "sites",
|
||||||
"field": "company_id",
|
"field": "company_id",
|
||||||
@@ -1488,10 +1489,10 @@
|
|||||||
"display_options": {
|
"display_options": {
|
||||||
"template": "{{name}}"
|
"template": "{{name}}"
|
||||||
},
|
},
|
||||||
"readonly": false,
|
"readonly": true,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"sort": 1,
|
"sort": 1,
|
||||||
"width": "full",
|
"width": "half",
|
||||||
"translations": null,
|
"translations": null,
|
||||||
"note": null,
|
"note": null,
|
||||||
"conditions": null,
|
"conditions": null,
|
||||||
@@ -1538,6 +1539,52 @@
|
|||||||
"searchable": true
|
"searchable": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"collection": "sites",
|
||||||
|
"field": "key",
|
||||||
|
"type": "string",
|
||||||
|
"schema": {
|
||||||
|
"name": "key",
|
||||||
|
"table": "sites",
|
||||||
|
"data_type": "character varying",
|
||||||
|
"default_value": null,
|
||||||
|
"generation_expression": null,
|
||||||
|
"max_length": 255,
|
||||||
|
"numeric_precision": null,
|
||||||
|
"numeric_scale": null,
|
||||||
|
"is_generated": false,
|
||||||
|
"is_nullable": true,
|
||||||
|
"is_unique": true,
|
||||||
|
"is_indexed": false,
|
||||||
|
"is_primary_key": false,
|
||||||
|
"has_auto_increment": false,
|
||||||
|
"foreign_key_schema": null,
|
||||||
|
"foreign_key_table": null,
|
||||||
|
"foreign_key_column": null,
|
||||||
|
"comment": null
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"collection": "sites",
|
||||||
|
"field": "key",
|
||||||
|
"special": null,
|
||||||
|
"interface": "input",
|
||||||
|
"options": null,
|
||||||
|
"display": null,
|
||||||
|
"display_options": null,
|
||||||
|
"readonly": true,
|
||||||
|
"hidden": false,
|
||||||
|
"sort": 2,
|
||||||
|
"width": "half",
|
||||||
|
"translations": null,
|
||||||
|
"note": null,
|
||||||
|
"conditions": null,
|
||||||
|
"required": false,
|
||||||
|
"group": null,
|
||||||
|
"validation": null,
|
||||||
|
"validation_message": null,
|
||||||
|
"searchable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"collection": "sites",
|
"collection": "sites",
|
||||||
"field": "date_created",
|
"field": "date_created",
|
||||||
@@ -2001,52 +2048,6 @@
|
|||||||
"searchable": true
|
"searchable": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"collection": "users",
|
|
||||||
"field": "user_key",
|
|
||||||
"type": "string",
|
|
||||||
"schema": {
|
|
||||||
"name": "user_key",
|
|
||||||
"table": "users",
|
|
||||||
"data_type": "character varying",
|
|
||||||
"default_value": null,
|
|
||||||
"generation_expression": null,
|
|
||||||
"max_length": 255,
|
|
||||||
"numeric_precision": null,
|
|
||||||
"numeric_scale": null,
|
|
||||||
"is_generated": false,
|
|
||||||
"is_nullable": false,
|
|
||||||
"is_unique": true,
|
|
||||||
"is_indexed": false,
|
|
||||||
"is_primary_key": false,
|
|
||||||
"has_auto_increment": false,
|
|
||||||
"foreign_key_schema": null,
|
|
||||||
"foreign_key_table": null,
|
|
||||||
"foreign_key_column": null,
|
|
||||||
"comment": null
|
|
||||||
},
|
|
||||||
"meta": {
|
|
||||||
"collection": "users",
|
|
||||||
"field": "user_key",
|
|
||||||
"special": null,
|
|
||||||
"interface": "input",
|
|
||||||
"options": null,
|
|
||||||
"display": null,
|
|
||||||
"display_options": null,
|
|
||||||
"readonly": false,
|
|
||||||
"hidden": false,
|
|
||||||
"sort": 2,
|
|
||||||
"width": "half",
|
|
||||||
"translations": null,
|
|
||||||
"note": null,
|
|
||||||
"conditions": null,
|
|
||||||
"required": true,
|
|
||||||
"group": null,
|
|
||||||
"validation": null,
|
|
||||||
"validation_message": null,
|
|
||||||
"searchable": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"collection": "users",
|
"collection": "users",
|
||||||
"field": "sub",
|
"field": "sub",
|
||||||
@@ -2093,6 +2094,52 @@
|
|||||||
"searchable": true
|
"searchable": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"collection": "users",
|
||||||
|
"field": "key",
|
||||||
|
"type": "string",
|
||||||
|
"schema": {
|
||||||
|
"name": "key",
|
||||||
|
"table": "users",
|
||||||
|
"data_type": "character varying",
|
||||||
|
"default_value": null,
|
||||||
|
"generation_expression": null,
|
||||||
|
"max_length": 255,
|
||||||
|
"numeric_precision": null,
|
||||||
|
"numeric_scale": null,
|
||||||
|
"is_generated": false,
|
||||||
|
"is_nullable": true,
|
||||||
|
"is_unique": true,
|
||||||
|
"is_indexed": false,
|
||||||
|
"is_primary_key": false,
|
||||||
|
"has_auto_increment": false,
|
||||||
|
"foreign_key_schema": null,
|
||||||
|
"foreign_key_table": null,
|
||||||
|
"foreign_key_column": null,
|
||||||
|
"comment": null
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"collection": "users",
|
||||||
|
"field": "key",
|
||||||
|
"special": null,
|
||||||
|
"interface": "input",
|
||||||
|
"options": null,
|
||||||
|
"display": null,
|
||||||
|
"display_options": null,
|
||||||
|
"readonly": true,
|
||||||
|
"hidden": false,
|
||||||
|
"sort": 2,
|
||||||
|
"width": "half",
|
||||||
|
"translations": null,
|
||||||
|
"note": null,
|
||||||
|
"conditions": null,
|
||||||
|
"required": false,
|
||||||
|
"group": null,
|
||||||
|
"validation": null,
|
||||||
|
"validation_message": null,
|
||||||
|
"searchable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"collection": "users",
|
"collection": "users",
|
||||||
"field": "date_created",
|
"field": "date_created",
|
||||||
@@ -2493,7 +2540,7 @@
|
|||||||
"readonly": false,
|
"readonly": false,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"sort": 5,
|
"sort": 5,
|
||||||
"width": "full",
|
"width": "half",
|
||||||
"translations": null,
|
"translations": null,
|
||||||
"note": null,
|
"note": null,
|
||||||
"conditions": null,
|
"conditions": null,
|
||||||
@@ -2758,10 +2805,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collection": "systems",
|
"collection": "systems",
|
||||||
"field": "system_key",
|
"field": "key",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"schema": {
|
"schema": {
|
||||||
"name": "system_key",
|
"name": "key",
|
||||||
"table": "systems",
|
"table": "systems",
|
||||||
"data_type": "character varying",
|
"data_type": "character varying",
|
||||||
"default_value": null,
|
"default_value": null,
|
||||||
@@ -2782,7 +2829,7 @@
|
|||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"collection": "systems",
|
"collection": "systems",
|
||||||
"field": "system_key",
|
"field": "key",
|
||||||
"special": null,
|
"special": null,
|
||||||
"interface": "input",
|
"interface": "input",
|
||||||
"options": null,
|
"options": null,
|
||||||
@@ -3071,6 +3118,42 @@
|
|||||||
"searchable": true
|
"searchable": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"collection": "systems",
|
||||||
|
"field": "roles",
|
||||||
|
"type": "alias",
|
||||||
|
"schema": null,
|
||||||
|
"meta": {
|
||||||
|
"collection": "systems",
|
||||||
|
"field": "roles",
|
||||||
|
"special": [
|
||||||
|
"o2m"
|
||||||
|
],
|
||||||
|
"interface": "list-o2m",
|
||||||
|
"options": {
|
||||||
|
"layout": "table",
|
||||||
|
"fields": [
|
||||||
|
"name",
|
||||||
|
"status",
|
||||||
|
"role_code"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"display": null,
|
||||||
|
"display_options": null,
|
||||||
|
"readonly": false,
|
||||||
|
"hidden": false,
|
||||||
|
"sort": 4,
|
||||||
|
"width": "full",
|
||||||
|
"translations": null,
|
||||||
|
"note": null,
|
||||||
|
"conditions": null,
|
||||||
|
"required": false,
|
||||||
|
"group": null,
|
||||||
|
"validation": null,
|
||||||
|
"validation_message": null,
|
||||||
|
"searchable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"collection": "systems",
|
"collection": "systems",
|
||||||
"field": "user_updated",
|
"field": "user_updated",
|
||||||
@@ -3151,35 +3234,6 @@
|
|||||||
"validation_message": null,
|
"validation_message": null,
|
||||||
"searchable": true
|
"searchable": true
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"collection": "systems",
|
|
||||||
"field": "roles",
|
|
||||||
"type": "alias",
|
|
||||||
"schema": null,
|
|
||||||
"meta": {
|
|
||||||
"collection": "systems",
|
|
||||||
"field": "roles",
|
|
||||||
"special": [
|
|
||||||
"o2m"
|
|
||||||
],
|
|
||||||
"interface": "list-o2m",
|
|
||||||
"options": null,
|
|
||||||
"display": null,
|
|
||||||
"display_options": null,
|
|
||||||
"readonly": false,
|
|
||||||
"hidden": false,
|
|
||||||
"sort": null,
|
|
||||||
"width": "full",
|
|
||||||
"translations": null,
|
|
||||||
"note": null,
|
|
||||||
"conditions": null,
|
|
||||||
"required": false,
|
|
||||||
"group": null,
|
|
||||||
"validation": null,
|
|
||||||
"validation_message": null,
|
|
||||||
"searchable": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"relations": [
|
"relations": [
|
||||||
@@ -3313,6 +3367,32 @@
|
|||||||
"one_deselect_action": "nullify"
|
"one_deselect_action": "nullify"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"collection": "roles_sites",
|
||||||
|
"field": "roles_id",
|
||||||
|
"related_collection": "roles",
|
||||||
|
"schema": {
|
||||||
|
"constraint_name": "roles_sites_roles_id_foreign",
|
||||||
|
"table": "roles_sites",
|
||||||
|
"column": "roles_id",
|
||||||
|
"foreign_key_schema": "public",
|
||||||
|
"foreign_key_table": "roles",
|
||||||
|
"foreign_key_column": "id",
|
||||||
|
"on_update": "NO ACTION",
|
||||||
|
"on_delete": "CASCADE"
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"many_collection": "roles_sites",
|
||||||
|
"many_field": "roles_id",
|
||||||
|
"one_collection": "roles",
|
||||||
|
"one_field": "sites",
|
||||||
|
"one_collection_field": null,
|
||||||
|
"one_allowed_collections": null,
|
||||||
|
"junction_field": "sites_id",
|
||||||
|
"sort_field": null,
|
||||||
|
"one_deselect_action": "delete"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"collection": "roles_sites",
|
"collection": "roles_sites",
|
||||||
"field": "sites_id",
|
"field": "sites_id",
|
||||||
@@ -3340,29 +3420,29 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collection": "roles_sites",
|
"collection": "sites",
|
||||||
"field": "roles_id",
|
"field": "company_id",
|
||||||
"related_collection": "roles",
|
"related_collection": "companies",
|
||||||
"schema": {
|
"schema": {
|
||||||
"constraint_name": "roles_sites_roles_id_foreign",
|
"constraint_name": "sites_company_id_foreign",
|
||||||
"table": "roles_sites",
|
"table": "sites",
|
||||||
"column": "roles_id",
|
"column": "company_id",
|
||||||
"foreign_key_schema": "public",
|
"foreign_key_schema": "public",
|
||||||
"foreign_key_table": "roles",
|
"foreign_key_table": "companies",
|
||||||
"foreign_key_column": "id",
|
"foreign_key_column": "id",
|
||||||
"on_update": "NO ACTION",
|
"on_update": "NO ACTION",
|
||||||
"on_delete": "CASCADE"
|
"on_delete": "NO ACTION"
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"many_collection": "roles_sites",
|
"many_collection": "sites",
|
||||||
"many_field": "roles_id",
|
"many_field": "company_id",
|
||||||
"one_collection": "roles",
|
"one_collection": "companies",
|
||||||
"one_field": "sites",
|
"one_field": "sites",
|
||||||
"one_collection_field": null,
|
"one_collection_field": null,
|
||||||
"one_allowed_collections": null,
|
"one_allowed_collections": null,
|
||||||
"junction_field": "sites_id",
|
"junction_field": null,
|
||||||
"sort_field": null,
|
"sort_field": null,
|
||||||
"one_deselect_action": "delete"
|
"one_deselect_action": "nullify"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -3417,32 +3497,6 @@
|
|||||||
"one_deselect_action": "nullify"
|
"one_deselect_action": "nullify"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"collection": "sites",
|
|
||||||
"field": "company_id",
|
|
||||||
"related_collection": "companies",
|
|
||||||
"schema": {
|
|
||||||
"constraint_name": "sites_company_id_foreign",
|
|
||||||
"table": "sites",
|
|
||||||
"column": "company_id",
|
|
||||||
"foreign_key_schema": "public",
|
|
||||||
"foreign_key_table": "companies",
|
|
||||||
"foreign_key_column": "id",
|
|
||||||
"on_update": "NO ACTION",
|
|
||||||
"on_delete": "NO ACTION"
|
|
||||||
},
|
|
||||||
"meta": {
|
|
||||||
"many_collection": "sites",
|
|
||||||
"many_field": "company_id",
|
|
||||||
"one_collection": "companies",
|
|
||||||
"one_field": "sites",
|
|
||||||
"one_collection_field": null,
|
|
||||||
"one_allowed_collections": null,
|
|
||||||
"junction_field": null,
|
|
||||||
"sort_field": null,
|
|
||||||
"one_deselect_action": "nullify"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"collection": "users",
|
"collection": "users",
|
||||||
"field": "user_updated",
|
"field": "user_updated",
|
||||||
|
|||||||
Reference in New Issue
Block a user