Unique Key index, again, again... URGENT

Hi, Wagner
  As i said before:
"  I have a Data base in production, now i need add a unique index, because aurelius does not support add unique indexes with updatedatabase, i add manually(SYNCLNK.UNQ_SYNCLNK_1), then when i do ValidateDatabase,
   Unique key: SyncLnk.UK_33BE9DF9_SyncLnk - created
   Unique key: SYNCLNK.UNQ_SYNCLNK_1 - Removed.

  What is that mean? you said "If Aurelius finds an unique constraint with that combination of fields, it will not try to create it again", why ValidateDatabase "generate" DBManager.Errors?
  I use ValidateDatabase to add log file, the log file in this case is a complete mess

Thanks"
  
 If i create unique constraint manually, when execute UpdateDatabase then unique constraint is removed, aurelius does not create unique constraints with updateDatabase, so, there's no way to create Unique constraints(unique indexes), please it's urgent...


Actually it uses the constraint name to check if unique key exists, except for SQLite. You can create the unique key with the same name of the key it's trying to create, this way it will not try to remove/create it again.

Hi, Wagner
  For this case problem solved.
  Maybe I am missing something or something is wrong. How can i automatize create Unique indexes?
  I don't now the name of the index (
UK_33BE9DF9_SyncLnk?!!!), what is that? Create unique index manually its not an option when software upgrade for 1000 clients,
  I believe that TMS Software, can improve this situation.
  Thanks for great support and great product.

One more thing
  As I suggested before, it should be possible to name the index,

it is better for maintenance.
thanks once again

We will try to include the unique key name to improve this issue.

and create unique index with "UpdateDataBase"
:)

Hi, Wagner
  There are plans to solve this issue? date?
  I'm facing big Issues one update already existing data bases, with problems on Unique index and default value "Null" on fields not null,  I have already add a feature request (1883 and 1837) some time ago.
  Thanks
 

I have commented in both feature requests to follow up

Hi, Wagner
  I get it, but i still have to deal with this issue, and every one that uses aurelius have to deal with this, or not? Maybe i'm doing something very wrong...
  OK...
  1 - In case of Null values on required fields maybe i can do a procedure, that for every column table, check TColumnProp.Required, and update with a default value? comments are apreciated :)
  2 - consider the below class/table:
  TIdent = class
   private
    ...
    [Column('CardNumber', [TColumnProp.Required], 15, "Default value here, is possible?")]
    FCardNumber: Integer;
    ...
     comments please

   Sorry to be so persistent
Thanks, thanks, thanks

Default value is a different suggestion indeed, and is easier to implement than the others. But still it would be SQL specific, in case you want to include exceptions.

Users just update the database themselves, like they would do if Aurelius didn't exist. In the most complex scenarios, users mix Aurelius update and manual update, meaning they rely on Aurelius to create the common stuff (tables, fields, foreign keys, etc.) and then use a version system to do the complex updates manually. It works well. Although the default suggestion could be created, voted and eventually implemented indeed, Aurelius is not intended to be a database schema manager, it's an ORM. It can get really complex,m you might want to use triggers, stored procedures, domains, views, specific functions, etc., so the Aurelius features in that area would need to stop at some point.

yes i agree
  "Unique index" seems complex, "default values" seems much easier, I will add a new feature request
Thanks, Wagner