When you ‘export’ the schema to an RDBMS by creating a script, the unique index names are not unique because it just uses the name of the field. Instead, it should use [TableName]_[FieldName]. Here’s an example of the issue when I Exported to PostgreSQL:
CREATE UNIQUE INDEX “Name” ON “InstitutionType” (“Name”);
CREATE UNIQUE INDEX “Name” ON “Institution” (“Name”);
CREATE UNIQUE INDEX “InstitutionTypeId_Name” ON “Institution” (“InstitutionTypeId”, “Name”);
CREATE UNIQUE INDEX “Name” ON “SchoolType” (“Name”);
CREATE UNIQUE INDEX “Name” ON “School” (“Name”);
Resulting in error…
ERROR: relation “Name” already exists
SQL state: 42P07