desc
予約済みのキーワードであるという名前の列を自分のスキーマで定義するのを間違えました。私はすぐに間違いに気づき、スキーマを変更して、スキーマの列名を に変更しましたdescription
。
今、私が実行したとき、doctrine:build --all
またはdoctrine:build-sql
過去の過ちに基づいてまだSQLを生成しています。
desc
私はこれを確認します。これは、その後削除された文でSQL ステートメントをまだ生成しているためです。キャッシュをクリアし、元の sql ファイルを削除し、ログをクリアしました。
doctrine:build-sql
完全に削除されて削除される間違いを、一体どのようにして発生させているのでしょうか? この問題を修正するにはどうすればよいですか?
明らかに、私がそれを修正できるまで、doctrine:build
壊れています。
編集:
これが私の元のスキーマです:
ReasonCode:
columns:
id: { type: integer, primary: true, notnull: true, autoincrement: true, unique: true }
desc: { type: string }
RejectionCode:
columns:
id: { type: integer, primary: true, notnull: true, autoincrement: true, unique: true }
desc: { type: string }
ConsiderationCode:
columns:
id: { type: integer, primary: true, notnull: true, autoincrement: true, unique: true }
desc: { type: string }
そして、これが私の改訂されたスキーマです:
ReasonCode:
columns:
id: { type: integer, primary: true, notnull: true, autoincrement: true, unique: true }
name: { type: string }
RejectionCode:
columns:
id: { type: integer, primary: true, notnull: true, autoincrement: true, unique: true }
name: { type: string }
ConsiderationCode:
columns:
id: { type: integer, primary: true, notnull: true, autoincrement: true, unique: true }
name: { type: string }
毎回生成される生成されたSQLスキーマは次のとおりです。
CREATE TABLE consideration_code (id BIGINT UNIQUE AUTO_INCREMENT, desc TEXT, name TEXT, PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE reason_code (id BIGINT UNIQUE AUTO_INCREMENT, desc TEXT, name TEXT, PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE rejection_code (id BIGINT UNIQUE AUTO_INCREMENT, desc TEXT, name TEXT, PRIMARY KEY(id)) ENGINE = INNODB;