diff --git a/crates/core/src/views.rs b/crates/core/src/views.rs index d534ee2..b66f40a 100644 --- a/crates/core/src/views.rs +++ b/crates/core/src/views.rs @@ -154,6 +154,8 @@ fn powersync_trigger_insert_sql_impl( SELECT CASE WHEN (NEW.id IS NULL) THEN RAISE (FAIL, 'id is required') + WHEN (typeof(NEW.id) != 'text') + THEN RAISE (FAIL, 'id should be text') END; INSERT INTO {:} SELECT NEW.id, {:};