Setup for PostgreSQL, tweaked models, and implemented Flask-Migrate