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
2 changes: 1 addition & 1 deletion mintlify/administration/custom-approval.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Custom Approval allows you to create multi-stage approval workflows based on cha
<Tip>
**Best Practices:**
- Custom Approval works best with [UI workflow](/change-database/change-workflow/#ui-workflow). For [GitOps workflow](/change-database/change-workflow/#gitops-workflow), configure approvals in your PR/MR process instead.
- By default, users cannot self-approve their own issues. You can [change this setting](/change-database/issue/#self-approval) in project settings if needed.
- By default, users cannot self-approve their own issues. You can [change this setting](/change-database/settings#self-approval) in project settings if needed.
</Tip>

## How It Works
Expand Down
23 changes: 0 additions & 23 deletions mintlify/change-database/issue.mdx

This file was deleted.

36 changes: 36 additions & 0 deletions mintlify/change-database/settings.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Settings
---

Customize how database changes work in your projects. Navigate to **Project** → **Settings** to access these options.

## Transaction Mode

<Note>
Supported databases: MySQL, PostgreSQL, Oracle, SQL Server, TiDB, Redshift
</Note>

By default, Bytebase wraps SQL statements in a transaction for safety - if something goes wrong, changes can be rolled back.

Some DDL statements can't run inside transactions. To disable transaction wrapping, add this comment before your SQL:

```sql
-- txn-mode=off
ALTER TABLE t ALTER COLUMN a TYPE VARCHAR(255);
```

## Postgres Tenant Mode

Perfect for multi-tenant PostgreSQL setups where each database has its own owner.

When enabled, Bytebase automatically switches to the database's OWNER role before executing changes, ensuring proper permissions.

**Location:** Project → Settings → Issue Related

## Self Approval

By default, issue creators can't approve their own changes.

To allow self-approval, enable **Allow self approval** in your project settings.

**Location:** Project → Settings → Issue Related
18 changes: 0 additions & 18 deletions mintlify/change-database/transaction-mode.mdx

This file was deleted.

4 changes: 2 additions & 2 deletions mintlify/change-database/troubleshoot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Following permission errors are likely to happen if either conditions meet:

### ERROR: permission denied to set role xxx (SQLSTATE 42501)

This could happen if you turn on [Postgres database tenant mode](/change-database/issue/#postgres-database-tenant-mode).
This could happen if you turn on [Postgres database tenant mode](/change-database/settings#postgres-tenant-mode).

You need to grant the database owner permission to the Bytebase user configured in your PostgreSQL instance.

Expand All @@ -44,7 +44,7 @@ If you use AlloyDB, the database owner must NOT be created via [Cloud IAM](https

### ERROR: must be owner of table xxx (SQLSTATE 42501)

This could happen if you turn on [Postgres database tenant mode](/change-database/issue/#postgres-database-tenant-mode).
This could happen if you turn on [Postgres database tenant mode](/change-database/settings#postgres-tenant-mode).

For some sophisticated setup where database owner and table owner are different, this causes problem.
Because only table owner can alter that table schema, and if the database owner is not a member of
Expand Down
19 changes: 9 additions & 10 deletions mintlify/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"change-database/synchronize-schema",
"change-database/stored-procedure",
"change-database/schema-editor",
"change-database/schema-template",
"change-database/online-schema-migration-for-mysql"
]
},
Expand Down Expand Up @@ -133,16 +134,6 @@
"group": "Monitor",
"pages": ["change-database/drift-detection"]
},
{
"group": "Settings",
"pages": [
"change-database/webhook",
"change-database/risk-center",
"change-database/issue",
"change-database/transaction-mode",
"change-database/schema-template"
]
},
"change-database/troubleshoot"
]
},
Expand All @@ -152,6 +143,14 @@
"gitops/overview",
"gitops/release"
]
},
{
"group": "General",
"pages": [
"change-database/webhook",
"change-database/risk-center",
"change-database/settings"
]
}
]
},
Expand Down