Built motion from commit 8dca541896b0ff92bb88a36cc13f4f385b593b4b. Version 3.0.0...
[motion-next.git] / server / migrations / 2.2.0.js
1 const a965_0x2d42=['Changed\x20column\x20%s\x20in\x20table\x20%s','Added\x20column\x20%s\x20to\x20%s','removeIndex','removeIndex\x20%s\x20%s','phoneBarListenPort','util','changeColumn','query','renameColumn','info','plivo','addIndex\x20%s\x20%s\x20%s','exports','users','twilio','skebby','prototype','inspect','infobip','then','addIndex','type','catch','sms_accounts','queryInterface','enqueue','sequence','tail','Removed\x20column\x20%s\x20from\x20%s','join','INTEGER','removeColumn','connectel','../config/logger','final','dropTable','stringify','query\x20%s','clicksend','finally','table\x20dropped\x20%s','ENUM','addColumn','csc'];(function(_0x30aa28,_0x2d420b){const _0x1d67f4=function(_0x5dfa64){while(--_0x5dfa64){_0x30aa28['push'](_0x30aa28['shift']());}};_0x1d67f4(++_0x2d420b);}(a965_0x2d42,0x158));const a965_0x1d67=function(_0x30aa28,_0x2d420b){_0x30aa28=_0x30aa28-0x0;let _0x1d67f4=a965_0x2d42[_0x30aa28];return _0x1d67f4;};const _0x21aa26=a965_0x1d67;'use strict';const util=require(_0x21aa26('0xd')),logger=require(_0x21aa26('0x29'))('migration'),Sequence=function(){};Sequence['prototype'][_0x21aa26('0x21')]=function(_0x5dfa64){const _0x17a89e=_0x21aa26;this[_0x17a89e('0x23')]=this[_0x17a89e('0x23')]?this[_0x17a89e('0x23')][_0x17a89e('0x3')](_0x5dfa64):_0x5dfa64();};const Migration=function(_0x3275c9){const _0x5e0815=_0x21aa26;this['queryInterface']=_0x3275c9,this[_0x5e0815('0x22')]=new Sequence();};Migration[_0x21aa26('0x18')][_0x21aa26('0xe')]=function(_0x10b777,_0x6b236d,_0x13e0f4){const _0x2b6a62=_0x21aa26,_0x5e7a93=this;this[_0x2b6a62('0x22')][_0x2b6a62('0x21')](function(){const _0x1203a5=_0x2b6a62;return _0x5e7a93[_0x1203a5('0x20')]['changeColumn'](_0x10b777,_0x6b236d,_0x13e0f4)['then'](function(){const _0x415626=_0x1203a5;logger[_0x415626('0x11')](_0x415626('0x8'),_0x6b236d,_0x10b777);})['catch'](function(_0x42fff0){const _0x5598e4=_0x1203a5;logger[_0x5598e4('0x11')](JSON[_0x5598e4('0x0')](_0x42fff0));});});},Migration['prototype']['addColumn']=function(_0x1938f5,_0x2ef1d0,_0x557239){const _0x2b7b70=_0x21aa26,_0x7e743=this;this[_0x2b7b70('0x22')][_0x2b7b70('0x21')](function(){const _0x46a2f6=_0x2b7b70;return _0x7e743[_0x46a2f6('0x20')][_0x46a2f6('0x6')](_0x1938f5,_0x2ef1d0,_0x557239)[_0x46a2f6('0x1b')](function(){const _0x296d9d=_0x46a2f6;logger['info'](_0x296d9d('0x9'),_0x2ef1d0,_0x1938f5);})[_0x46a2f6('0x1e')](function(_0x5691fc){const _0x3d6d94=_0x46a2f6;logger[_0x3d6d94('0x11')](JSON['stringify'](_0x5691fc));});});},Migration[_0x21aa26('0x18')][_0x21aa26('0x2b')]=function(_0x5ba423){const _0x12823a=this;this['sequence']['enqueue'](function(){const _0x3e961b=a965_0x1d67;return _0x12823a[_0x3e961b('0x20')][_0x3e961b('0x2b')](_0x5ba423,{'force':!![]})['then'](function(){const _0x37ebf3=_0x3e961b;logger[_0x37ebf3('0x11')](_0x37ebf3('0x4'),_0x5ba423);})[_0x3e961b('0x1e')](function(_0x3bf5c1){const _0x54e1c5=_0x3e961b;logger[_0x54e1c5('0x11')](JSON[_0x54e1c5('0x0')](_0x3bf5c1));});});},Migration['prototype'][_0x21aa26('0x1c')]=function(_0x2f98b5,_0x33acfa,_0x4a8d16){const _0x1a7f69=_0x21aa26,_0x57c6fc=this;this[_0x1a7f69('0x22')][_0x1a7f69('0x21')](function(){const _0x499040=_0x1a7f69;return _0x57c6fc[_0x499040('0x20')][_0x499040('0x1c')](_0x2f98b5,_0x33acfa,{'indexName':_0x4a8d16})['then'](function(){const _0x46234f=_0x499040;logger[_0x46234f('0x11')](_0x46234f('0x13'),_0x2f98b5,_0x33acfa[_0x46234f('0x25')](','),_0x4a8d16);})[_0x499040('0x1e')](function(_0x272448){const _0x2a221a=_0x499040;logger[_0x2a221a('0x11')](JSON[_0x2a221a('0x0')](_0x272448));});});},Migration[_0x21aa26('0x18')][_0x21aa26('0xa')]=function(_0x25f808,_0x7e9183){const _0x45c626=_0x21aa26,_0x57822a=this;this[_0x45c626('0x22')][_0x45c626('0x21')](function(){const _0x5266b1=_0x45c626;return _0x57822a[_0x5266b1('0x20')][_0x5266b1('0xa')](_0x25f808,_0x7e9183)['then'](function(){const _0x58035b=_0x5266b1;logger['info'](_0x58035b('0xb'),_0x25f808,_0x7e9183);})[_0x5266b1('0x1e')](function(_0x388aba){const _0x476520=_0x5266b1;logger[_0x476520('0x11')](JSON[_0x476520('0x0')](_0x388aba));});});},Migration['prototype'][_0x21aa26('0xf')]=function(_0xbf894f){const _0xcf86e3=_0x21aa26,_0x2af4d5=this;this[_0xcf86e3('0x22')]['enqueue'](function(){const _0x37edde=_0xcf86e3;return _0x2af4d5[_0x37edde('0x20')]['sequelize'][_0x37edde('0xf')](_0xbf894f)[_0x37edde('0x1b')](function(){const _0x58882e=_0x37edde;logger[_0x58882e('0x11')](_0x58882e('0x1'),_0xbf894f);})[_0x37edde('0x1e')](function(_0x150daf){const _0x1d7310=_0x37edde;logger['info'](JSON[_0x1d7310('0x0')](_0x150daf));});});},Migration[_0x21aa26('0x18')][_0x21aa26('0x27')]=function(_0x4c85c3,_0x563825){const _0x53a41e=this;this['sequence']['enqueue'](function(){const _0x1696a7=a965_0x1d67;return _0x53a41e[_0x1696a7('0x20')][_0x1696a7('0x27')](_0x4c85c3,_0x563825)[_0x1696a7('0x1b')](function(){const _0x2da4ab=_0x1696a7;logger['info'](_0x2da4ab('0x24'),_0x563825,_0x4c85c3);})[_0x1696a7('0x1e')](function(_0x541584){logger['info'](util['inspect'](_0x541584,{'showHidden':![],'depth':null}));});});},Migration['prototype']['renameColumn']=function(_0x3b7027,_0x4e64b5,_0xb9e984){const _0x5cba37=_0x21aa26,_0x5889c2=this;this[_0x5cba37('0x22')][_0x5cba37('0x21')](function(){const _0x54fdfb=_0x5cba37;return _0x5889c2[_0x54fdfb('0x20')][_0x54fdfb('0x10')](_0x3b7027,_0x4e64b5,_0xb9e984)[_0x54fdfb('0x1b')](function(){const _0x1dc8bd=_0x54fdfb;logger[_0x1dc8bd('0x11')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x4e64b5,_0xb9e984,_0x3b7027);})['catch'](function(_0x33d55c){const _0x570214=_0x54fdfb;logger[_0x570214('0x11')](util[_0x570214('0x19')](_0x33d55c,{'showHidden':![],'depth':null}));});});},Migration[_0x21aa26('0x18')][_0x21aa26('0x2a')]=function(_0x54940f){this['sequence']['enqueue'](function(){return _0x54940f();});},module[_0x21aa26('0x14')]={'up':function(_0x342f94,_0x1de913){return new Promise(function(_0x56e4a6){const _0x107033=a965_0x1d67,_0x2075e2=new Migration(_0x342f94);_0x2075e2['changeColumn'](_0x107033('0x1f'),_0x107033('0x1d'),{'type':_0x1de913[_0x107033('0x5')](_0x107033('0x16'),_0x107033('0x17'),_0x107033('0x28'),_0x107033('0x2'),_0x107033('0x12'),'clickatell',_0x107033('0x7'),_0x107033('0x1a'),'intelepeer')}),_0x2075e2[_0x107033('0xe')](_0x107033('0x15'),_0x107033('0xc'),{'type':_0x1de913[_0x107033('0x26')](0x5),'defaultValue':0x1428}),_0x2075e2[_0x107033('0x2a')](_0x56e4a6);});},'down':function(){}};