我正在使用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")
答案 0 :(得分:0)
如果这些表中包含您要保存的数据,请不要删除它们。
如果没有看到实际错误,很难提供任何更具体的帮助,而错误应该遵循您引用的消息。