3

エラーメッセージを以下に貼り付けます。3 つの質問があります。

  1. とは[]どういう意味ですか? それは、SQL コマンド用の South の特別な区切り文字ですか?

  2. サウスの指示に従って回復する必要がありますか? 他の状況で南の回復の指示に従い、何度か混乱したので、そうしました。

  3. エラーが発生する理由を理解してください。この移行で行ったことは、1 対 1 のフィールドを通常のフィールドに単純に変更することです

エラー:

comp_app:0039_auto__chg_field_competition_banner_img__del_unique_competition_banner_
FATAL ERROR - The following SQL query failed: DROP INDEX "comp_app_competition_d79c66e3"
The error was: no such index: comp_app_competition_d79c66e3
 ! 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:   = CREATE INDEX "comp_app_competition_d79c66e3" ON "comp_app_competition" ("banner_img_id"); []
   = CREATE UNIQUE INDEX "comp_app_competition_banner_img_id" ON "comp_app_competition"("banner_img_id"); []

 ! The South developers regret this has happened, and would
 ! like to gently persuade you to consider a slightly
 ! easier-to-deal-with DBMS (one that supports DDL transactions)
 ! NOTE: The error which caused the migration to fail is further up.
Error in migration: comp_app:0039_auto__chg_field_competition_banner_img__del_unique_competition_banner_
DatabaseError: no such index: comp_app_competition_d79c66e3
4

1 に答える 1

4

SQLite はそもそも 1 対 1 フィールドのインデックスを作成しないことが判明しましたが、South は作成していると想定しています。South を使用しているときに発生した他の多くのエラーの原因は、データベースの種類にあると思われます。

解決策は簡単ですが。移行ファイルに入り、前方関数と後方関数の両方でインデックス部分を削除します。それでおしまい。

于 2013-07-03T16:21:47.990 に答える