changed upgrade script to stop polling after finished, wrote migration to copy titles into definitions/mappings tables