Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.68.js
1 'use strict';const a1119_0x3fa3=['INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Interested\x27,\x20NOW(),\x20NOW())','query','dropTable','table\x20dropped\x20%s','stringify','finally','exports','join','messagesAlignment','539556urIBVv','prototype','144110FziJbH','query\x20%s','addColumn','366146ModLbU','INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Fax\x27,\x20NOW(),\x20NOW())','enqueue','STRING','INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Not\x20Interested\x27,\x20NOW(),\x20NOW())','catch','util','removeIndex\x20%s\x20%s','removeColumn','info','279655ywRpAw','renameColumn','515763FkulyU','queryInterface','UPDATE\x20settings\x20SET\x20messagesAlignment=\x27alternate\x27','openchannel_accounts','@config/logger','sequence','314190CDsYRf','Added\x20column\x20%s\x20to\x20%s','final','inspect','999341LRHjkv','closeReason','sequelize','tail','changeColumn','INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Sold\x27,\x20NOW(),\x20NOW())','removeIndex','then','migration','Changed\x20column\x20%s\x20in\x20table\x20%s'];const a1119_0x355b=function(_0x3d9515,_0x189967){_0x3d9515=_0x3d9515-0x15c;let _0x3fa3a6=a1119_0x3fa3[_0x3d9515];return _0x3fa3a6;};const a1119_0x3693df=a1119_0x355b;(function(_0x492e33,_0x3182bc){const _0x2588ce=a1119_0x355b;while(!![]){try{const _0x165990=parseInt(_0x2588ce(0x166))+parseInt(_0x2588ce(0x164))+-parseInt(_0x2588ce(0x170))+parseInt(_0x2588ce(0x185))+parseInt(_0x2588ce(0x183))+-parseInt(_0x2588ce(0x16c))+parseInt(_0x2588ce(0x188));if(_0x165990===_0x3182bc)break;else _0x492e33['push'](_0x492e33['shift']());}catch(_0x165a71){_0x492e33['push'](_0x492e33['shift']());}}}(a1119_0x3fa3,0x81cf3));const util=require(a1119_0x3693df(0x160)),logger=require(a1119_0x3693df(0x16a))(a1119_0x3693df(0x178)),Sequence=function(){};Sequence[a1119_0x3693df(0x184)][a1119_0x3693df(0x15c)]=function(_0x53ae0f){const _0x1ae93d=a1119_0x3693df;this['tail']=this[_0x1ae93d(0x173)]?this[_0x1ae93d(0x173)][_0x1ae93d(0x17f)](_0x53ae0f):_0x53ae0f();};const Migration=function(_0x1e6f0d){const _0x151fd4=a1119_0x3693df;this[_0x151fd4(0x167)]=_0x1e6f0d,this[_0x151fd4(0x16b)]=new Sequence();};Migration[a1119_0x3693df(0x184)][a1119_0x3693df(0x174)]=function(_0x476a53,_0x22a71b,_0x2fe992){const _0x554013=a1119_0x3693df,_0x3dd268=this;this[_0x554013(0x16b)][_0x554013(0x15c)](function(){const _0x42c133=_0x554013;return _0x3dd268[_0x42c133(0x167)][_0x42c133(0x174)](_0x476a53,_0x22a71b,_0x2fe992)[_0x42c133(0x177)](function(){const _0x24d37b=_0x42c133;logger[_0x24d37b(0x163)](_0x24d37b(0x179),_0x22a71b,_0x476a53);})[_0x42c133(0x15f)](function(_0x4234a7){const _0x3da9dd=_0x42c133;logger[_0x3da9dd(0x163)](JSON[_0x3da9dd(0x17e)](_0x4234a7));});});},Migration['prototype'][a1119_0x3693df(0x187)]=function(_0x1f0701,_0x47998c,_0x430b53){const _0x1c1599=a1119_0x3693df,_0x339da6=this;this[_0x1c1599(0x16b)][_0x1c1599(0x15c)](function(){const _0x431b0d=_0x1c1599;return _0x339da6[_0x431b0d(0x167)]['addColumn'](_0x1f0701,_0x47998c,_0x430b53)[_0x431b0d(0x177)](function(){const _0x271bec=_0x431b0d;logger['info'](_0x271bec(0x16d),_0x47998c,_0x1f0701);})['catch'](function(_0x58ba1e){const _0x9eac5=_0x431b0d;logger[_0x9eac5(0x163)](JSON[_0x9eac5(0x17e)](_0x58ba1e));});});},Migration['prototype'][a1119_0x3693df(0x17c)]=function(_0x3558ea){const _0xa9fa82=a1119_0x3693df,_0x1d2fae=this;this[_0xa9fa82(0x16b)][_0xa9fa82(0x15c)](function(){const _0x16f53e=_0xa9fa82;return _0x1d2fae['queryInterface']['dropTable'](_0x3558ea,{'force':!![]})[_0x16f53e(0x177)](function(){const _0x41d49c=_0x16f53e;logger[_0x41d49c(0x163)](_0x41d49c(0x17d),_0x3558ea);})['catch'](function(_0x1577f9){const _0x3be6db=_0x16f53e;logger[_0x3be6db(0x163)](JSON[_0x3be6db(0x17e)](_0x1577f9));});});},Migration['prototype']['addIndex']=function(_0x46e18a,_0x24e965,_0x4c61f5){const _0x51b30c=a1119_0x3693df,_0x4d52fd=this;this[_0x51b30c(0x16b)][_0x51b30c(0x15c)](function(){const _0x18bde8=_0x51b30c;return _0x4d52fd[_0x18bde8(0x167)]['addIndex'](_0x46e18a,_0x24e965,{'indexName':_0x4c61f5})['then'](function(){const _0x4d595d=_0x18bde8;logger[_0x4d595d(0x163)]('addIndex\x20%s\x20%s\x20%s',_0x46e18a,_0x24e965[_0x4d595d(0x181)](','),_0x4c61f5);})[_0x18bde8(0x15f)](function(_0x26b9dc){const _0x4d04de=_0x18bde8;logger[_0x4d04de(0x163)](JSON['stringify'](_0x26b9dc));});});},Migration['prototype'][a1119_0x3693df(0x176)]=function(_0x389baa,_0x586f13){const _0x162d1d=a1119_0x3693df,_0x1a8b72=this;this[_0x162d1d(0x16b)][_0x162d1d(0x15c)](function(){const _0x28878b=_0x162d1d;return _0x1a8b72['queryInterface'][_0x28878b(0x176)](_0x389baa,_0x586f13)[_0x28878b(0x177)](function(){const _0x109724=_0x28878b;logger[_0x109724(0x163)](_0x109724(0x161),_0x389baa,_0x586f13);})[_0x28878b(0x15f)](function(_0x2dd0c6){const _0x10e94d=_0x28878b;logger[_0x10e94d(0x163)](JSON[_0x10e94d(0x17e)](_0x2dd0c6));});});},Migration[a1119_0x3693df(0x184)][a1119_0x3693df(0x17b)]=function(_0xe4cf86){const _0x2468cd=a1119_0x3693df,_0x50dbc3=this;this[_0x2468cd(0x16b)][_0x2468cd(0x15c)](function(){const _0xb339a3=_0x2468cd;return _0x50dbc3[_0xb339a3(0x167)][_0xb339a3(0x172)][_0xb339a3(0x17b)](_0xe4cf86)[_0xb339a3(0x177)](function(){const _0x42c398=_0xb339a3;logger['info'](_0x42c398(0x186),_0xe4cf86);})[_0xb339a3(0x15f)](function(_0x1dfd7a){const _0x114645=_0xb339a3;logger[_0x114645(0x163)](JSON[_0x114645(0x17e)](_0x1dfd7a));});});},Migration[a1119_0x3693df(0x184)]['removeColumn']=function(_0x3d2611,_0x1add2b){const _0x4f96f2=a1119_0x3693df,_0x441c6c=this;this[_0x4f96f2(0x16b)][_0x4f96f2(0x15c)](function(){const _0x129f2a=_0x4f96f2;return _0x441c6c[_0x129f2a(0x167)][_0x129f2a(0x162)](_0x3d2611,_0x1add2b)['then'](function(){const _0x4ab2e9=_0x129f2a;logger[_0x4ab2e9(0x163)]('Removed\x20column\x20%s\x20from\x20%s',_0x1add2b,_0x3d2611);})[_0x129f2a(0x15f)](function(_0x48e484){const _0x4d91ab=_0x129f2a;logger[_0x4d91ab(0x163)](util['inspect'](_0x48e484,{'showHidden':![],'depth':null}));});});},Migration[a1119_0x3693df(0x184)][a1119_0x3693df(0x165)]=function(_0x181f4f,_0x274dec,_0x5574f1){const _0x417bf5=a1119_0x3693df,_0x3cd30e=this;this[_0x417bf5(0x16b)]['enqueue'](function(){const _0xc18e95=_0x417bf5;return _0x3cd30e['queryInterface'][_0xc18e95(0x165)](_0x181f4f,_0x274dec,_0x5574f1)[_0xc18e95(0x177)](function(){const _0x215573=_0xc18e95;logger[_0x215573(0x163)]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x274dec,_0x5574f1,_0x181f4f);})[_0xc18e95(0x15f)](function(_0x2be88a){const _0x4ba839=_0xc18e95;logger[_0x4ba839(0x163)](util[_0x4ba839(0x16f)](_0x2be88a,{'showHidden':![],'depth':null}));});});},Migration[a1119_0x3693df(0x184)][a1119_0x3693df(0x16e)]=function(_0x45b9a4){const _0x5f40dd=a1119_0x3693df;this['sequence'][_0x5f40dd(0x15c)](function(){return _0x45b9a4();});},module[a1119_0x3693df(0x180)]={'up':function(_0x35d76c,_0x219c6c){return new Promise(function(_0x24be8d){const _0x6443a3=a1119_0x355b,_0x321c6a=new Migration(_0x35d76c);_0x321c6a[_0x6443a3(0x17b)](_0x6443a3(0x189)),_0x321c6a[_0x6443a3(0x17b)]('INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Answer\x20Machine\x27,\x20NOW(),\x20NOW())'),_0x321c6a[_0x6443a3(0x17b)](_0x6443a3(0x17a)),_0x321c6a[_0x6443a3(0x17b)](_0x6443a3(0x15e)),_0x321c6a['query'](_0x6443a3(0x175)),_0x321c6a[_0x6443a3(0x17b)]('INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Special\x27,\x20NOW(),\x20NOW())'),_0x321c6a[_0x6443a3(0x187)](_0x6443a3(0x169),'mapKey',{'type':_0x219c6c['STRING']}),_0x321c6a[_0x6443a3(0x187)]('chat_interactions',_0x6443a3(0x171),{'type':_0x219c6c[_0x6443a3(0x15d)]}),_0x321c6a[_0x6443a3(0x187)]('settings',_0x6443a3(0x182),{'type':_0x219c6c[_0x6443a3(0x15d)]}),_0x321c6a[_0x6443a3(0x17b)](_0x6443a3(0x168)),_0x321c6a[_0x6443a3(0x16e)](_0x24be8d);});},'down':function(){return Promise['resolve']();}};