0
Fixed
The application allows to create two indexes with the same name
A model validator doesn't check if index name is unique within model. I created two indexes with name "book_fk" in two different tables and a SQL script failed in PostgreSQL database:
Kind regards,
Marek Berkan.
SQLState:42P07IMO it should be validated by the application.
message:
ERROR: relation "book_fk" already exists
Kind regards,
Marek Berkan.
Answer
0
Answer
Fixed
anonymous 10 years ago
I turned out that it's specific for MySQL that keys' names may be duplicated within a database. It has been already fixed.
+1
Fixed
The fix will be available with the release. I'll send a notice.
Index names should only need to be unique within the table not across the entire database. I have a model now throwing a bunch of errors that aren't errors that weren't reported before. All my SQL code generated was working fine for MySQL and is working fine within the application. Suddenly I log in, and *boom* all of these "index must be unique" errors. What am I missing here? Is this a new bug?
Hello Marc,
It looks like database specific issue, because PostgreSQL which I use report duplicated indexes names as problems. If MySQL didn't report problems, Vertabelo would check it depending on selected target DB.
Kind regards,
Marek Berkan.
It looks like database specific issue, because PostgreSQL which I use report duplicated indexes names as problems. If MySQL didn't report problems, Vertabelo would check it depending on selected target DB.
Kind regards,
Marek Berkan.
Answer
Fixed
I turned out that it's specific for MySQL that keys' names may be duplicated within a database. It has been already fixed.
Using MS SQL there is a problem with the implementation of "table index names must be unique". When it is ticked index names must be unique across the model despite this not being an MS SQL requirement. Unticked and I can have duplicate index names within a table!
Customer support service by UserEcho