Fix schema for nonnull stuff. Fix rake task to use transaction.