From b67f9a64874f8be556a7c0d7aabd4616a1ef486b Mon Sep 17 00:00:00 2001 From: ivaosthu Date: Tue, 6 Dec 2016 11:44:58 +0100 Subject: [PATCH] Cleanup client_instances related to #176 --- .../20161104074441-create-client-instances.js | 16 +++++++++++++++- .../sql/010-create-client-instances.down.sql | 1 - .../sql/010-create-client-instances.up.sql | 7 ------- 3 files changed, 15 insertions(+), 9 deletions(-) delete mode 100644 migrations/sql/010-create-client-instances.down.sql delete mode 100644 migrations/sql/010-create-client-instances.up.sql diff --git a/migrations/20161104074441-create-client-instances.js b/migrations/20161104074441-create-client-instances.js index 039bb7f310..5346ab6fe3 100644 --- a/migrations/20161104074441-create-client-instances.js +++ b/migrations/20161104074441-create-client-instances.js @@ -1,3 +1,17 @@ 'use strict'; -module.exports = require('../scripts/migration-runner').create('010-create-client-instances'); +exports.up = function (db, callback) { + db.runSql(` + CREATE TABLE client_instances ( + app_name varchar(255), + instance_id varchar(255), + client_ip varchar(255), + last_seen timestamp default now(), + created_at timestamp default now() + );`, callback); +}; + + +exports.down = function (db, callback) { + db.runSql('DROP TABLE client_instances;', callback); +}; diff --git a/migrations/sql/010-create-client-instances.down.sql b/migrations/sql/010-create-client-instances.down.sql deleted file mode 100644 index c113b5c4ce..0000000000 --- a/migrations/sql/010-create-client-instances.down.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE client_instances; diff --git a/migrations/sql/010-create-client-instances.up.sql b/migrations/sql/010-create-client-instances.up.sql deleted file mode 100644 index f2c96e54a7..0000000000 --- a/migrations/sql/010-create-client-instances.up.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE client_instances ( - app_name varchar(255), - instance_id varchar(255), - client_ip varchar(255), - last_seen timestamp default now(), - created_at timestamp default now() -);