Fix DB bugs found testing with mysql

No one should be using this yet so I fixed a bug by changing a
migration instead of doing the right thing.