Built motion from commit aab208717af8d15f4fa224cdb6a202877019af9b. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.37.js
1 const a915_0x13a9=['addIndex\x20%s\x20%s\x20%s','query','removeColumn','migration','join','queryInterface','enableUncompleteSave','catch','prototype','enqueue','Removed\x20column\x20%s\x20from\x20%s','jscripty_projects','report_jscripty_sessions','changeColumn','final','sms_messages','stringify','inspect','addColumn','tail','exports','BOOLEAN','finally','util','phone','completed','sms_interactions','then','Added\x20column\x20%s\x20to\x20%s','table\x20dropped\x20%s','sequelize','sequence','addIndex','info','dropTable','query\x20%s'];(function(_0x41bcf0,_0x13a958){const _0x45960f=function(_0xcdc333){while(--_0xcdc333){_0x41bcf0['push'](_0x41bcf0['shift']());}};_0x45960f(++_0x13a958);}(a915_0x13a9,0x169));const a915_0x4596=function(_0x41bcf0,_0x13a958){_0x41bcf0=_0x41bcf0-0x0;let _0x45960f=a915_0x13a9[_0x41bcf0];return _0x45960f;};const _0x1ffc1d=a915_0x4596;'use strict';const logger=require('../config/logger')(_0x1ffc1d('0x2')),util=require(_0x1ffc1d('0x16')),Sequence=function(){};Sequence[_0x1ffc1d('0x7')]['enqueue']=function(_0xcdc333){const _0x2dd023=_0x1ffc1d;this[_0x2dd023('0x12')]=this[_0x2dd023('0x12')]?this[_0x2dd023('0x12')][_0x2dd023('0x15')](_0xcdc333):_0xcdc333();};const Migration=function(_0x2cece8){const _0x37fe06=_0x1ffc1d;this['queryInterface']=_0x2cece8,this[_0x37fe06('0x1e')]=new Sequence();};Migration['prototype'][_0x1ffc1d('0xc')]=function(_0x59f76a,_0xee9775,_0x58812e){const _0x1922a1=_0x1ffc1d,_0x29b116=this;this[_0x1922a1('0x1e')]['enqueue'](function(){const _0x8c68c3=_0x1922a1;return _0x29b116[_0x8c68c3('0x4')]['changeColumn'](_0x59f76a,_0xee9775,_0x58812e)[_0x8c68c3('0x1a')](function(){const _0xbbcb51=_0x8c68c3;logger[_0xbbcb51('0x20')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0xee9775,_0x59f76a);})[_0x8c68c3('0x6')](function(_0x2ae66e){const _0x55192c=_0x8c68c3;logger[_0x55192c('0x20')](JSON[_0x55192c('0xf')](_0x2ae66e));});});},Migration['prototype'][_0x1ffc1d('0x11')]=function(_0x3ca20f,_0x59d16a,_0x14c4f8){const _0x2f0c14=_0x1ffc1d,_0x103078=this;this[_0x2f0c14('0x1e')][_0x2f0c14('0x8')](function(){const _0x1dbd3e=_0x2f0c14;return _0x103078[_0x1dbd3e('0x4')][_0x1dbd3e('0x11')](_0x3ca20f,_0x59d16a,_0x14c4f8)[_0x1dbd3e('0x1a')](function(){const _0x3cd733=_0x1dbd3e;logger['info'](_0x3cd733('0x1b'),_0x59d16a,_0x3ca20f);})['catch'](function(_0x16fb1d){const _0x1e9339=_0x1dbd3e;logger[_0x1e9339('0x20')](JSON[_0x1e9339('0xf')](_0x16fb1d));});});},Migration[_0x1ffc1d('0x7')][_0x1ffc1d('0x21')]=function(_0x397f7d){const _0x53b360=_0x1ffc1d,_0xd373e9=this;this['sequence'][_0x53b360('0x8')](function(){const _0x354133=_0x53b360;return _0xd373e9[_0x354133('0x4')]['dropTable'](_0x397f7d,{'force':!![]})[_0x354133('0x1a')](function(){const _0x1c7d6f=_0x354133;logger[_0x1c7d6f('0x20')](_0x1c7d6f('0x1c'),_0x397f7d);})[_0x354133('0x6')](function(_0x38b53e){const _0x50128c=_0x354133;logger[_0x50128c('0x20')](JSON[_0x50128c('0xf')](_0x38b53e));});});},Migration[_0x1ffc1d('0x7')][_0x1ffc1d('0x1f')]=function(_0x1dc8fe,_0xe0106f,_0x3c0b55){const _0x3bafb5=_0x1ffc1d,_0x5033b4=this;this[_0x3bafb5('0x1e')][_0x3bafb5('0x8')](function(){const _0x3532de=_0x3bafb5;return _0x5033b4['queryInterface'][_0x3532de('0x1f')](_0x1dc8fe,_0xe0106f,{'indexName':_0x3c0b55})[_0x3532de('0x1a')](function(){const _0xe23289=_0x3532de;logger[_0xe23289('0x20')](_0xe23289('0x23'),_0x1dc8fe,_0xe0106f[_0xe23289('0x3')](','),_0x3c0b55);})[_0x3532de('0x6')](function(_0x4619e0){const _0x45cda4=_0x3532de;logger[_0x45cda4('0x20')](JSON[_0x45cda4('0xf')](_0x4619e0));});});},Migration[_0x1ffc1d('0x7')][_0x1ffc1d('0x0')]=function(_0x4df146){const _0x343f6a=_0x1ffc1d,_0x5a60f2=this;this[_0x343f6a('0x1e')][_0x343f6a('0x8')](function(){const _0x335265=_0x343f6a;return _0x5a60f2['queryInterface'][_0x335265('0x1d')]['query'](_0x4df146)['then'](function(){const _0x59e0ed=_0x335265;logger[_0x59e0ed('0x20')](_0x59e0ed('0x22'),_0x4df146);})[_0x335265('0x6')](function(_0x33a5f9){const _0x5628ed=_0x335265;logger[_0x5628ed('0x20')](JSON[_0x5628ed('0xf')](_0x33a5f9));});});},Migration[_0x1ffc1d('0x7')][_0x1ffc1d('0x1')]=function(_0x5adca1,_0x19decf){const _0x36e26d=this;this['sequence']['enqueue'](function(){const _0x2dcd70=a915_0x4596;return _0x36e26d['queryInterface'][_0x2dcd70('0x1')](_0x5adca1,_0x19decf)[_0x2dcd70('0x1a')](function(){const _0x468e83=_0x2dcd70;logger[_0x468e83('0x20')](_0x468e83('0x9'),_0x19decf,_0x5adca1);})[_0x2dcd70('0x6')](function(_0x3b6bac){const _0x329a91=_0x2dcd70;logger[_0x329a91('0x20')](util[_0x329a91('0x10')](_0x3b6bac,{'showHidden':![],'depth':null}));});});},Migration['prototype']['final']=function(_0x38733d){const _0x22da4f=_0x1ffc1d;this[_0x22da4f('0x1e')][_0x22da4f('0x8')](function(){return _0x38733d();});},module[_0x1ffc1d('0x13')]={'up':function(_0x1b70da,_0x44abb4){return new Promise(function(_0x3901fe){const _0x150e50=a915_0x4596,_0x4d2c08=new Migration(_0x1b70da);_0x4d2c08[_0x150e50('0x11')](_0x150e50('0xa'),_0x150e50('0x5'),{'type':_0x44abb4['BOOLEAN'],'defaultValue':!![]}),_0x4d2c08[_0x150e50('0x11')](_0x150e50('0xb'),_0x150e50('0x18'),{'type':_0x44abb4[_0x150e50('0x14')],'defaultValue':![]}),_0x4d2c08['query']('UPDATE\x20report_jscripty_sessions\x20SET\x20completed\x20=\x20true'),_0x4d2c08[_0x150e50('0x11')](_0x150e50('0x19'),_0x150e50('0x17'),{'type':_0x44abb4['STRING']}),_0x4d2c08[_0x150e50('0x11')](_0x150e50('0xe'),'phone',{'type':_0x44abb4['STRING']}),_0x4d2c08[_0x150e50('0xd')](_0x3901fe);});},'down':function(){}};