Altered wording in migration utils

- if the table doesn't exist, it's not necessarily a failure that we
  should be informing the user about
- this brings the message wording in line with other log lines of
  similar operations
This commit is contained in:
Daniel Lockyer 2022-05-09 16:49:28 +01:00
parent c8d6024a0c
commit aed7ef0cae
No known key found for this signature in database
GPG Key ID: D21186F0B47295AD

View File

@ -56,7 +56,7 @@ function dropTables(names) {
const exists = await connection.schema.hasTable(name);
if (!exists) {
logging.warn(`Failed to drop table: ${name} - table does not exist`);
logging.warn(`Skipping dropping table: ${name} - table does not exist`);
} else {
logging.info(`Dropping table: ${name}`);
await commands.deleteTable(name, connection);
@ -80,7 +80,7 @@ function recreateTable(name, tableSpec) {
const exists = await connection.schema.hasTable(name);
if (!exists) {
logging.warn(`Failed to drop table: ${name} - table does not exist`);
logging.warn(`Skipping dropping table: ${name} - table does not exist`);
} else {
logging.info(`Dropping table: ${name}`);
await commands.deleteTable(name, connection);