OceanBase Database supports the most common DDL operations. All supported operations can be done online, which means they can be performed without stopping the read and write operations of business applications.
| Operation | Supported | Online DDL support | Rewrites data |
|---|---|---|---|
| Create or add an index | Yes | Yes | Yes |
| Delete an index | Yes | Yes | No |
| Rename an index | Yes | Yes | No |
| Add a FULLTEXT index | No | - | - |
| Add a SPATIAL index | No | - | - |
| Add a primary key | No | - | - |
| Delete a primary key | No | - | - |
| Delete a primary key and add another | No | - | - |
| Add a column | Yes | Yes | Yes |
| Drop a column | Yes | Yes | Yes |
| Rename a column | Yes | Yes | No |
| Reorder columns | No | - | - |
| Set a column default value | Yes | Yes | No |
| Change the column data type (to a compatible type) Such as from int to bigint, varchar to text, or blob to long blob | Yes | Yes | Yes |
| Change the column data type (to an incompatible type) Such as from int to varchar, or char to varchar | No | - | - |
| Change the auto-increment value | Yes | Yes | No |
| Make a column NULL | Yes | Yes | No |
| Make a column NOT NULL | No | - | - |
| Add a foreign key constraint | No | - | - |
| Delete a foreign key constraint | Yes | Yes | No |
| Change the row format | Yes | Yes | Yes |
| Change the BLOCK_SIZE | Yes | Yes | Yes |
| Specify a character set | No | - | - |
| Convert a character set | No | - | - |