Upgrade To v0.8.0
Overviewâ
This guide walks you through upgrading from v0.7.x to v0.8.0.
- SQLite users: No database migration is required.
- MySQL users: A database migration is required â see Upgrade Database below.
Prepareâ
Backup Your Databaseâ
To prevent data loss, always back up your database before performing an upgrade. Choose the backup method that matches your database type (e.g., mysqldump for MySQL, file copy for SQLite).
Upgradeâ
Step 1 â Stop DB-GPT Serviceâ
Stop the running DB-GPT service using the same method you used to start it.
Step 2 â Upgrade Databaseâ
Execute the following SQL statements against your MySQL database to apply the v0.8.0 schema changes.
All upgrade SQL scripts are maintained in the repository under assets/schema/upgrade/.
New Tables
| Table | Description |
|---|---|
share_links | Stores conversation share-link tokens, enabling users to share conversations via unique URLs. |
USE dbgpt;
-- share_links: Store conversation share link tokens
CREATE TABLE `share_links` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
`token` varchar(64) NOT NULL COMMENT 'Unique random share token',
`conv_uid` varchar(255) NOT NULL COMMENT 'The conversation uid being shared',
`created_by` varchar(255) DEFAULT NULL COMMENT 'User who created the share link',
`gmt_created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'Creation time',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_share_token` (`token`),
KEY `ix_share_links_token` (`token`),
KEY `ix_share_links_conv_uid` (`conv_uid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Conversation share link table';
Step 3 â Install Dependenciesâ
Install or update dependencies according to your installation method. If you installed from source using the default setup, run:
uv sync --all-packages
Step 4 â Start DB-GPT Serviceâ
Restart the DB-GPT service using your preferred start method. Verify that the service is running correctly and the new share-link feature is available.