Rework define_database_package so that it is no longer requires the project as a parameter and can derive it from context