Skip to content

Commit 8dc98fb

Browse files
docs: add env/instance deletion (#889)
* add hard delete instance * add env delete and update env * Update mintlify/get-started/connect/overview.mdx Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 7deb6df commit 8dc98fb

File tree

2 files changed

+77
-9
lines changed

2 files changed

+77
-9
lines changed

mintlify/change-database/environment-policy/overview.mdx

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,7 @@
22
title: Environment Policy
33
---
44

5-
## Statement execution mode
6-
7-
Even if you have `sql.dml` and `sql.ddl` [database permissions](/security/database-permission/overview/), you can only run read-only statements such as `SELECT` in SQL Editor by default. If you attempt to run mutation DML or DDL, it will prompt you to submit an issue.
8-
9-
![prompt-issue](/content/docs/administration/environment-policy/prompt-issue.webp)
10-
11-
If you want to run those statements directly in SQL Editor, you need to turn on the **statement execution** setting.
12-
13-
![statement-execution](/content/docs/administration/environment-policy/statement-execution.webp)
5+
Configure and manage your database environments including policies, permissions, and lifecycle operations.
146

157
## Environment tier
168

@@ -29,3 +21,48 @@ SQL Editor then displays the configured color tab.
2921
Once you mark an environment as a production environment, Bytebase will attach a shield icon 🛡️ besides the environment name.
3022

3123
![tier-envs](/content/docs/administration/environment-policy/tier-envs.webp)
24+
25+
## Rollout policy
26+
27+
Control who can deploy changes to each environment and whether deployments happen automatically or require manual approval.
28+
29+
<Card title="Configure Rollout Permissions" icon="rocket" href="/change-database/environment-policy/rollout-policy" horizontal>
30+
Manage deployment permissions and automatic rollout settings
31+
</Card>
32+
33+
## SQL Review policy
34+
35+
Configure automated SQL validation rules for each environment to ensure code quality and compliance. Different environments can have different strictness levels - for example, production might enforce stricter rules than development.
36+
37+
<Card title="Configure SQL Review" icon="shield-check" href="/sql-review/review-policy" horizontal>
38+
Set up automated SQL validation rules and best practices enforcement
39+
</Card>
40+
41+
## Access control
42+
43+
Configure environment-specific restrictions for SQL Editor operations:
44+
45+
- **Restrict data copying in SQL Editor**: Only Workspace Admins and DBAs can copy data from query results
46+
- **Restrict querying admin data sources**: Limit access to administrative data sources in the SQL Editor
47+
48+
## Statement execution mode
49+
50+
Even if you have `sql.dml` and `sql.ddl` [database permissions](/security/database-permission/overview/), you can only run read-only statements such as `SELECT` in SQL Editor by default. If you attempt to run mutation DML or DDL, it will prompt you to submit an issue.
51+
52+
![prompt-issue](/content/docs/administration/environment-policy/prompt-issue.webp)
53+
54+
If you want to run those statements directly in SQL Editor, you need to turn on the **statement execution** setting.
55+
56+
![statement-execution](/content/docs/administration/environment-policy/statement-execution.webp)
57+
58+
## Delete an environment
59+
60+
To permanently delete an environment:
61+
62+
1. Navigate to the environment page
63+
2. Click **Delete this environment** at the bottom of the page
64+
3. Confirm the deletion
65+
66+
<Warning>
67+
Deleting an environment will also remove it from all related instances and databases. This action cannot be undone.
68+
</Warning>

mintlify/get-started/connect/overview.mdx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,34 @@ Consider these factors when setting the limit:
155155
- Team size and concurrent SQL Editor usage
156156
- Available database connection capacity
157157
- Parallel operations (migrations, backups, syncs)
158+
159+
### Deleting Instances
160+
161+
#### Archive Instance
162+
163+
To temporarily remove an instance from active use while preserving its configuration:
164+
165+
1. Navigate to the instance page
166+
2. Click **Archive** to move the instance to archived status
167+
3. Archived instances remain accessible from **Settings > Archived**
168+
169+
<Warning>
170+
Before archiving an instance, ensure all its databases are unassigned from projects. Databases actively assigned to projects cannot be archived.
171+
</Warning>
172+
173+
#### Hard Delete Instance
174+
175+
To permanently remove an instance and all its associated metadata from Bytebase:
176+
177+
1. **Archive the instance first**:
178+
- Go to the instance page
179+
- Click **Archive this instance** (requires all databases to be unassigned from projects) on the bottom of the page
180+
181+
2. **Permanently delete the archived instance**:
182+
- Navigate to **Settings > Archived**
183+
- Select the archived instance
184+
- Click **Hard-Delete** to permanently remove the instance
185+
186+
<Caution>
187+
Hard deletion is irreversible. All instance configuration, connection settings, and metadata stored in Bytebase will be permanently removed. This does not affect the actual database itself, only Bytebase's records and configuration for that instance.
188+
</Caution>

0 commit comments

Comments
 (0)