Move table_exists helper into sentry.utils.db