You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// the affinity of a column is determined by the declared type of the column,
420
420
// according to the following rules in the order shown:
421
421
// 1. If the declared type contains the string "INT" then it is assigned INTEGER affinity.
422
-
#ifdefSQLITE_WASM_EXTRA_INIT
423
422
sql=sqlite3_snprintf((int)blen, buffer, "SELECT count(*) FROM pragma_table_info('%w') WHERE pk=1 AND \"type\" LIKE '%%INT%%';", name);
424
-
#else
425
-
sql=sqlite3_snprintf((int)blen, buffer, "SELECT count(*) FROM pragma_table_info('%w') WHERE pk=1 AND \"type\" LIKE \"%%INT%%\";", name);
426
-
#endif
427
423
sqlite3_int64count2=dbutils_int_select(db, sql);
428
424
if (count==count2) {
429
425
dbutils_context_result_error(context, "Table %s uses an single-column INTEGER primary key. For CRDT replication, primary keys must be globally unique. Consider using a TEXT primary key with UUIDs or ULID to avoid conflicts across nodes. If you understand the risk and still want to use this INTEGER primary key, set the third argument of the cloudsync_init function to 1 to skip this check.", name);
0 commit comments