Closed jh-RLI closed 7 months ago
I am currently working on a branch to fix it.
Here is the problem:
CREATE TABLE "{meta_schema}"."{edit_table}" ' '(LIKE "{schema}"."{table}"
create delete meta table only with id column. we must then also delete all other columns from existing meta tables;
change not null constraint on the delete meta table (also migrate all existing
???
Description of the issue
I have a table like this one:
If i try to delete a row by id this error is raised:
looking at my table schema the name column cant be null but the error indicated that the last 4 parameters of the insert statements are null but at least the first one should not be null because it is the name column that is not nullable.
This is related to the versioning system we have in place that keeps track of any changes to the data and stored all delete / edited values in the so called _ schemas on the oedb. In my case the table was created in model_draft schema and the error happend in _model_draft schema.
This is the insert statement that is generated by the oep: INSERT INTO _model_draft._test_data_upload_delete (_message, _user, _type, id) VALUES (%(_message_m0)s, %(_user_m0)s, %(_type_m0)s, %(id_m0)s)
This is the api enpoint im sending the request to: Internal Server Error: /api/v0/schema/model_draft/tables/test_data_upload/rows/1
Steps to Reproduce
Ideas of solution
Make sure that non-deletable fields are registered when creating the insert statement.
Can you find the reason why all fields in the table are registered as null even though they contain data? With the exception of the id field, which is filled in correctly, but this information is also part of the http request.
Context and Environment
Complete stacktrace:
Workflow checklist