Hello Wagner,
is it possible to extend the validation of a database?
I have for myself the class "TDatabaseManager" with the properties:
public property IgnoreRemoved: Boolean read FIgnoreRemoved write FIgnoreRemoved;
expanded.
The reason: I access the same database with different servers. There are more tables in the database than in the entities. I don't use the UpdateDatabase function, but the validation. I get errors that tables in the entity have been removed and the database is therefore out of order.
Or is there another, better way to ignore foreign tables in the DB?
The same could be done for columns, sequences, etc. But I don't need that.
I changed this:
procedure TDatabaseManager.ActionTableRemoved(Table: TTableMetadata);
begin
if FAllowDestructiveCommands then
begin
FCommands.Add(TDropTableCommand.Create(Table));
FActions.Add(TTableRemovedAction.Create(Table));
end
else *!!!*if not FIgnoreRemoved then*!!!*
FErrors.Add(TTableRemovedError.Create(Table));
end;
Another point is that "domains" are not taken into account in the database.
Since we have to install our servers on different systems (previously Microsoft SQL Server and PostgreSQL), we use domains.
E.g.
PostgreSQL: Uuid
MSSQL: uniqueidentifier
We use the domain on MSSQL:
CREATE TYPE Uuid FROM uniqueidentifier;
We work around this problem by making the "IgnoreDataTypes" property public in the same class.
But it would be better if the data types were controlled.
We now have 2 new properties.
Can you maybe consider these in the next release? Then we don't always have to change the code.
Thanks very much
Thomas