Add support to Schema/Database rename
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Feature Request
**Is your feature request related to a problem? Please describe:**
Postgres provides schema rename by the commands: ALTER SCHEMA schema_name RENAME TO new_name;
However, TiDB doesn't support any schema renaming. The schema rename feature is needed to implement soft delete.
**Describe the feature you'd like:**
Extend ALTER DATABASE and provide schema rename feature.
**Describe alternatives you've considered:**
One alternative is to create a new schema with the new name, and rename all tables in the old database to be in the new database. However, for schemas with tons of tables this will be a super lengthy process.
**Teachability, Documentation, Adoption, Migration Strategy:**
ALTER DATABASE schema_name RENAME TO new_name;
Contributor guide
Assessment
This issue has not been assessed yet.