Built motion from commit 973e3e332e1c8e2f84c4b0cd2e5af794131724f5. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.53.js
1 const a932_0x17d8=['final','query','addIndex\x20%s\x20%s\x20%s','twilio','../config/logger','info','queryInterface','inspect','csv','UPDATE\x20users\x20SET\x20insecure=NULL\x20WHERE\x20insecure=\x27port,invite\x27','sms_accounts','changeColumn','prototype','exports','ENUM','addIndex','sequelize','migration','tail','plivo','connectel','UPDATE\x20analytics_extracted_reports\x20SET\x20output=\x27xlsx\x27\x20WHERE\x20output=\x27xls\x27','insecure','output','xls','join','then','cm_contacts','xlsx','TEXT','table\x20dropped\x20%s','catch','query\x20%s','description','sequence','Changed\x20column\x20%s\x20in\x20table\x20%s','analytics_extracted_reports','addColumn','util','skebby','clicksend','pdf','finally','dropTable','Added\x20column\x20%s\x20to\x20%s','stringify','removeColumn','enqueue'];(function(_0x1c171c,_0x17d8ce){const _0x495edb=function(_0x27814f){while(--_0x27814f){_0x1c171c['push'](_0x1c171c['shift']());}};_0x495edb(++_0x17d8ce);}(a932_0x17d8,0x17e));const a932_0x495e=function(_0x1c171c,_0x17d8ce){_0x1c171c=_0x1c171c-0x0;let _0x495edb=a932_0x17d8[_0x1c171c];return _0x495edb;};const _0x28f8ff=a932_0x495e;'use strict';const util=require(_0x28f8ff('0x28')),logger=require(_0x28f8ff('0x6'))(_0x28f8ff('0x13')),Sequence=function(){};Sequence[_0x28f8ff('0xe')][_0x28f8ff('0x1')]=function(_0x27814f){const _0x596774=_0x28f8ff;this[_0x596774('0x14')]=this[_0x596774('0x14')]?this[_0x596774('0x14')][_0x596774('0x2c')](_0x27814f):_0x27814f();};const Migration=function(_0xbbdcd){const _0x52e8b4=_0x28f8ff;this[_0x52e8b4('0x8')]=_0xbbdcd,this[_0x52e8b4('0x24')]=new Sequence();};Migration[_0x28f8ff('0xe')][_0x28f8ff('0xd')]=function(_0x6cdcb3,_0x1fffbb,_0x191378){const _0x440c29=_0x28f8ff,_0x3e0d8d=this;this[_0x440c29('0x24')][_0x440c29('0x1')](function(){const _0x49f257=_0x440c29;return _0x3e0d8d[_0x49f257('0x8')]['changeColumn'](_0x6cdcb3,_0x1fffbb,_0x191378)['then'](function(){const _0x1f4153=_0x49f257;logger[_0x1f4153('0x7')](_0x1f4153('0x25'),_0x1fffbb,_0x6cdcb3);})['catch'](function(_0x448225){const _0x5d3f06=_0x49f257;logger['info'](JSON[_0x5d3f06('0x2f')](_0x448225));});});},Migration[_0x28f8ff('0xe')]['addColumn']=function(_0xf4680d,_0x31e8d7,_0x16ea3c){const _0x240111=_0x28f8ff,_0x507d6b=this;this[_0x240111('0x24')][_0x240111('0x1')](function(){const _0x16c06e=_0x240111;return _0x507d6b['queryInterface'][_0x16c06e('0x27')](_0xf4680d,_0x31e8d7,_0x16ea3c)['then'](function(){const _0x4cf9cd=_0x16c06e;logger[_0x4cf9cd('0x7')](_0x4cf9cd('0x2e'),_0x31e8d7,_0xf4680d);})[_0x16c06e('0x21')](function(_0x383972){const _0x232709=_0x16c06e;logger[_0x232709('0x7')](JSON[_0x232709('0x2f')](_0x383972));});});},Migration[_0x28f8ff('0xe')]['dropTable']=function(_0x5d8b50){const _0xaf67d6=_0x28f8ff,_0x488868=this;this[_0xaf67d6('0x24')][_0xaf67d6('0x1')](function(){const _0x90e5b=_0xaf67d6;return _0x488868[_0x90e5b('0x8')][_0x90e5b('0x2d')](_0x5d8b50,{'force':!![]})[_0x90e5b('0x1c')](function(){const _0x117670=_0x90e5b;logger[_0x117670('0x7')](_0x117670('0x20'),_0x5d8b50);})[_0x90e5b('0x21')](function(_0xd91f56){const _0x303e56=_0x90e5b;logger[_0x303e56('0x7')](JSON['stringify'](_0xd91f56));});});},Migration[_0x28f8ff('0xe')][_0x28f8ff('0x11')]=function(_0xd1d197,_0x15e91d,_0x196fd8){const _0x223070=_0x28f8ff,_0x2cae52=this;this[_0x223070('0x24')][_0x223070('0x1')](function(){const _0x4b2d34=_0x223070;return _0x2cae52['queryInterface'][_0x4b2d34('0x11')](_0xd1d197,_0x15e91d,{'indexName':_0x196fd8})[_0x4b2d34('0x1c')](function(){const _0x37403d=_0x4b2d34;logger[_0x37403d('0x7')](_0x37403d('0x4'),_0xd1d197,_0x15e91d[_0x37403d('0x1b')](','),_0x196fd8);})[_0x4b2d34('0x21')](function(_0x60dfe7){const _0xeb6106=_0x4b2d34;logger[_0xeb6106('0x7')](JSON[_0xeb6106('0x2f')](_0x60dfe7));});});},Migration['prototype'][_0x28f8ff('0x3')]=function(_0xcbb4f9){const _0xf97b1d=_0x28f8ff,_0x3571c2=this;this[_0xf97b1d('0x24')][_0xf97b1d('0x1')](function(){const _0x2efe6f=_0xf97b1d;return _0x3571c2[_0x2efe6f('0x8')][_0x2efe6f('0x12')][_0x2efe6f('0x3')](_0xcbb4f9)[_0x2efe6f('0x1c')](function(){const _0x310b33=_0x2efe6f;logger['info'](_0x310b33('0x22'),_0xcbb4f9);})[_0x2efe6f('0x21')](function(_0x22ff73){const _0x195558=_0x2efe6f;logger[_0x195558('0x7')](JSON[_0x195558('0x2f')](_0x22ff73));});});},Migration['prototype']['removeColumn']=function(_0x1afe58,_0x520230){const _0x3f9651=_0x28f8ff,_0x18f4de=this;this['sequence'][_0x3f9651('0x1')](function(){const _0x5a06ba=_0x3f9651;return _0x18f4de['queryInterface'][_0x5a06ba('0x0')](_0x1afe58,_0x520230)[_0x5a06ba('0x1c')](function(){const _0x83d734=_0x5a06ba;logger[_0x83d734('0x7')]('Removed\x20column\x20%s\x20from\x20%s',_0x520230,_0x1afe58);})[_0x5a06ba('0x21')](function(_0x33daa8){const _0x13e9ce=_0x5a06ba;logger[_0x13e9ce('0x7')](util[_0x13e9ce('0x9')](_0x33daa8,{'showHidden':![],'depth':null}));});});},Migration[_0x28f8ff('0xe')][_0x28f8ff('0x2')]=function(_0x3996a9){const _0xa073bc=_0x28f8ff;this[_0xa073bc('0x24')][_0xa073bc('0x1')](function(){return _0x3996a9();});},module[_0x28f8ff('0xf')]={'up':function(_0x1c2f41,_0x6d0180){return new Promise(function(_0xc5bbd0){const _0x5366f6=a932_0x495e,_0x39f1ee=new Migration(_0x1c2f41);_0x39f1ee['changeColumn'](_0x5366f6('0x1d'),_0x5366f6('0x23'),{'type':_0x6d0180[_0x5366f6('0x1f')]}),_0x39f1ee['changeColumn'](_0x5366f6('0xc'),'type',{'type':_0x6d0180[_0x5366f6('0x10')](_0x5366f6('0x5'),_0x5366f6('0x29'),_0x5366f6('0x16'),_0x5366f6('0x2a'),_0x5366f6('0x15'))}),_0x39f1ee[_0x5366f6('0xd')]('analytics_extracted_reports',_0x5366f6('0x19'),{'type':_0x6d0180[_0x5366f6('0x10')](_0x5366f6('0xa'),_0x5366f6('0x2b'),_0x5366f6('0x1a'),'xlsx'),'allowNull':![],'defaultValue':_0x5366f6('0xa')}),_0x39f1ee['query'](_0x5366f6('0x17')),_0x39f1ee['changeColumn'](_0x5366f6('0x26'),_0x5366f6('0x19'),{'type':_0x6d0180[_0x5366f6('0x10')](_0x5366f6('0xa'),_0x5366f6('0x2b'),_0x5366f6('0x1e')),'allowNull':![],'defaultValue':_0x5366f6('0xa')}),_0x39f1ee[_0x5366f6('0x3')](_0x5366f6('0xb')),_0x39f1ee[_0x5366f6('0xd')]('users',_0x5366f6('0x18'),{'type':_0x6d0180['STRING'],'allowNull':!![]}),_0x39f1ee[_0x5366f6('0x2')](_0xc5bbd0);});},'down':function(){}};