DO NOT EXECUTE THIS SCRIPT IF YOU DON'T KNOW WHAT THIS IS FOR

Use the below script with care

Use the below script to cleanup and remove all the application metadata from an existing telidos instance. Replace the rollback at the end with commit before running for obvious reasons.
NOTE: THIS SCRIPT WILL WIPE OUT EVERYTHING FROM AN EXISTING INSTANCE

Use the Script to create a new Application after running the below script to start developing a fresh application.

DELETE FROM ra_object_handlers
      WHERE object_id IN (SELECT object_id
                            FROM ra_objects
                           WHERE org_id > 2);

DELETE FROM ra_object_mapping_columns
      WHERE mapping_id IN (SELECT mapping_id
                             FROM ra_object_mappings
                            WHERE object_id IN (SELECT object_id
                                                  FROM ra_objects
                                                 WHERE org_id > 2));

DELETE FROM ra_object_mappings
      WHERE object_id IN (SELECT object_id
                            FROM ra_objects
                           WHERE org_id > 2);

DELETE FROM rap_object_validations
      WHERE object_id IN (SELECT object_id
                            FROM ra_objects
                           WHERE org_id > 2);

DELETE FROM ra_object_actions
      WHERE object_id IN (SELECT object_id
                            FROM ra_objects
                           WHERE org_id > 2);

DELETE FROM ra_object_attributes
      WHERE object_id IN (SELECT object_id
                            FROM ra_objects
                           WHERE org_id > 2);

DELETE FROM ra_objects_alias
      WHERE org_id > 2;

DELETE FROM ra_objects
      WHERE org_id > 2;

DELETE FROM ra_saved_search
      WHERE page_id IN (SELECT page_id
                          FROM ra_pages
                         WHERE org_id > 2);

DELETE FROM rap_rule_scope
      WHERE rule_id IN (SELECT rule_id
                          FROM rap_client_rules
                         WHERE page_id IN (SELECT page_id
                                             FROM ra_pages
                                            WHERE org_id > 2));

DELETE FROM rap_client_rules
      WHERE page_id IN (SELECT page_id
                          FROM ra_pages
                         WHERE org_id > 2);

DELETE FROM ra_ui_items
      WHERE page_id IN (SELECT page_id
                          FROM ra_pages
                         WHERE org_id > 2);

DELETE FROM ra_ui_items_tl
      WHERE page_id IN (SELECT page_id
                          FROM ra_pages
                         WHERE org_id > 2);

DELETE FROM ra_pages
      WHERE org_id > 2;

DELETE FROM ra_pages_tl
      WHERE org_id > 2;

DELETE FROM ra_files
      WHERE org_id > 2;

DELETE FROM ra_roles_tl
      WHERE org_id > 2;

DELETE FROM ra_roles
      WHERE org_id > 2;

DELETE FROM ra_access
      WHERE org_id > 2;

DELETE FROM ra_users
      WHERE org_id > 2;

DELETE FROM ra_user_roles
      WHERE org_id > 2;

DELETE FROM ra_org_auth_config
      WHERE org_id > 2;

DELETE FROM ra_orgs
      WHERE org_id > 2;

DELETE FROM ra_patch_requests
      WHERE org_id > 2;

DELETE FROM ra_patches
      WHERE org_id > 2;

DELETE FROM ra_profile_config
      WHERE org_id > 2;

DELETE FROM ra_profile_values
      WHERE org_id > 2;

DELETE FROM ra_context_help
      WHERE org_id > 2;

DELETE FROM ra_html_requests
      WHERE org_id > 2;

DELETE FROM ra_html_templates
      WHERE org_id > 2;

DELETE FROM ra_java_snippets
      WHERE org_id > 2;

DELETE FROM ra_obj_cust_handler
      WHERE org_id > 2;

DELETE FROM ra_scheduler_master
      WHERE org_id > 2;

DELETE FROM ra_scheduler_trans
      WHERE org_id > 2;

ROLLBACK;

Location

101 California Street, Suite 2710
San Francisco, CA 94111


440 N. Wolfe Rd.
Sunnyvale, CA 94085


Office 11, 5th Floor, Building 9,
Mindspace IT Park
Hyderabad 500081

p: +1 (844) AT CloudIO (844-282-5683)
f: +1 (650) 300-5247 | e: sales@cloudio.io
© 2009, 2017 CloudIO Inc. | Terms of Use | Privacy Policy