Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / migrations / 2.2.0.js
1 'use strict';const a1137_0x17e7=['Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','180905ueVDqz','dropTable','changeColumn','11604icfybg','tail','2469198cUrQnv','catch','800552fREHxv','clickatell','final','enqueue','info','1zyKHAF','745471YtlleQ','removeIndex\x20%s\x20%s','55LbrUZp','query','prototype','then','inspect','addIndex','sms_accounts','1Kqydgm','resolve','intelepeer','1aBKzQc','table\x20dropped\x20%s','106xFUFBl','3254UFsZzP','clicksend','removeIndex','removeColumn','finally','type','query\x20%s','sequelize','exports','1740376rhHhzj','infobip','Removed\x20column\x20%s\x20from\x20%s','migration','renameColumn','skebby','phoneBarListenPort','twilio','stringify','queryInterface','Added\x20column\x20%s\x20to\x20%s','sequence'];const a1137_0x1e15=function(_0x3c1635,_0x146d8c){_0x3c1635=_0x3c1635-0xdb;let _0x17e718=a1137_0x17e7[_0x3c1635];return _0x17e718;};const a1137_0x13b2be=a1137_0x1e15;(function(_0x547705,_0x515cd4){const _0x56149a=a1137_0x1e15;while(!![]){try{const _0x31dcb5=parseInt(_0x56149a(0xfe))*parseInt(_0x56149a(0x10b))+-parseInt(_0x56149a(0xf2))*-parseInt(_0x56149a(0x10a))+parseInt(_0x56149a(0xe2))+-parseInt(_0x56149a(0xef))*-parseInt(_0x56149a(0x105))+parseInt(_0x56149a(0xf6))*parseInt(_0x56149a(0xfb))+parseInt(_0x56149a(0x108))*-parseInt(_0x56149a(0xfc))+-parseInt(_0x56149a(0xf4));if(_0x31dcb5===_0x515cd4)break;else _0x547705['push'](_0x547705['shift']());}catch(_0x12ceb2){_0x547705['push'](_0x547705['shift']());}}}(a1137_0x17e7,0xdfabe));const util=require('util'),logger=require('@config/logger')(a1137_0x13b2be(0xe5)),Sequence=function(){};Sequence[a1137_0x13b2be(0x100)][a1137_0x13b2be(0xf9)]=function(_0x328c69){const _0x23d01c=a1137_0x13b2be;this[_0x23d01c(0xf3)]=this[_0x23d01c(0xf3)]?this['tail'][_0x23d01c(0xdd)](_0x328c69):_0x328c69();};const Migration=function(_0x5e1e2e){const _0x2d19e5=a1137_0x13b2be;this['queryInterface']=_0x5e1e2e,this[_0x2d19e5(0xed)]=new Sequence();};Migration[a1137_0x13b2be(0x100)][a1137_0x13b2be(0xf1)]=function(_0x5d0164,_0x2fcd3a,_0x53f413){const _0x56098e=a1137_0x13b2be,_0x59c043=this;this[_0x56098e(0xed)]['enqueue'](function(){const _0x3a0b2f=_0x56098e;return _0x59c043[_0x3a0b2f(0xeb)][_0x3a0b2f(0xf1)](_0x5d0164,_0x2fcd3a,_0x53f413)[_0x3a0b2f(0x101)](function(){const _0x542ea3=_0x3a0b2f;logger[_0x542ea3(0xfa)]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x2fcd3a,_0x5d0164);})[_0x3a0b2f(0xf5)](function(_0xebb2f0){const _0x29b3b6=_0x3a0b2f;logger[_0x29b3b6(0xfa)](JSON[_0x29b3b6(0xea)](_0xebb2f0));});});},Migration[a1137_0x13b2be(0x100)]['addColumn']=function(_0x4918b5,_0x1cce3e,_0x4b6b0f){const _0x2c7400=a1137_0x13b2be,_0x1f184c=this;this[_0x2c7400(0xed)][_0x2c7400(0xf9)](function(){const _0x1af077=_0x2c7400;return _0x1f184c['queryInterface']['addColumn'](_0x4918b5,_0x1cce3e,_0x4b6b0f)['then'](function(){const _0x22aa15=a1137_0x1e15;logger[_0x22aa15(0xfa)](_0x22aa15(0xec),_0x1cce3e,_0x4918b5);})[_0x1af077(0xf5)](function(_0x2e0852){const _0x47487e=_0x1af077;logger[_0x47487e(0xfa)](JSON[_0x47487e(0xea)](_0x2e0852));});});},Migration[a1137_0x13b2be(0x100)][a1137_0x13b2be(0xf0)]=function(_0x7d821f){const _0x1f464f=a1137_0x13b2be,_0x5dd7c2=this;this[_0x1f464f(0xed)]['enqueue'](function(){const _0x126d14=_0x1f464f;return _0x5dd7c2[_0x126d14(0xeb)][_0x126d14(0xf0)](_0x7d821f,{'force':!![]})[_0x126d14(0x101)](function(){const _0x359e41=_0x126d14;logger[_0x359e41(0xfa)](_0x359e41(0x109),_0x7d821f);})['catch'](function(_0xa6513e){const _0x4c5cf5=_0x126d14;logger[_0x4c5cf5(0xfa)](JSON[_0x4c5cf5(0xea)](_0xa6513e));});});},Migration[a1137_0x13b2be(0x100)][a1137_0x13b2be(0x103)]=function(_0x2f4118,_0x2fb368,_0x1b9aa3){const _0x2ec8f9=a1137_0x13b2be,_0x5f5491=this;this[_0x2ec8f9(0xed)][_0x2ec8f9(0xf9)](function(){const _0x3f3355=_0x2ec8f9;return _0x5f5491[_0x3f3355(0xeb)]['addIndex'](_0x2f4118,_0x2fb368,{'indexName':_0x1b9aa3})[_0x3f3355(0x101)](function(){const _0x50670b=_0x3f3355;logger[_0x50670b(0xfa)]('addIndex\x20%s\x20%s\x20%s',_0x2f4118,_0x2fb368['join'](','),_0x1b9aa3);})[_0x3f3355(0xf5)](function(_0x4e2c8e){logger['info'](JSON['stringify'](_0x4e2c8e));});});},Migration[a1137_0x13b2be(0x100)][a1137_0x13b2be(0xdb)]=function(_0x5c6fae,_0x1da38f){const _0x1fb7af=a1137_0x13b2be,_0xbc3b4a=this;this[_0x1fb7af(0xed)]['enqueue'](function(){const _0x53d215=_0x1fb7af;return _0xbc3b4a[_0x53d215(0xeb)][_0x53d215(0xdb)](_0x5c6fae,_0x1da38f)[_0x53d215(0x101)](function(){const _0x3d5c23=_0x53d215;logger['info'](_0x3d5c23(0xfd),_0x5c6fae,_0x1da38f);})[_0x53d215(0xf5)](function(_0x2ca979){const _0x20d757=_0x53d215;logger[_0x20d757(0xfa)](JSON[_0x20d757(0xea)](_0x2ca979));});});},Migration[a1137_0x13b2be(0x100)][a1137_0x13b2be(0xff)]=function(_0x585179){const _0x411a82=a1137_0x13b2be,_0x4e647a=this;this[_0x411a82(0xed)][_0x411a82(0xf9)](function(){const _0x33c793=_0x411a82;return _0x4e647a[_0x33c793(0xeb)][_0x33c793(0xe0)][_0x33c793(0xff)](_0x585179)[_0x33c793(0x101)](function(){const _0x9f2258=_0x33c793;logger[_0x9f2258(0xfa)](_0x9f2258(0xdf),_0x585179);})[_0x33c793(0xf5)](function(_0x5d2856){const _0x643e9f=_0x33c793;logger['info'](JSON[_0x643e9f(0xea)](_0x5d2856));});});},Migration[a1137_0x13b2be(0x100)][a1137_0x13b2be(0xdc)]=function(_0x19a6a4,_0xc3a0e4){const _0x12c864=a1137_0x13b2be,_0x584953=this;this['sequence'][_0x12c864(0xf9)](function(){const _0x38b1fb=_0x12c864;return _0x584953[_0x38b1fb(0xeb)][_0x38b1fb(0xdc)](_0x19a6a4,_0xc3a0e4)[_0x38b1fb(0x101)](function(){const _0x394d99=_0x38b1fb;logger[_0x394d99(0xfa)](_0x394d99(0xe4),_0xc3a0e4,_0x19a6a4);})[_0x38b1fb(0xf5)](function(_0xc96f23){const _0x1cf7d6=_0x38b1fb;logger[_0x1cf7d6(0xfa)](util[_0x1cf7d6(0x102)](_0xc96f23,{'showHidden':![],'depth':null}));});});},Migration[a1137_0x13b2be(0x100)][a1137_0x13b2be(0xe6)]=function(_0x355fc2,_0x2daf29,_0x39fe13){const _0x19ebd0=a1137_0x13b2be,_0x2121f0=this;this[_0x19ebd0(0xed)][_0x19ebd0(0xf9)](function(){return _0x2121f0['queryInterface']['renameColumn'](_0x355fc2,_0x2daf29,_0x39fe13)['then'](function(){const _0x5c1c96=a1137_0x1e15;logger[_0x5c1c96(0xfa)](_0x5c1c96(0xee),_0x2daf29,_0x39fe13,_0x355fc2);})['catch'](function(_0x8a09f4){const _0x2b575b=a1137_0x1e15;logger[_0x2b575b(0xfa)](util['inspect'](_0x8a09f4,{'showHidden':![],'depth':null}));});});},Migration[a1137_0x13b2be(0x100)][a1137_0x13b2be(0xf8)]=function(_0x439ad3){const _0x40d034=a1137_0x13b2be;this[_0x40d034(0xed)][_0x40d034(0xf9)](function(){return _0x439ad3();});},module[a1137_0x13b2be(0xe1)]={'up':function(_0x5b928a,_0x10e2bc){return new Promise(function(_0x2d9567){const _0x53aa6e=a1137_0x1e15,_0x3cec5c=new Migration(_0x5b928a);_0x3cec5c['changeColumn'](_0x53aa6e(0x104),_0x53aa6e(0xde),{'type':_0x10e2bc['ENUM'](_0x53aa6e(0xe9),_0x53aa6e(0xe7),'connectel',_0x53aa6e(0x10c),'plivo',_0x53aa6e(0xf7),'csc',_0x53aa6e(0xe3),_0x53aa6e(0x107))}),_0x3cec5c[_0x53aa6e(0xf1)]('users',_0x53aa6e(0xe8),{'type':_0x10e2bc['INTEGER'](0x5),'defaultValue':0x1428}),_0x3cec5c[_0x53aa6e(0xf8)](_0x2d9567);});},'down':function(){const _0x51a221=a1137_0x13b2be;return Promise[_0x51a221(0x106)]();}};