sebastienros / yessql

A .NET document database working on any RDBMS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SQL Indexes names should be prefixed by schema

sebastienros opened this issue · comments

They are already prefixed with the TablePrefix, they should also use the schema name since they are defined across schemas.

public void CreateIndex(string indexName, params string[] columnNames)
{
if (_dialect.PrefixIndex)
{
indexName = _tablePrefix + indexName;
}
var command = new AddIndexCommand(Name, _dialect.FormatIndexName(indexName), columnNames);
TableCommands.Add(command);
}
public void DropIndex(string indexName)
{
if (_dialect.PrefixIndex)
{
indexName = _tablePrefix + indexName;
}
var command = new DropIndexCommand(Name, _dialect.FormatIndexName(indexName));
TableCommands.Add(command);
}

Shall we use dot notation between schema & table prefix?

Is it resolved?