Open jqrv opened 4 years ago
I found the reason. when you use addtable api to add a table to sync ,or change your master db schema. you should restart tomcat!
As a matter of fact, only when you change your master db schema you need to restart tomcat (or application). It happens because connection pooling is used, and it needs to be refreshed.
On Wed, Nov 6, 2019 at 3:05 AM jqrv notifications@github.com wrote:
I found the reason. when you use addtable api to add a table to sync ,or change your master db schema. you should restart tomcat!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sqlite-sync/SQLite-sync.com/issues/18?email_source=notifications&email_token=ACNU5N3Y6KYY7QAILXQE7HLQSIQ6ZA5CNFSM4JI4PMV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDE7YUY#issuecomment-550108243, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNU5NYUPDOKTY3B6RDFA7LQSIQ6ZANCNFSM4JI4PMVQ .
-- Best regards Tomek Dziemidowicz E-mail: tomek@dziemidowicz.cloud Take care of the Environment with us! Do not print this message or other documents if it is not necessary.
you are right.
Can you share the schema of table test2? Does log contain anything, any errors?
when I ReinitializeDatabase , the framework start to create table . but some times, it doesn't add [RowID] column to the client.
as I know, if a table whithout RowID then can't sync.
I've created 2 tables on the server, test and test2. when I click ReinitializeDatabase button test2 has no [Rowid] column,but test has!
I add the exist table to sync(call AddTable API) always get this error.
here is the ReinitializeDatabase response content:
we can see about the create table test2 code, it really has no [RowID]!
"00014 test" : "CREATE TABLE \"test\" ([id] INTEGER ,[name] TEXT DEFAULT ('NULL') ,[age] INTEGER DEFAULT (NULL) ,[birthday] DATETIME ,[RowId] TEXT DEFAULT ('NULL') ,\"MergeUpdate\" INTEGER NOT NULL DEFAULT (0) );",
"00007 test2" : "CREATE TABLE \"test2\" ([id] INTEGER ,[country] TEXT DEFAULT ('NULL') ,[city] TEXT DEFAULT ('NULL') ,[code] INTEGER DEFAULT (NULL) ,\"MergeUpdate\" INTEGER NOT NULL DEFAULT (0) );",