After adding the archivable behavior to one of our table definitions, the generated migration is invalid because it includes the same CREATE INDEX statement twice:
CREATE INDEX "spy_quote_request_archive_i_3e1efe" ON "spy_quote_request_archive" ("quote_request_reference");
BEGIN;
CREATE TABLE "spy_quote_request_archive"
(
"id_quote_request" INTEGER NOT NULL,
"fk_company_user" INTEGER NOT NULL,
"created_at" TIMESTAMP,
"is_latest_version_visible" BOOLEAN DEFAULT 't',
"quote_request_reference" VARCHAR(255) NOT NULL,
"status" VARCHAR(255),
"uuid" VARCHAR(255),
"valid_until" TIMESTAMP,
"updated_at" TIMESTAMP,
"archived_at" TIMESTAMP,
PRIMARY KEY ("id_quote_request")
);
CREATE INDEX "spy_quote_request_archive_i_b0cd64" ON "spy_quote_request_archive" ("fk_company_user");
CREATE INDEX "spy_quote_request_archive_i_3e1efe" ON "spy_quote_request_archive" ("quote_request_reference");
CREATE INDEX "spy_quote_request_archive_i_d402b5" ON "spy_quote_request_archive" ("status");
CREATE INDEX "spy_quote_request_archive_i_e57848" ON "spy_quote_request_archive" ("valid_until","status");
CREATE INDEX "spy_quote_request_archive_i_d404ac" ON "spy_quote_request_archive" ("created_at");
CREATE INDEX "spy_quote_request_archive_i_36c49e" ON "spy_quote_request_archive" ("uuid");
CREATE INDEX "spy_quote_request_archive_i_3e1efe" ON "spy_quote_request_archive" ("quote_request_reference");
COMMIT;
This is our table schema that uses the archivable behavior:
The column quote_request_reference both should be unique and explicitly get an index (which is redundant, but is no issue when not using the archivable behavior). I assume that this is the problem when using the archivable behavior.
After adding the archivable behavior to one of our table definitions, the generated migration is invalid because it includes the same
CREATE INDEX
statement twice:CREATE INDEX "spy_quote_request_archive_i_3e1efe" ON "spy_quote_request_archive" ("quote_request_reference");
This is our table schema that uses the archivable behavior:
The column
quote_request_reference
both should be unique and explicitly get an index (which is redundant, but is no issue when not using the archivable behavior). I assume that this is the problem when using the archivable behavior.Our Propel version:
2.0.0-beta1