- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2
client.renameDatabase()
        Oxford Harrison edited this page Nov 15, 2024 
        ·
        5 revisions
      
    DOCS • API • Client API
Programmatically perform a RENAME DATABASE operation.
See related ➞ ALTER DATABASE
client.renameDatabase(
    fromName: string,
    toName: string,
    options?: AlterDatabaseOptions
): Promise<AlterDatabaseResult>;| Param | Interfaces | Description | 
|---|---|---|
| fromName | - | An existing database name. | 
| toName | - | The intended new database name. | 
| options? | AlterDatabaseOptions | Optional extra parameters for the operation. | 
| Interface | Description | 
|---|---|
| AlterDatabaseResult | The result type for an ALTER DATABASEoperation. | 
Rename a database:
await client.renameDatabase(
    'database_1',
    'database_1_new',
    { desc: 'Alter description' }
);