Fixes attachments in seeds.

Previously, those were not actually saved.
Fixes some attachment migration bugs.
Fixes attachment creation.

This also turns chance in favor of attachment survival.
Makes one of the update statements optional.

Keys might have been empty for the update previously.