Skip Menu |

This queue is for tickets about the DBIx-Class-Tree-NestedSet CPAN distribution.

Report information
The Basics
Id: 98147
Status: new
Priority: 0/
Queue: DBIx-Class-Tree-NestedSet

Owner: Nobody in particular
Requestors: bricas [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: SQLT deployment on MySQL attempts to create a self-referencing foreign key constraint
Download (untitled) / with headers
text/plain 755b
MySQL does not support foreign keys pointing to itself: MySQL supports foreign key references between one column and another within a table. (A column cannot have a foreign key reference to itself.) When SQLT tries to deploy my schema, I get the following error: "Can't create table '' (errno: 150)..." which contains the following SQL: CONSTRAINT `foo_fk_root_id` FOREIGN KEY (`root_id`) REFERENCES `foo` (`root_id`) Adding "is_foreign_key_constraint => 0" to each of the generated relationships seems to remove the problem and allows my schema to be auto-deployed. I'm unsure if this issue is problematic against other DBs. I know for sure that SQLite is not affected.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to