Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function initializeDatabase() {
const shouldContinue = await cli.confirm(
`Careful! this will DROP 'projects' and 'district_entries,
upsert 'account_balances' and a district token.
Do you wish to continue?`
)
if (!shouldContinue) return process.exit()
log.info('Connecting database')
await db.connect()
log.info('Initializing state')
await dropDumps()
log.info('Restoring district_entries')
execSync(runpsql('../dumps/districts.20180105.sql'))
log.info('Restoring projects')