upsert users #8
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
it would be nice to be able to upsert users such as to automatically deduplicat them by email.
however, Rails upsert supports default only on the db level, not on the model level.
to this end, we should set users'
token
on the db level.postgres could do this using e.g.
md5(random()::text)
.the missing piece here now is to figure out how to express this in a Rails db migration.