propelorm/Propel — Issue #166: Strange index statement with empty column name generated
Author: val0801
Created: 2011-10-28 03:51:45+00:00
State: open

Following schema definition

Generates incorrect sql definition:

CREATE TABLE `equipment`
(
`tag` VARCHAR(127),
`description` VARCHAR(255),
`room` VARCHAR(127),
`barcode` VARCHAR(127),
`location` VARCHAR(255),
`serial_number` VARCHAR(255),
`manufactured_date` DATE,
`equipment_model_id` INTEGER NOT NULL,
`id` INTEGER NOT NULL,
PRIMARY KEY (`id`),
INDEX `I_referenced_document_FK_2_1` (``),
INDEX `equipment_FI_1` (`equipment_model_id`),
CONSTRAINT `equipment_FK_1`
FOREIGN KEY (`equipment_model_id`)
REFERENCES `equipment_model` (`id`),
CONSTRAINT `equipment_FK_2`
FOREIGN KEY (`id`)
REFERENCES `item` (`id`)
ON DELETE CASCADE
) ENGINE=InnoDB;
As you can see line "INDEX `I_referenced_document_FK_2_1` (``)," doesn't have column name.
I believe foreign-key tag generates it in addition to correct FK constraint.
I installed following version propelorm-Propel-1.6.3-6-g479ec14.tar.gz.
Let me know if you need more information.