Added script for teardown of database.

This commit is contained in:
2017-12-20 21:07:33 +01:00
parent 00ad5cf7a8
commit f6c27482e4

View File

@@ -69,6 +69,15 @@ class SqliteDatabase {
return this.execute(setupSchema);
}
/**
* Tears down the database by running tearDown.sql file in schemas/.
* @returns {Promise}
*/
tearDown() {
const tearDownSchema = this.readSqlFile('tearDown.sql');
return this.execute(tearDownSchema);
}
/**
* Returns the file contents of a SQL file in schemas/.
* @returns {String}