From d7ece7825e99f94df3f1bc435c35548b050e9ba7 Mon Sep 17 00:00:00 2001 From: sveisvei Date: Thu, 16 Jun 2016 23:30:21 +0200 Subject: [PATCH] remove finn stuff --- package.json | 3 +- scripts/generate-liquibase-artifact.js | 61 -------------------------- scripts/init.down.sql | 2 - scripts/init.up.sql | 2 - 4 files changed, 1 insertion(+), 67 deletions(-) delete mode 100755 scripts/generate-liquibase-artifact.js delete mode 100644 scripts/init.down.sql delete mode 100644 scripts/init.up.sql diff --git a/package.json b/package.json index c873fa56b6..d2c5be740b 100644 --- a/package.json +++ b/package.json @@ -93,8 +93,7 @@ "pre-commit": "^1.0.2", "react-tools": "^0.13.1", "supertest": "^1.2.0", - "supervisor": "^0.10.0", - "xmlbuilder": "^8.2.2" + "supervisor": "^0.10.0" }, "jest": { "scriptPreprocessor": "/scripts/jest-preprocessor.js", diff --git a/scripts/generate-liquibase-artifact.js b/scripts/generate-liquibase-artifact.js deleted file mode 100755 index fd29d3f9a5..0000000000 --- a/scripts/generate-liquibase-artifact.js +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env node - -// TODO: move this to somewhere internal - -var builder = require('xmlbuilder'); -var util = require('util'); -var path = require('path'); -var fs = require('fs'); -var sqlRoot = path.resolve(__dirname, '../migrations/sql'); -var encoding = 'UTF-8'; - -var changeLog = builder.create('databaseChangeLog').dec('1.0', encoding); -changeLog.att('xmlns', 'http://www.liquibase.org/xml/ns/dbchangelog'); -changeLog.att('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); -changeLog.att('xmlns:ext', 'http://www.liquibase.org/xml/ns/dbchangelog-ext'); -changeLog.att('xsi:schemaLocation', - 'http://www.liquibase.org/xml/ns/dbchangelog ' + - 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd ' + - 'http://www.liquibase.org/xml/ns/dbchangelog-ext ' + - 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd'); - -fs.readdir(sqlRoot, function (err, files) { - if (err) { - throw err; - } - - var changes = {}; - - initialInit(changes); - - files.forEach(function (sqlFile) { - var match = sqlFile.match(/(.+?)\.(up|down)\.sql/); - - if (!match) { - throw util.format('invalid sql file name, missing up|down: %s', sqlFile); - } - - var name = match[1]; - var direction = match[2]; - - changes[name] = changes[name] || {}; - changes[name][direction] = fs.readFileSync(path.resolve(sqlRoot, sqlFile), { encoding: encoding }); - }); - - Object.keys(changes).forEach(function (name) { - var change = changes[name]; - - var el = changeLog.ele('changeSet', { id: name, author: 'unleash' }); - el.ele('sql', {}, change.up); - el.ele('rollback', {}, change.down); - }); - - util.puts(changeLog.end({ pretty: true })); -}); - -function initialInit(changes) { - changes["init-prepare"] = {}; - changes["init-prepare"]["up"] = fs.readFileSync(path.resolve(__dirname, './init.up.sql'), { encoding: encoding }); - changes["init-prepare"]["down"] = fs.readFileSync(path.resolve(__dirname, './init.down.sql'), { encoding: encoding }); -} - diff --git a/scripts/init.down.sql b/scripts/init.down.sql deleted file mode 100644 index 210ae9fdbf..0000000000 --- a/scripts/init.down.sql +++ /dev/null @@ -1,2 +0,0 @@ -alter default privileges for user unleash_admin revoke select,insert,update,delete on tables TO unleash_user; -alter default privileges for user unleash_admin revoke select,update on sequences TO unleash_user; \ No newline at end of file diff --git a/scripts/init.up.sql b/scripts/init.up.sql deleted file mode 100644 index 0f7c055dd0..0000000000 --- a/scripts/init.up.sql +++ /dev/null @@ -1,2 +0,0 @@ -alter default privileges for user unleash_admin grant select,insert,update,delete on tables TO unleash_user; -alter default privileges for user unleash_admin grant select,update on sequences TO unleash_user; \ No newline at end of file