fix rails primary key
fix time zone
fix uniqueness