pingcap / django-tidb

TiDB dialect for Django
Apache License 2.0
30 stars 17 forks source link

fix: add unique constraint after add field #53

Closed wd0517 closed 1 year ago

wd0517 commented 1 year ago

fix https://github.com/pingcap/django-tidb/issues/48

TiDB does not support multiple operations with a single DDL statement. For more information, refer to the MySQL Compatibility - DDL operations documentation. In django-tidb, we now separate the SQL into multiple DDL statements: first, add the column, and then add the unique constraint and foreign key.