Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 46 additions & 9 deletions mintlify/change-database/environment-policy/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@
title: Environment Policy
---

## Statement execution mode

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.

![prompt-issue](/content/docs/administration/environment-policy/prompt-issue.webp)

If you want to run those statements directly in SQL Editor, you need to turn on the **statement execution** setting.

![statement-execution](/content/docs/administration/environment-policy/statement-execution.webp)
Configure and manage your database environments including policies, permissions, and lifecycle operations.

## Environment tier

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

![tier-envs](/content/docs/administration/environment-policy/tier-envs.webp)

## Rollout policy

Control who can deploy changes to each environment and whether deployments happen automatically or require manual approval.

<Card title="Configure Rollout Permissions" icon="rocket" href="/change-database/environment-policy/rollout-policy" horizontal>
Manage deployment permissions and automatic rollout settings
</Card>

## SQL Review policy

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.

<Card title="Configure SQL Review" icon="shield-check" href="/sql-review/review-policy" horizontal>
Set up automated SQL validation rules and best practices enforcement
</Card>

## Access control

Configure environment-specific restrictions for SQL Editor operations:

- **Restrict data copying in SQL Editor**: Only Workspace Admins and DBAs can copy data from query results
- **Restrict querying admin data sources**: Limit access to administrative data sources in the SQL Editor

## Statement execution mode

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.

![prompt-issue](/content/docs/administration/environment-policy/prompt-issue.webp)

If you want to run those statements directly in SQL Editor, you need to turn on the **statement execution** setting.

![statement-execution](/content/docs/administration/environment-policy/statement-execution.webp)

## Delete an environment

To permanently delete an environment:

1. Navigate to the environment page
2. Click **Delete this environment** at the bottom of the page
3. Confirm the deletion

<Warning>
Deleting an environment will also remove it from all related instances and databases. This action cannot be undone.
</Warning>
31 changes: 31 additions & 0 deletions mintlify/get-started/connect/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,34 @@ Consider these factors when setting the limit:
- Team size and concurrent SQL Editor usage
- Available database connection capacity
- Parallel operations (migrations, backups, syncs)

### Deleting Instances

#### Archive Instance

To temporarily remove an instance from active use while preserving its configuration:

1. Navigate to the instance page
2. Click **Archive** to move the instance to archived status
3. Archived instances remain accessible from **Settings > Archived**

<Warning>
Before archiving an instance, ensure all its databases are unassigned from projects. Databases actively assigned to projects cannot be archived.
</Warning>

#### Hard Delete Instance

To permanently remove an instance and all its associated metadata from Bytebase:

1. **Archive the instance first**:
- Go to the instance page
- Click **Archive this instance** (requires all databases to be unassigned from projects) on the bottom of the page

2. **Permanently delete the archived instance**:
- Navigate to **Settings > Archived**
- Select the archived instance
- Click **Hard-Delete** to permanently remove the instance

<Caution>
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.
</Caution>