我正在将 Django 与 MySQL 一起使用。我安装了 South 并试图将我的应用程序从一种模式迁移到另一种模式。但是,当我运行时$ python manage.py migrate catalog
,出现以下错误:
- Migrating forwards to 0003_initial.
> catalog:0003_initial
! Error found during real run of migration! Aborting.
! Since you have a database that does not support running
! schema-altering statements in transactions, we have had
! to leave it in an interim state between migrations.
! You *might* be able to recover with: = DROP TABLE `categories` CASCADE; []
= DROP TABLE `product_shapes` CASCADE; []
= DROP TABLE `materials` CASCADE; []
= DROP TABLE `style` CASCADE; []
= DROP TABLE `products` CASCADE; []
= DROP TABLE `products_shape` CASCADE; []
= DROP TABLE `products_materials` CASCADE; []
= DROP TABLE `products_style` CASCADE; []
= DROP TABLE `products_categories` CASCADE; []
! The South developers regret this has happened, and would
! like to gently persuade you to consider a slightly
! easier-to-deal-with DBMS.
有什么方法可以迁移而不必删除这些表。我有一种感觉,如果我放弃表格,我最终会丢失我试图保存的数据。
编辑:
我相信这是主要错误:
_mysql_exceptions.OperationalError: (1050, "Table 'categories' already exists")