Closing down a customer's organization on Sourcegraph Cloud

If you have created an organization on Sourcegraph Cloud, follow these instructions when it’s time to delete it:

Deleting an organization will also remove all its synced repositories from Sourcegraph Cloud.

Closing down a customer's organization on Sourcegraph Cloud

During the open-beta, customers receive 30 days to try out Sourcegraph Cloud with Organizations. Once this period has passed, customers need to reach out in order to continue leveraging Sourcegraph Cloud.

The following process documents the queries that need to be executed in order to completely remove an organization if a customer does not reach out.

Queries

It is important that these queries be run in this order. Replace $ORG_ID with the ID of the organization.

DELETE * FROM org_members WHERE org_id = $ORG_ID;
DELETE * FROM org_invitations WHERE org_id = $ORG_ID;
DELETE * FROM registry_extensions WHERE publisher_org_id = $ORG_ID;
DELETE * FROM saved_searches WHERE org_id = $ORG_ID;
DELETE * FROM notebooks WHERE namespace_org_id = $ORG_ID;
DELETE * FROM settings WHERE org_id = $ORG_ID;
DELETE * FROM orgs WHERE id = $ORG_ID;

Other useful queries

A list of useful DB queries can be found in useful DB queries.

Closing down an organization locally, on dotcom mode