diff --git a/mintlify/change-database/environment-policy/overview.mdx b/mintlify/change-database/environment-policy/overview.mdx index 06227cf4a..eb901feeb 100644 --- a/mintlify/change-database/environment-policy/overview.mdx +++ b/mintlify/change-database/environment-policy/overview.mdx @@ -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 @@ -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. + + + Manage deployment permissions and automatic rollout settings + + +## 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. + + + Set up automated SQL validation rules and best practices enforcement + + +## 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 + + +Deleting an environment will also remove it from all related instances and databases. This action cannot be undone. + diff --git a/mintlify/get-started/connect/overview.mdx b/mintlify/get-started/connect/overview.mdx index 8ac341029..c32967217 100644 --- a/mintlify/get-started/connect/overview.mdx +++ b/mintlify/get-started/connect/overview.mdx @@ -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** + + +Before archiving an instance, ensure all its databases are unassigned from projects. Databases actively assigned to projects cannot be archived. + + +#### 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 + + +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. +