Added script for teardown of database.
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user