How would you about splitting a column into two that involves some business logic? For example, "name" being split into "first_name" and "family_name" where you split the value "name" by the first instance of a space. Prisma looks great aside from this caveat
I feel like this problem is not a problem just for Prisma. The logic for splitting cannot be perfect in every solution. Probably, in this situation, the issue is the wrong choice of using only a column for the name during the tableβs creation. Anyway, I think if you have this problem, you need to split the name using the first space and after that, or you check all the rows or you leave the columns in this way and, you know that the old rows probably can be wrong.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
How would you about splitting a column into two that involves some business logic? For example, "name" being split into "first_name" and "family_name" where you split the value "name" by the first instance of a space. Prisma looks great aside from this caveat
I feel like this problem is not a problem just for Prisma. The logic for splitting cannot be perfect in every solution. Probably, in this situation, the issue is the wrong choice of using only a column for the name during the tableβs creation. Anyway, I think if you have this problem, you need to split the name using the first space and after that, or you check all the rows or you leave the columns in this way and, you know that the old rows probably can be wrong.