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
old records are not automatically populated when a new field is defined with default value, and it throws error when trying to update that table
DEFINE TABLE t SCHEMAFULL;
DEFINE FIELD i ON TABLE t TYPE int;
CREATE t:1SET i =1;
DEFINE FIELD j ON TABLE t TYPE string DEFAULT '1';
UPDATE t:1SET i =2;
Found NONE for field `j`, with record `t:1`, but expected a string
Describe the solution
auto populate old record with new field default avlue
Alternative methods
manually update old records with new field default value
SurrealDB version
surreal 1.2.1
Contact Details
No response
Is there an existing issue for this?
I have searched the existing issues
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
I recently ran into this issue today, Editted a table to add a column, set the default value because the column might not filled in when inserting new records.
Tried updating a record and it is refusing to because the culumn is None.
Found NONE for field properties, with record nodes:mrcclik8icnni7cfhkrw, but expected a array
I dont expect this behavour for a column which has a default value set.
Is your feature request related to a problem?
old records are not automatically populated when a new field is defined with default value, and it throws error when trying to update that table
Describe the solution
auto populate old record with new field default avlue
Alternative methods
manually update old records with new field default value
SurrealDB version
surreal 1.2.1
Contact Details
No response
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: