UpdateDatabase don´t create index

Hi, i'm using aurelius to create and alter the database and works fine.

however, on add a new index in a existing database, the index is not created.
On a new data base the index is created.
...
var
  DBManager: TDatabaseManager;
begin
  DBManager := TDatabaseManager.Create(vConnection);
  try
    DBManager.UpdateDatabase;
 ....
 Thanks

Hi, can you provide more details?

Hi, Wagner
this is my code:

procedure TSysFireDac.CheckStructure(vConnection: IDBConnection);
var
  DBManager: TDatabaseManager;
begin
  DBManager := TDatabaseManager.Create(vConnection);
  try
    DBManager.UpdateDatabase;
  except
    on E: Exception do
    begin
      TSysLog.Log( StringReplace(E.Message,#13#10,' ',[]), LLevelLowDetail); //grava o log da mensagem de erro sem Return+LineFeed
    end;
  end;
  DBManager.Free;
end;

I'm using Fire Bird 2.5, Aurelius 2.4.1 and delphi XE7
thanks

Hi, again

  [Entity]
  [Table('UserX')]
  [UniqueKey('UserEmail')]
  [UniqueKey('UserName')]
  [Sequence('Id_UserX')]
  [Id('FId', TIdGenerator.IdentityOrSequence)]
  TUserX = class
  private
    [Column('Id', [TColumnProp.Required])]
    FId: Int64;
  
    [Column('UserName', [TColumnProp.Required], 20)]
    FUserName: string;
   
    [Column('UserPassword', [TColumnProp.Required], 15)]
    FUserPassword: string;
   
    [Column('UserEmail', [TColumnProp.Required], 80)]
    FUserEmail: string;
.....

 UserEmail and UserName index are not create on a existing database

Have you checked hints, errors and warnings according to the documentation, to have a better idea of what's going on?

Hi, on page 32 (Database Connectivity,
"...Examples of differences that generate errors:
       Column data type change
       ...
       A new unique key"
 Is this the documentation?

 If use Flame Robin  to create index on an existing database works fine.

Many Thanks,


Sorry you are right, I overlooked that. Yes, new unique index creation is not supported in database update. The database update only supports non-destructive statements and statements that won't generate errors no matter what.

:(