You are not logged in.
Pages: 1
i have 2 version same programm
v1.0 and v1.1. In version 1.1 add new field.
i send new version all users but many users work in old 1.0 version and new field dont save.
how to determine that you are using an older version and the message?
Offline
Any new property in the TSQLRecord class will be added at SQL level, with a ALTER TABLE ADD COLUMN.
But renaming should be done manually, as changing a field type.
SQLite3 does only support ALTER TABLE ADD COLUMN syntax - see https://www.sqlite.org/lang_altertable.html
For identifying the database revision, there is a user_version parameter to TSQLRestServerDB.CreateMissingTables().
This TSQLRestServerDB.CreateMissingTables method is where the table layout is checked and updated if necessary.
Offline
ok, but how read GetUserVersion or user_version in client?
GetUserVersion - declared protected
code init client side:
var
Database: TSQLRestClientURI;
...
function InitClient: Boolean;
begin
Result := True;
Model := CreateModel;
ReadConfig;
Database := TSQLHttpClient.Create(ip, port, Model);
DataBase.ForceBlobTransfert := True;
if not Database.ServerTimeStampSynchronize then Result := False;
end;
well if you could use as
function InitClient: Boolean;
begin
Result := True;
Model := CreateModel;
ReadConfig;
Database := TSQLHttpClient.Create(ip, port, Model);
DataBase.GetUserVersion < 2 then begin
Showmessage('blabla');
Result := False;
Exit;
end
if not Database.ServerTimeStampSynchronize then Result := False;
end;
Last edited by proto (2015-02-02 12:07:04)
Offline
The user_version parameter of TSQLRestServerDB.CreateMissingTables() is pure database/SQLite3 logic.
What you request is IMHO application/ORM logic, not database/SQLite3 logic.
In your code, naming a TSQLHttpClient instance as "Database" variable sounds a bit confusing.
We may have to add a new feature for model comparison at connection, as we do for interface-based services: the client would send its current model to the server, so that it would be checked against the server expectations.
See http://synopse.info/fossil/tktview/366974912d104
In the meanwhile, you may just define a versioning service to be checked from the client side at connection.
Offline
Database name remains of the alteration code, you are right, i rename it.
We may have to add a new feature for model comparison at connection, as we do for interface-based services: the client would send its current model to the server, so that it would be checked against the server expectations.
thanks.
Offline
any news?
users dont update soft and do not fill last add field
Offline
Hi AB!
I apologize for molestation, but there are some changes on this issue?
Offline
Pages: 1