added db migrations, view error handling, and randomID model attribute