Built motion from commit e493b9a4954b50a8ee6d0034ba3601cd210d989d. Version 3.0.0...
[motion-next.git] / server / migrations / 2.4.7.js
1 'use strict';const a1179_0x4580=['prototype','Leads','enqueue','join','changeColumn','inspect','removeColumn','addIndex','addIndex\x20%s\x20%s\x20%s\x20[%s]','sequence','sequelize','addColumn','474368oztbBg','then','tail','Contacts','indexName','customerPort','810831AsrIQH','1KJdQLp','indicesType','info','feedbackTitle','stringify','catch','exports','query\x20%s','queryInterface','finally','342339HoazvZ','STRING','query','324149NbgzXL','959525YlqIGp','migration','BOOLEAN','1oNOyCu','Added\x20column\x20%s\x20to\x20%s','489958aJwyDa','removeIndex\x20%s\x20%s','chat_websites','dropTable','moduleCreate','1QbCnwE','Removed\x20column\x20%s\x20from\x20%s','314743WNDups','renameColumn','removeIndex'];const a1179_0xb482=function(_0x2cdce4,_0x114302){_0x2cdce4=_0x2cdce4-0xad;let _0x4580cb=a1179_0x4580[_0x2cdce4];return _0x4580cb;};const a1179_0x4e7d8a=a1179_0xb482;(function(_0x168f91,_0x1ae498){const _0x157e65=a1179_0xb482;while(!![]){try{const _0x3322a5=-parseInt(_0x157e65(0xc9))+parseInt(_0x157e65(0xbc))*parseInt(_0x157e65(0xc0))+-parseInt(_0x157e65(0xbd))+parseInt(_0x157e65(0xd8))+-parseInt(_0x157e65(0xc2))*-parseInt(_0x157e65(0xc7))+parseInt(_0x157e65(0xae))+parseInt(_0x157e65(0xb9))*-parseInt(_0x157e65(0xaf));if(_0x3322a5===_0x1ae498)break;else _0x168f91['push'](_0x168f91['shift']());}catch(_0x30e16e){_0x168f91['push'](_0x168f91['shift']());}}}(a1179_0x4580,0x75d8b));const util=require('util'),logger=require('@config/logger')(a1179_0x4e7d8a(0xbe)),Sequence=function(){};Sequence['prototype'][a1179_0x4e7d8a(0xce)]=function(_0x171dba){const _0x4731b8=a1179_0x4e7d8a;this[_0x4731b8(0xda)]=this['tail']?this[_0x4731b8(0xda)][_0x4731b8(0xb8)](_0x171dba):_0x171dba();};const Migration=function(_0x406948){const _0x439bc3=a1179_0x4e7d8a;this[_0x439bc3(0xb7)]=_0x406948,this[_0x439bc3(0xd5)]=new Sequence();};Migration['prototype'][a1179_0x4e7d8a(0xd0)]=function(_0x32e3c2,_0xec86fd,_0x5a190e){const _0x44972e=a1179_0x4e7d8a,_0x543086=this;this['sequence'][_0x44972e(0xce)](function(){const _0x39199f=_0x44972e;return _0x543086['queryInterface']['changeColumn'](_0x32e3c2,_0xec86fd,_0x5a190e)[_0x39199f(0xd9)](function(){const _0x440762=_0x39199f;logger[_0x440762(0xb1)]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0xec86fd,_0x32e3c2);})[_0x39199f(0xb4)](function(_0x5a9a86){const _0x34633f=_0x39199f;logger['info'](JSON[_0x34633f(0xb3)](_0x5a9a86));});});},Migration[a1179_0x4e7d8a(0xcc)][a1179_0x4e7d8a(0xd7)]=function(_0xf41cf3,_0x3e310d,_0x87d2c8){const _0x1350e0=a1179_0x4e7d8a,_0x4f4bd9=this;this[_0x1350e0(0xd5)][_0x1350e0(0xce)](function(){const _0x29962c=_0x1350e0;return _0x4f4bd9['queryInterface'][_0x29962c(0xd7)](_0xf41cf3,_0x3e310d,_0x87d2c8)[_0x29962c(0xd9)](function(){const _0x36fd51=_0x29962c;logger[_0x36fd51(0xb1)](_0x36fd51(0xc1),_0x3e310d,_0xf41cf3);})[_0x29962c(0xb4)](function(_0x4a52fe){const _0x14f693=_0x29962c;logger[_0x14f693(0xb1)](JSON[_0x14f693(0xb3)](_0x4a52fe));});});},Migration[a1179_0x4e7d8a(0xcc)][a1179_0x4e7d8a(0xc5)]=function(_0x585415){const _0x4e3d22=a1179_0x4e7d8a,_0x4d09ef=this;this[_0x4e3d22(0xd5)]['enqueue'](function(){const _0x1938b1=_0x4e3d22;return _0x4d09ef['queryInterface']['dropTable'](_0x585415,{'force':!![]})[_0x1938b1(0xd9)](function(){logger['info']('table\x20dropped\x20%s',_0x585415);})[_0x1938b1(0xb4)](function(_0x3d1d7a){const _0x45c69e=_0x1938b1;logger[_0x45c69e(0xb1)](JSON[_0x45c69e(0xb3)](_0x3d1d7a));});});},Migration['prototype']['addIndex']=function(_0x5d6a3d,_0xb1e5c2,_0x544225){const _0x3d5caf=a1179_0x4e7d8a,_0x1a4f3d=this;this[_0x3d5caf(0xd5)][_0x3d5caf(0xce)](function(){const _0x95fa41=_0x3d5caf;return _0x1a4f3d[_0x95fa41(0xb7)][_0x95fa41(0xd3)](_0x5d6a3d,_0xb1e5c2,{'indexName':_0x544225[_0x95fa41(0xdc)],'indicesType':_0x544225[_0x95fa41(0xb0)]})['then'](function(){const _0x41382e=_0x95fa41;logger[_0x41382e(0xb1)](_0x41382e(0xd4),_0x5d6a3d,_0xb1e5c2[_0x41382e(0xcf)](','),_0x544225[_0x41382e(0xdc)],_0x544225[_0x41382e(0xb0)]);})[_0x95fa41(0xb4)](function(_0x1dc6e2){const _0x569e76=_0x95fa41;logger[_0x569e76(0xb1)](JSON[_0x569e76(0xb3)](_0x1dc6e2));});});},Migration[a1179_0x4e7d8a(0xcc)]['removeIndex']=function(_0x12bbbc,_0x2484ec){const _0x3f9e29=a1179_0x4e7d8a,_0x383dd0=this;this[_0x3f9e29(0xd5)]['enqueue'](function(){const _0x533f2b=_0x3f9e29;return _0x383dd0[_0x533f2b(0xb7)][_0x533f2b(0xcb)](_0x12bbbc,_0x2484ec)[_0x533f2b(0xd9)](function(){const _0x161806=_0x533f2b;logger[_0x161806(0xb1)](_0x161806(0xc3),_0x12bbbc,_0x2484ec);})[_0x533f2b(0xb4)](function(_0x5cead1){const _0x38565d=_0x533f2b;logger[_0x38565d(0xb1)](JSON[_0x38565d(0xb3)](_0x5cead1));});});},Migration[a1179_0x4e7d8a(0xcc)]['query']=function(_0x471fa5){const _0x5b68f7=a1179_0x4e7d8a,_0x2ce178=this;this['sequence'][_0x5b68f7(0xce)](function(){const _0x3d3268=_0x5b68f7;return _0x2ce178[_0x3d3268(0xb7)][_0x3d3268(0xd6)][_0x3d3268(0xbb)](_0x471fa5)[_0x3d3268(0xd9)](function(){const _0x404450=_0x3d3268;logger['info'](_0x404450(0xb6),_0x471fa5);})[_0x3d3268(0xb4)](function(_0x4afa2a){const _0x572fdb=_0x3d3268;logger['info'](JSON[_0x572fdb(0xb3)](_0x4afa2a));});});},Migration[a1179_0x4e7d8a(0xcc)][a1179_0x4e7d8a(0xd2)]=function(_0xdabaf9,_0x2f519d){const _0x51239e=a1179_0x4e7d8a,_0x26f30b=this;this[_0x51239e(0xd5)][_0x51239e(0xce)](function(){const _0xa2defa=_0x51239e;return _0x26f30b[_0xa2defa(0xb7)]['removeColumn'](_0xdabaf9,_0x2f519d)[_0xa2defa(0xd9)](function(){const _0x10ff94=_0xa2defa;logger['info'](_0x10ff94(0xc8),_0x2f519d,_0xdabaf9);})['catch'](function(_0x2070dc){const _0x214019=_0xa2defa;logger['info'](util[_0x214019(0xd1)](_0x2070dc,{'showHidden':![],'depth':null}));});});},Migration[a1179_0x4e7d8a(0xcc)][a1179_0x4e7d8a(0xca)]=function(_0x158cc3,_0x6e0292,_0x4a22d1){const _0x2d0e2b=a1179_0x4e7d8a,_0x4daeff=this;this[_0x2d0e2b(0xd5)][_0x2d0e2b(0xce)](function(){const _0x5582b5=_0x2d0e2b;return _0x4daeff[_0x5582b5(0xb7)][_0x5582b5(0xca)](_0x158cc3,_0x6e0292,_0x4a22d1)[_0x5582b5(0xd9)](function(){const _0x44fac9=_0x5582b5;logger[_0x44fac9(0xb1)]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x6e0292,_0x4a22d1,_0x158cc3);})[_0x5582b5(0xb4)](function(_0x5cc32b){const _0x3b9a29=_0x5582b5;logger[_0x3b9a29(0xb1)](util[_0x3b9a29(0xd1)](_0x5cc32b,{'showHidden':![],'depth':null}));});});},Migration[a1179_0x4e7d8a(0xcc)]['final']=function(_0x17c230){const _0x32f49e=a1179_0x4e7d8a;this['sequence'][_0x32f49e(0xce)](function(){return _0x17c230();});},module[a1179_0x4e7d8a(0xb5)]={'up':function(_0x3d3539,_0x5eda79){return new Promise(function(_0x766f4d){const _0x15f926=a1179_0xb482,_0x2af7de=new Migration(_0x3d3539);_0x2af7de[_0x15f926(0xd7)]('int_zoho_configurations',_0x15f926(0xc6),{'type':_0x5eda79['ENUM'](_0x15f926(0xcd),_0x15f926(0xdb)),'defaultValue':_0x15f926(0xcd)}),_0x2af7de[_0x15f926(0xd7)]('chat_interactions',_0x15f926(0xad),{'type':_0x5eda79[_0x15f926(0xba)]}),_0x2af7de[_0x15f926(0xd7)](_0x15f926(0xc4),'enableSendButton',{'type':_0x5eda79[_0x15f926(0xbf)],'defaultValue':![]}),_0x2af7de[_0x15f926(0xd7)](_0x15f926(0xc4),_0x15f926(0xb2),{'type':_0x5eda79[_0x15f926(0xba)],'defaultValue':'Feedback'}),_0x2af7de['final'](_0x766f4d);});},'down':function(){return Promise['resolve']();}};