2012-04-29 103 views
1

我使用Django和MySQL。我安裝了南,並試圖將我的應用程序從一個架構遷移到另一個架構。然而,當我運行$ python manage.py migrate catalog我得到以下錯誤:使用Django South失敗的模式遷移:我該怎麼辦?

- 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

,如果他們有,你要保存在其中的數據不要刪除這些表。

很難在沒有看到實際錯誤的情況下提供更具體的幫助,這應該遵循所引用的信息。