I do not understand why
Ecto.Multi.insert_all
doesn’t generateid
and timestamp columns likeRepo.insert!
does.
The ID thing is definitely weird, but the timestamps not being generated is documented behavior:
If the schema contains an autogenerated ID field, it will be handled either at the adapter or the storage layer. However any other autogenerated value, like timestamps, won’t be autogenerated when using
insert_all/3
.
There’s this thread that describes almost exactly the same issue, but what needed to change to make the problem go away isn’t clear