-
-
Save ianpward/6aa25df804a14b4a4d6e7156322a9747 to your computer and use it in GitHub Desktop.
Realm Data Adapter Reset Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PostgresController = require('realm-data-adapters').PostgresController; | |
const spawnSync = require('child_process').spawnSync; | |
const Config = require('./config'); | |
// Remove db and replication slot | |
console.log(`Dropping replication slot '${Config.database_name}'`); | |
console.log(`Removing ${Config.database_name} database`); | |
PostgresController.removePostgresDB(Config.database_name, Config.postgres_config); | |
// Remove old data | |
spawnSync( 'rm -rf ./realm-object-server' ); | |
process.exit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment