diff --git a/configuration/etl/etl.d/xdb.json b/configuration/etl/etl.d/xdb.json index b57925e8cb..0c1e497c42 100644 --- a/configuration/etl/etl.d/xdb.json +++ b/configuration/etl/etl.d/xdb.json @@ -45,7 +45,6 @@ "xdb/report-templates.json", "xdb/reports.json", "xdb/restx509.json", - "xdb/roles.json", "xdb/schema-version-history.json", "xdb/session-manager.json", "xdb/users.json", @@ -91,18 +90,6 @@ } } }, - { - "name": "roles", - "definition_file": "xdb/roles.json", - "description": "roles + data", - "endpoints": { - "source": { - "type": "jsonfile", - "name": "roles", - "path": "xdb/roles.json" - } - } - }, { "name": "schema-version", "definition_file": "xdb/schema-version-history.json", diff --git a/configuration/etl/etl.d/xdmod-migration-8_5_1-9_0_0.json b/configuration/etl/etl.d/xdmod-migration-8_5_1-9_0_0.json index 3df7274737..7a8b5eb7b7 100644 --- a/configuration/etl/etl.d/xdmod-migration-8_5_1-9_0_0.json +++ b/configuration/etl/etl.d/xdmod-migration-8_5_1-9_0_0.json @@ -488,6 +488,24 @@ "schema": "modw" } } + }, + { + "name": "remove-role-tables", + "description": "Remove the Role related tables as they are no longer used.", + "namespace": "ETL\\Maintenance", + "class": "ExecuteSql", + "options_class": "MaintenanceOptions", + "sql_file_list": [ + "migrations/8.5.1-9.0.0/role-table-cleanup.sql" + ], + "endpoints": { + "destination": { + "type": "mysql", + "name": "Logger Database", + "config": "database", + "schema": "moddb" + } + } } ] } diff --git a/configuration/etl/etl_action_defs.d/xdb/roles.json b/configuration/etl/etl_action_defs.d/xdb/roles.json deleted file mode 100644 index 723c73ac69..0000000000 --- a/configuration/etl/etl_action_defs.d/xdb/roles.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "#": "This action loads data from a structured file and only needs the table definition", - "table_definition": [ - { - "$ref": "${table_definition_dir}/xdb/roles.json#/table_definition" - } - ] -} diff --git a/configuration/etl/etl_data.d/xdb/roles.json b/configuration/etl/etl_data.d/xdb/roles.json deleted file mode 100644 index 343dbe701e..0000000000 --- a/configuration/etl/etl_data.d/xdb/roles.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - ["role_id", "abbrev", "description"], - [0, "mgr", "Manager"], - [1, "cd", "Center Director"], - [3, "usr", "User"], - [4, "pi", "Principal Investigator"], - [5, "cs", "Center Staff"], - [7, "dev", "Developer"] -] diff --git a/configuration/etl/etl_sql.d/migrations/8.5.1-9.0.0/role-table-cleanup.sql b/configuration/etl/etl_sql.d/migrations/8.5.1-9.0.0/role-table-cleanup.sql new file mode 100644 index 0000000000..63ae82991f --- /dev/null +++ b/configuration/etl/etl_sql.d/migrations/8.5.1-9.0.0/role-table-cleanup.sql @@ -0,0 +1,4 @@ +-- These tables are no longer user and as such are being removed. +DROP TABLE IF EXISTS moddb.UserRoleParameters; +DROP TABLE IF EXISTS moddb.UserRoles; +DROP TABLE IF EXISTS moddb.Roles; diff --git a/configuration/etl/etl_tables.d/xdb/roles.json b/configuration/etl/etl_tables.d/xdb/roles.json deleted file mode 100644 index 430929c7c8..0000000000 --- a/configuration/etl/etl_tables.d/xdb/roles.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "table_definition": { - "name": "Roles", - "engine": "InnoDB", - "columns": [ - { - "name": "role_id", - "type": "int(4)", - "nullable": false, - "default": 0 - }, - { - "name": "abbrev", - "type": "varchar(20)", - "nullable": false - }, - { - "name": "description", - "type": "varchar(30)", - "nullable": true - } - ], - "indexes": [ - { - "name": "PRIMARY", - "columns": [ - "role_id" - ], - "type": "BTREE", - "is_unique": true - } - ], - "triggers": [] - } -}