Built motion from commit 362b9399b4d0ed5560fbb795af995925d345fc38. Version 3.0.0...
[motion-next.git] / server / migrations / 2.5.6.js
1 const a1183_0x4c79=['removeIndex\x20%s\x20%s','Changed\x20column\x20%s\x20in\x20table\x20%s','FULLTEXT','migration','indexName','query','email','final','finally','util','info','sequence','queryInterface','fti_cm_contacts','renameColumn','fax','firstName','addColumn','../config/logger','then','table\x20dropped\x20%s','addIndex','enqueue','stringify','catch','indicesType','removeColumn','tail','dropTable','prototype','removeIndex','sequelize','lastName','phone','cm_contacts','Removed\x20column\x20%s\x20from\x20%s','inspect'];(function(_0xba9c09,_0x419524){const _0x4c7902=function(_0x5adfcc){while(--_0x5adfcc){_0xba9c09['push'](_0xba9c09['shift']());}};_0x4c7902(++_0x419524);}(a1183_0x4c79,0xc6));const a1183_0x5adf=function(_0xba9c09,_0x419524){_0xba9c09=_0xba9c09-0x169;let _0x4c7902=a1183_0x4c79[_0xba9c09];return _0x4c7902;};const a1183_0x38dc70=a1183_0x5adf;'use strict';const util=require(a1183_0x38dc70(0x18a)),logger=require(a1183_0x38dc70(0x16e))(a1183_0x38dc70(0x184)),Sequence=function(){};Sequence['prototype'][a1183_0x38dc70(0x172)]=function(_0x383f74){const _0x35f3b8=a1183_0x38dc70;this[_0x35f3b8(0x177)]=this[_0x35f3b8(0x177)]?this[_0x35f3b8(0x177)][_0x35f3b8(0x189)](_0x383f74):_0x383f74();};const Migration=function(_0xce6b1c){const _0x52cfca=a1183_0x38dc70;this[_0x52cfca(0x18d)]=_0xce6b1c,this['sequence']=new Sequence();};Migration[a1183_0x38dc70(0x179)]['changeColumn']=function(_0x2f8b74,_0x114776,_0x2dddb0){const _0x5309ff=this;this['sequence']['enqueue'](function(){const _0xeb7280=a1183_0x5adf;return _0x5309ff['queryInterface']['changeColumn'](_0x2f8b74,_0x114776,_0x2dddb0)[_0xeb7280(0x16f)](function(){const _0x1a2532=_0xeb7280;logger['info'](_0x1a2532(0x182),_0x114776,_0x2f8b74);})[_0xeb7280(0x174)](function(_0x31d632){logger['info'](JSON['stringify'](_0x31d632));});});},Migration[a1183_0x38dc70(0x179)][a1183_0x38dc70(0x16d)]=function(_0x514cd5,_0x45dbdf,_0x213eda){const _0x58af9f=a1183_0x38dc70,_0x595a3b=this;this[_0x58af9f(0x18c)][_0x58af9f(0x172)](function(){const _0x78ae69=_0x58af9f;return _0x595a3b[_0x78ae69(0x18d)][_0x78ae69(0x16d)](_0x514cd5,_0x45dbdf,_0x213eda)[_0x78ae69(0x16f)](function(){logger['info']('Added\x20column\x20%s\x20to\x20%s',_0x45dbdf,_0x514cd5);})[_0x78ae69(0x174)](function(_0xa7e477){const _0x315544=_0x78ae69;logger['info'](JSON[_0x315544(0x173)](_0xa7e477));});});},Migration[a1183_0x38dc70(0x179)][a1183_0x38dc70(0x178)]=function(_0x24fb9b){const _0x19634b=a1183_0x38dc70,_0x542e8f=this;this[_0x19634b(0x18c)]['enqueue'](function(){const _0x2e60bb=_0x19634b;return _0x542e8f[_0x2e60bb(0x18d)][_0x2e60bb(0x178)](_0x24fb9b,{'force':!![]})['then'](function(){const _0x3160e4=_0x2e60bb;logger[_0x3160e4(0x18b)](_0x3160e4(0x170),_0x24fb9b);})['catch'](function(_0x182f93){const _0x423b61=_0x2e60bb;logger['info'](JSON[_0x423b61(0x173)](_0x182f93));});});},Migration[a1183_0x38dc70(0x179)]['addIndex']=function(_0x4b90db,_0x5129a3,_0x38b19b){const _0x139ae8=a1183_0x38dc70,_0x2908bb=this;this['sequence'][_0x139ae8(0x172)](function(){const _0x436556=_0x139ae8;return _0x2908bb[_0x436556(0x18d)][_0x436556(0x171)](_0x4b90db,_0x5129a3,{'indexName':_0x38b19b['indexName'],'indicesType':_0x38b19b[_0x436556(0x175)]})[_0x436556(0x16f)](function(){const _0x28f7de=_0x436556;logger[_0x28f7de(0x18b)]('addIndex\x20%s\x20%s\x20%s\x20[%s]',_0x4b90db,_0x5129a3['join'](','),_0x38b19b[_0x28f7de(0x185)],_0x38b19b[_0x28f7de(0x175)]);})[_0x436556(0x174)](function(_0x3678c0){const _0x2d63e6=_0x436556;logger[_0x2d63e6(0x18b)](JSON[_0x2d63e6(0x173)](_0x3678c0));});});},Migration[a1183_0x38dc70(0x179)][a1183_0x38dc70(0x17a)]=function(_0x5d7ddf,_0x55df99){const _0x55da32=a1183_0x38dc70,_0x367474=this;this[_0x55da32(0x18c)][_0x55da32(0x172)](function(){const _0x8e850b=_0x55da32;return _0x367474[_0x8e850b(0x18d)][_0x8e850b(0x17a)](_0x5d7ddf,_0x55df99)[_0x8e850b(0x16f)](function(){const _0x5d0ecf=_0x8e850b;logger[_0x5d0ecf(0x18b)](_0x5d0ecf(0x181),_0x5d7ddf,_0x55df99);})[_0x8e850b(0x174)](function(_0xbd932a){const _0x3b8783=_0x8e850b;logger[_0x3b8783(0x18b)](JSON['stringify'](_0xbd932a));});});},Migration[a1183_0x38dc70(0x179)][a1183_0x38dc70(0x186)]=function(_0x5bed39){const _0x4df841=a1183_0x38dc70,_0x5bf8da=this;this[_0x4df841(0x18c)][_0x4df841(0x172)](function(){const _0x1afa14=_0x4df841;return _0x5bf8da[_0x1afa14(0x18d)][_0x1afa14(0x17b)][_0x1afa14(0x186)](_0x5bed39)['then'](function(){logger['info']('query\x20%s',_0x5bed39);})['catch'](function(_0x3b63c1){const _0x5244d3=_0x1afa14;logger[_0x5244d3(0x18b)](JSON['stringify'](_0x3b63c1));});});},Migration[a1183_0x38dc70(0x179)][a1183_0x38dc70(0x176)]=function(_0x8eaf5e,_0xeeb860){const _0x33287b=a1183_0x38dc70,_0x3d81ad=this;this[_0x33287b(0x18c)]['enqueue'](function(){const _0x53db6a=_0x33287b;return _0x3d81ad[_0x53db6a(0x18d)]['removeColumn'](_0x8eaf5e,_0xeeb860)['then'](function(){const _0x483d91=_0x53db6a;logger['info'](_0x483d91(0x17f),_0xeeb860,_0x8eaf5e);})[_0x53db6a(0x174)](function(_0x106a3a){const _0x3dfd2e=_0x53db6a;logger[_0x3dfd2e(0x18b)](util[_0x3dfd2e(0x180)](_0x106a3a,{'showHidden':![],'depth':null}));});});},Migration[a1183_0x38dc70(0x179)][a1183_0x38dc70(0x16a)]=function(_0x95505f,_0x20d0da,_0x3364ab){const _0x24384b=this;this['sequence']['enqueue'](function(){const _0xb6f111=a1183_0x5adf;return _0x24384b['queryInterface'][_0xb6f111(0x16a)](_0x95505f,_0x20d0da,_0x3364ab)[_0xb6f111(0x16f)](function(){const _0x53b6d0=_0xb6f111;logger[_0x53b6d0(0x18b)]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x20d0da,_0x3364ab,_0x95505f);})[_0xb6f111(0x174)](function(_0x5b20ed){const _0x88469f=_0xb6f111;logger[_0x88469f(0x18b)](util['inspect'](_0x5b20ed,{'showHidden':![],'depth':null}));});});},Migration['prototype'][a1183_0x38dc70(0x188)]=function(_0x5b3817){const _0x20cdcb=a1183_0x38dc70;this['sequence'][_0x20cdcb(0x172)](function(){return _0x5b3817();});},module['exports']={'up':function(_0x52d983){return new Promise(function(_0x3adef4){const _0x5ed702=a1183_0x5adf,_0x3cc066=new Migration(_0x52d983);_0x3cc066[_0x5ed702(0x171)](_0x5ed702(0x17e),[_0x5ed702(0x16c),_0x5ed702(0x17c),_0x5ed702(0x17d),'mobile',_0x5ed702(0x16b),_0x5ed702(0x187)],{'indexName':_0x5ed702(0x169),'indicesType':_0x5ed702(0x183)}),_0x3cc066['final'](_0x3adef4);});},'down':function(){}};