0
Исправлен

The application allows to create two indexes with the same name

Marek Berkan 9 лет назад обновлен mark leavesley 9 лет назад 11
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:

SQLState:42P07
message:
ERROR: relation "book_fk" already exists
IMO it should be validated by the application.

Kind regards,
Marek Berkan.

Ответ

Ответ
Исправлен
I turned out that it's specific for MySQL that keys' names may be duplicated within a database. It has been already fixed.
ХОРОШО, МНЕ ПОНРАВИЛОСЬ
Оценка удовлетворенности от Marek Berkan 9 лет назад
+1
Исправлен
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.
We will check this. Thanks for reporting the issue.
Ответ
Исправлен
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!

Сервис поддержки клиентов работает на платформе UserEcho