>I guess that many type of jobs will disappear before ours because of all the directions we need to take creating our wonderfull apps :-)
My daughter is building a website. At some point she decided she needs the came-from field to track referrers, and decided it has to be unique and not nullable. Fine and easy, except what to do with the existing records. Can't have a default value, as it would be the same for all of the old records, therefore not unique. The regular way would be to create the field as nullable and not unique first, then populate it with random values for the old records, then add the constraints.
She decided to let ChatGPT solve that problem for her. Here's what it said:
„To resolve this issue, you need to provide a default value for the new "fs_uniquifier" column in the user table. You can do this by updating the existing records with some default value before running the ALTER TABLE statement to add the new column“.