Migration issues

Added try blocks to surface the exception + test if dependencies.
Added unique idx to changes table for perf.