From d9bfcc7c8a7f0879ce03d6f3837503331b2b3804 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 13 Nov 2015 10:15:27 +0100 Subject: [PATCH] Change manifestJson column from VARCHAR to TEXT --- .../20151113091257-apps-alter-manifestJson.js | 16 ++++++++++++++++ migrations/schema.sql | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 migrations/20151113091257-apps-alter-manifestJson.js diff --git a/migrations/20151113091257-apps-alter-manifestJson.js b/migrations/20151113091257-apps-alter-manifestJson.js new file mode 100644 index 000000000..ce05ddfcd --- /dev/null +++ b/migrations/20151113091257-apps-alter-manifestJson.js @@ -0,0 +1,16 @@ +dbm = dbm || require('db-migrate'); +var type = dbm.dataType; + +exports.up = function(db, callback) { + db.runSql('ALTER TABLE apps MODIFY manifestJson TEXT', [], function (error) { + if (error) console.error(error); + callback(error); + }); +}; + +exports.down = function(db, callback) { + db.runSql('ALTER TABLE apps MODIFY manifestJson VARCHAR(2048)', [], function (error) { + if (error) console.error(error); + callback(error); + }); +}; diff --git a/migrations/schema.sql b/migrations/schema.sql index c3b8aea4c..ac70366d9 100644 --- a/migrations/schema.sql +++ b/migrations/schema.sql @@ -45,7 +45,7 @@ CREATE TABLE IF NOT EXISTS apps( runState VARCHAR(512), health VARCHAR(128), containerId VARCHAR(128), - manifestJson VARCHAR(2048), + manifestJson TEXT, httpPort INTEGER, // this is the nginx proxy port and not manifest.httpPort location VARCHAR(128) NOT NULL UNIQUE, dnsRecordId VARCHAR(512),