Metadata Tables in your generated backend
Metamug Console creates a set of tables in the backend database which are used by the console to store information about error logs, request statistics, query catalog data, user authentication etc. However, these tables are not required when the application is deployed in production. So, these tables can be dropped and we can provide you a script for the same.
The following tables are created by Metamug console in the database when backend is created.
The tables described in points 1,2,3,4 are used by the Metamug console during development and have no useful purpose during production. So we can provide you a script to drop these tables from your production database.
These four tables are used by SQL Catalog Screen and query test feature which enables the user to test a SQL query using optional test data before creating the API. You can find sql reference documentation in sql catalog docs.
These tables are used for Authentication of resources as described on the auth page. More importantly, the MTG_AUTH properties are only essential as it contains the SQL query for authentication. The two tables (
usr_roles) are only provided as default and can be replaced by any other tables containing user data. So, if we remove MTG_AUTH properties, resource authentication feature will no longer be available for use.
These two are default tables provided for user entitlement to resources. They can be used to store user and roles data or alternatively, any other tables can be used.
In addition to the above, we recommend you to not use Metamug console with your production database. Instead, you can connect your development database with the console for API development and then export your backend for use in production.
If you would like to drop these tables use the following script.
-- Console tables DROP TABLE IF EXISTS error_log; DROP TABLE IF EXISTS query_log; DROP TABLE IF EXISTS request_log; -- Query Reference Tables DROP TABLE IF EXISTS mtg_query_reference; DROP TABLE IF EXISTS mtg_query_tag; DROP TABLE IF EXISTS mtg_query_test_data; DROP TABLE IF EXISTS mtg_query_catalog; -- Auth Tables DROP TABLE IF EXISTS usr; DROP TABLE IF EXISTS usr_role;