Built motion from commit 459747fdfe53bbf13fbede61eeaffea1f1438f86. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.42.js
index 79dcf55..dad3440 100644 (file)
@@ -1 +1 @@
-const a921_0x7b55=['prototype','color','failMessage','then','api/cmCustomField/cmCustomField.model','import','switch','notIn','getCustomFields','info','table\x20dropped\x20%s','Added\x20column\x20%s\x20to\x20%s','final','root','users','../config/logger','changeColumn','Removed\x20column\x20%s\x20from\x20%s','exports','queryInterface','inspect','number','TEXT','addColumn','length','finally','STRING','tools_tags','query','addIndex\x20%s\x20%s\x20%s','util','enqueue','migration','tail','addIndex','catch','query\x20%s','stringify','sequence','BOOLEAN','dropTable','secret','removeColumn'];(function(_0x459183,_0x7b554c){const _0x1fc7eb=function(_0x1d03e6){while(--_0x1d03e6){_0x459183['push'](_0x459183['shift']());}};_0x1fc7eb(++_0x7b554c);}(a921_0x7b55,0xdc));const a921_0x1fc7=function(_0x459183,_0x7b554c){_0x459183=_0x459183-0x0;let _0x1fc7eb=a921_0x7b55[_0x459183];return _0x1fc7eb;};const _0xc3c87d=a921_0x1fc7;'use strict';const logger=require(_0xc3c87d('0xa'))(_0xc3c87d('0x1b')),util=require(_0xc3c87d('0x19')),path=require('path'),config=require('../config/environment'),{Op}=require('sequelize'),Sequence=function(){};Sequence[_0xc3c87d('0x26')]['enqueue']=function(_0x1d03e6){const _0x50a685=_0xc3c87d;this['tail']=this[_0x50a685('0x1c')]?this[_0x50a685('0x1c')][_0x50a685('0x14')](_0x1d03e6):_0x1d03e6();};const Migration=function(_0x77141b){this['queryInterface']=_0x77141b,this['sequence']=new Sequence();};Migration[_0xc3c87d('0x26')][_0xc3c87d('0xb')]=function(_0x515605,_0x5a4d83,_0x5c4d25){const _0x1d419a=_0xc3c87d,_0x2ee5b6=this;this[_0x1d419a('0x21')][_0x1d419a('0x1a')](function(){const _0x3628e3=_0x1d419a;return _0x2ee5b6[_0x3628e3('0xe')][_0x3628e3('0xb')](_0x515605,_0x5a4d83,_0x5c4d25)[_0x3628e3('0x29')](function(){logger['info']('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x5a4d83,_0x515605);})[_0x3628e3('0x1e')](function(_0x3faf16){const _0x577b20=_0x3628e3;logger[_0x577b20('0x4')](JSON['stringify'](_0x3faf16));});});},Migration[_0xc3c87d('0x26')][_0xc3c87d('0x12')]=function(_0x4c3aa0,_0x419306,_0x18efb0){const _0x16e4be=_0xc3c87d,_0x55cb4a=this;this[_0x16e4be('0x21')][_0x16e4be('0x1a')](function(){const _0xc69f64=_0x16e4be;return _0x55cb4a[_0xc69f64('0xe')][_0xc69f64('0x12')](_0x4c3aa0,_0x419306,_0x18efb0)[_0xc69f64('0x29')](function(){const _0x159ff6=_0xc69f64;logger[_0x159ff6('0x4')](_0x159ff6('0x6'),_0x419306,_0x4c3aa0);})[_0xc69f64('0x1e')](function(_0x46142f){const _0x4b2e36=_0xc69f64;logger['info'](JSON[_0x4b2e36('0x20')](_0x46142f));});});},Migration[_0xc3c87d('0x26')][_0xc3c87d('0x23')]=function(_0x126b63){const _0x5397c3=_0xc3c87d,_0xe1d5ff=this;this['sequence'][_0x5397c3('0x1a')](function(){const _0x1bc638=_0x5397c3;return _0xe1d5ff[_0x1bc638('0xe')]['dropTable'](_0x126b63,{'force':!![]})['then'](function(){const _0x47bfeb=_0x1bc638;logger[_0x47bfeb('0x4')](_0x47bfeb('0x5'),_0x126b63);})[_0x1bc638('0x1e')](function(_0xb585ed){const _0x218322=_0x1bc638;logger[_0x218322('0x4')](JSON[_0x218322('0x20')](_0xb585ed));});});},Migration['prototype'][_0xc3c87d('0x1d')]=function(_0x3e0b1d,_0x272aa1,_0x2054f6){const _0x4f2b4b=_0xc3c87d,_0x2109c4=this;this[_0x4f2b4b('0x21')][_0x4f2b4b('0x1a')](function(){const _0xbc9e5a=_0x4f2b4b;return _0x2109c4[_0xbc9e5a('0xe')][_0xbc9e5a('0x1d')](_0x3e0b1d,_0x272aa1,{'indexName':_0x2054f6})[_0xbc9e5a('0x29')](function(){const _0x7dc818=_0xbc9e5a;logger[_0x7dc818('0x4')](_0x7dc818('0x18'),_0x3e0b1d,_0x272aa1['join'](','),_0x2054f6);})[_0xbc9e5a('0x1e')](function(_0x179977){const _0x1b9fbb=_0xbc9e5a;logger[_0x1b9fbb('0x4')](JSON['stringify'](_0x179977));});});},Migration['prototype']['query']=function(_0x2574d1){const _0x12b5c9=_0xc3c87d,_0x2deab0=this;this[_0x12b5c9('0x21')][_0x12b5c9('0x1a')](function(){const _0x178f33=_0x12b5c9;return _0x2deab0[_0x178f33('0xe')]['sequelize'][_0x178f33('0x17')](_0x2574d1)[_0x178f33('0x29')](function(){const _0x2000c5=_0x178f33;logger[_0x2000c5('0x4')](_0x2000c5('0x1f'),_0x2574d1);})[_0x178f33('0x1e')](function(_0x31ed2c){const _0x5b62e2=_0x178f33;logger['info'](JSON[_0x5b62e2('0x20')](_0x31ed2c));});});},Migration['prototype'][_0xc3c87d('0x25')]=function(_0xdf19bd,_0x391dec){const _0x56fee9=_0xc3c87d,_0xb71645=this;this[_0x56fee9('0x21')]['enqueue'](function(){const _0x113155=_0x56fee9;return _0xb71645[_0x113155('0xe')][_0x113155('0x25')](_0xdf19bd,_0x391dec)[_0x113155('0x29')](function(){const _0x2bb379=_0x113155;logger[_0x2bb379('0x4')](_0x2bb379('0xc'),_0x391dec,_0xdf19bd);})['catch'](function(_0x376b60){const _0xdeba13=_0x113155;logger['info'](util[_0xdeba13('0xf')](_0x376b60,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0xc3c87d('0x3')]=function(){const _0x450ed7=_0xc3c87d,_0x2755f0=this,_0x4748d9=_0x2755f0[_0x450ed7('0xe')]['sequelize'][_0x450ed7('0x0')](path['join'](config[_0x450ed7('0x8')],_0x450ed7('0x2a')));return _0x4748d9['findAll']({'where':{'type':{[Op[_0x450ed7('0x2')]]:[_0x450ed7('0x10'),_0x450ed7('0x1')]}},'attributes':['id']})[_0x450ed7('0x29')](function(_0x4d1e18){return _0x4d1e18;})[_0x450ed7('0x1e')](function(_0x8daa7b){const _0x4a4604=_0x450ed7;logger[_0x4a4604('0x4')](JSON[_0x4a4604('0x20')](_0x8daa7b));});},Migration[_0xc3c87d('0x26')][_0xc3c87d('0x7')]=function(_0x311cf8){const _0x8ff1c7=_0xc3c87d;this[_0x8ff1c7('0x21')][_0x8ff1c7('0x1a')](function(){return _0x311cf8();});},module[_0xc3c87d('0xd')]={'up':function(_0x213496,_0x59dcb6){return new Promise(function(_0x43aabe){const _0x584728=a921_0x1fc7,_0x57718c=new Migration(_0x213496);_0x57718c[_0x584728('0x12')](_0x584728('0x16'),_0x584728('0x27'),{'type':_0x59dcb6[_0x584728('0x15')],'defaultValue':'#0091EA'}),_0x57718c['addColumn']('openchannel_messages',_0x584728('0x24'),{'type':_0x59dcb6[_0x584728('0x22')],'defaultValue':![]}),_0x57718c[_0x584728('0x3')]()[_0x584728('0x29')](function(_0x42ef8d){const _0x2ea14b=_0x584728;if(_0x42ef8d)for(let _0x453fa3=0x0,_0xa9ff2d=_0x42ef8d[_0x2ea14b('0x13')];_0x453fa3<_0xa9ff2d;_0x453fa3++){_0x57718c[_0x2ea14b('0xb')]('cm_contacts','cf_'+_0x42ef8d[_0x453fa3]['id'],{'type':_0x59dcb6[_0x2ea14b('0x11')]});}}),_0x57718c[_0x584728('0x12')]('fax_messages',_0x584728('0x28'),{'type':_0x59dcb6[_0x584728('0x11')]}),_0x57718c[_0x584728('0x12')](_0x584728('0x9'),'extensionMonitor',{'type':_0x59dcb6['STRING'],'defaultValue':''}),_0x57718c[_0x584728('0x7')](_0x43aabe);});},'down':function(){}};
\ No newline at end of file
+const a921_0x445d=['openchannel_messages','tail','inspect','users','addIndex\x20%s\x20%s\x20%s','TEXT','path','color','query\x20%s','api/cmCustomField/cmCustomField.model','cm_contacts','getCustomFields','dropTable','import','length','query','final','then','exports','prototype','extensionMonitor','removeColumn','changeColumn','addIndex','queryInterface','join','../config/logger','notIn','sequelize','number','util','failMessage','cf_','enqueue','findAll','stringify','STRING','Changed\x20column\x20%s\x20in\x20table\x20%s','table\x20dropped\x20%s','info','Added\x20column\x20%s\x20to\x20%s','sequence','Removed\x20column\x20%s\x20from\x20%s','addColumn','catch','migration'];(function(_0x49da25,_0x445dde){const _0x1e2f82=function(_0x4fae8b){while(--_0x4fae8b){_0x49da25['push'](_0x49da25['shift']());}};_0x1e2f82(++_0x445dde);}(a921_0x445d,0xfb));const a921_0x1e2f=function(_0x49da25,_0x445dde){_0x49da25=_0x49da25-0x0;let _0x1e2f82=a921_0x445d[_0x49da25];return _0x1e2f82;};const _0x53ffa7=a921_0x1e2f;'use strict';const logger=require(_0x53ffa7('0x5'))(_0x53ffa7('0x18')),util=require(_0x53ffa7('0x9')),path=require(_0x53ffa7('0x1f')),config=require('../config/environment'),{Op}=require('sequelize'),Sequence=function(){};Sequence['prototype'][_0x53ffa7('0xc')]=function(_0x4fae8b){const _0x3a4c4f=_0x53ffa7;this['tail']=this[_0x3a4c4f('0x1a')]?this[_0x3a4c4f('0x1a')]['finally'](_0x4fae8b):_0x4fae8b();};const Migration=function(_0x131d4e){const _0x199ea8=_0x53ffa7;this[_0x199ea8('0x3')]=_0x131d4e,this['sequence']=new Sequence();};Migration[_0x53ffa7('0x2c')]['changeColumn']=function(_0x8dce18,_0x1c9de5,_0x4e3a12){const _0x57ed38=_0x53ffa7,_0x2853ed=this;this[_0x57ed38('0x14')]['enqueue'](function(){const _0x216a4f=_0x57ed38;return _0x2853ed['queryInterface'][_0x216a4f('0x1')](_0x8dce18,_0x1c9de5,_0x4e3a12)[_0x216a4f('0x2a')](function(){const _0x274892=_0x216a4f;logger[_0x274892('0x12')](_0x274892('0x10'),_0x1c9de5,_0x8dce18);})['catch'](function(_0x3e042e){const _0x3fac4e=_0x216a4f;logger['info'](JSON[_0x3fac4e('0xe')](_0x3e042e));});});},Migration[_0x53ffa7('0x2c')][_0x53ffa7('0x16')]=function(_0x37064c,_0x7f7c07,_0x135f39){const _0x33d2ef=_0x53ffa7,_0x5db8cb=this;this[_0x33d2ef('0x14')][_0x33d2ef('0xc')](function(){const _0x165993=_0x33d2ef;return _0x5db8cb[_0x165993('0x3')][_0x165993('0x16')](_0x37064c,_0x7f7c07,_0x135f39)['then'](function(){const _0x2e484b=_0x165993;logger['info'](_0x2e484b('0x13'),_0x7f7c07,_0x37064c);})[_0x165993('0x17')](function(_0x38b4fb){const _0x597494=_0x165993;logger[_0x597494('0x12')](JSON['stringify'](_0x38b4fb));});});},Migration[_0x53ffa7('0x2c')][_0x53ffa7('0x25')]=function(_0x3e87dc){const _0xfd88a5=_0x53ffa7,_0x24d91c=this;this['sequence'][_0xfd88a5('0xc')](function(){const _0xcb6353=_0xfd88a5;return _0x24d91c[_0xcb6353('0x3')][_0xcb6353('0x25')](_0x3e87dc,{'force':!![]})[_0xcb6353('0x2a')](function(){const _0x1c5bbb=_0xcb6353;logger[_0x1c5bbb('0x12')](_0x1c5bbb('0x11'),_0x3e87dc);})[_0xcb6353('0x17')](function(_0x246423){const _0x114fb2=_0xcb6353;logger['info'](JSON[_0x114fb2('0xe')](_0x246423));});});},Migration[_0x53ffa7('0x2c')][_0x53ffa7('0x2')]=function(_0x2a1ab1,_0x3fd4c0,_0x420622){const _0x46520a=_0x53ffa7,_0x114d04=this;this[_0x46520a('0x14')][_0x46520a('0xc')](function(){const _0x44a4d9=_0x46520a;return _0x114d04['queryInterface'][_0x44a4d9('0x2')](_0x2a1ab1,_0x3fd4c0,{'indexName':_0x420622})['then'](function(){const _0x5ca768=_0x44a4d9;logger[_0x5ca768('0x12')](_0x5ca768('0x1d'),_0x2a1ab1,_0x3fd4c0['join'](','),_0x420622);})[_0x44a4d9('0x17')](function(_0x1426c0){const _0x2649ec=_0x44a4d9;logger[_0x2649ec('0x12')](JSON['stringify'](_0x1426c0));});});},Migration[_0x53ffa7('0x2c')][_0x53ffa7('0x28')]=function(_0x3e16a8){const _0x5728bf=_0x53ffa7,_0x2eae97=this;this[_0x5728bf('0x14')][_0x5728bf('0xc')](function(){const _0x580743=_0x5728bf;return _0x2eae97[_0x580743('0x3')][_0x580743('0x7')][_0x580743('0x28')](_0x3e16a8)['then'](function(){const _0x14716b=_0x580743;logger[_0x14716b('0x12')](_0x14716b('0x21'),_0x3e16a8);})[_0x580743('0x17')](function(_0x30623c){const _0x5a58e1=_0x580743;logger[_0x5a58e1('0x12')](JSON[_0x5a58e1('0xe')](_0x30623c));});});},Migration[_0x53ffa7('0x2c')][_0x53ffa7('0x0')]=function(_0x17341f,_0x110a2b){const _0xbac385=this;this['sequence']['enqueue'](function(){const _0x2b7358=a921_0x1e2f;return _0xbac385[_0x2b7358('0x3')][_0x2b7358('0x0')](_0x17341f,_0x110a2b)['then'](function(){const _0x3d8402=_0x2b7358;logger[_0x3d8402('0x12')](_0x3d8402('0x15'),_0x110a2b,_0x17341f);})[_0x2b7358('0x17')](function(_0x59faa0){const _0x45f911=_0x2b7358;logger[_0x45f911('0x12')](util[_0x45f911('0x1b')](_0x59faa0,{'showHidden':![],'depth':null}));});});},Migration[_0x53ffa7('0x2c')][_0x53ffa7('0x24')]=function(){const _0xe4ffb0=_0x53ffa7,_0x1bef6d=this,_0x54d8d1=_0x1bef6d[_0xe4ffb0('0x3')][_0xe4ffb0('0x7')][_0xe4ffb0('0x26')](path[_0xe4ffb0('0x4')](config['root'],_0xe4ffb0('0x22')));return _0x54d8d1[_0xe4ffb0('0xd')]({'where':{'type':{[Op[_0xe4ffb0('0x6')]]:[_0xe4ffb0('0x8'),'switch']}},'attributes':['id']})[_0xe4ffb0('0x2a')](function(_0x47079d){return _0x47079d;})[_0xe4ffb0('0x17')](function(_0x23e351){const _0x137291=_0xe4ffb0;logger[_0x137291('0x12')](JSON[_0x137291('0xe')](_0x23e351));});},Migration[_0x53ffa7('0x2c')][_0x53ffa7('0x29')]=function(_0x4098b7){const _0x5d0d4d=_0x53ffa7;this[_0x5d0d4d('0x14')][_0x5d0d4d('0xc')](function(){return _0x4098b7();});},module[_0x53ffa7('0x2b')]={'up':function(_0x45951e,_0x4c43cd){return new Promise(function(_0x441e7c){const _0xc0f392=a921_0x1e2f,_0x364d26=new Migration(_0x45951e);_0x364d26[_0xc0f392('0x16')]('tools_tags',_0xc0f392('0x20'),{'type':_0x4c43cd[_0xc0f392('0xf')],'defaultValue':'#0091EA'}),_0x364d26[_0xc0f392('0x16')](_0xc0f392('0x19'),'secret',{'type':_0x4c43cd['BOOLEAN'],'defaultValue':![]}),_0x364d26[_0xc0f392('0x24')]()[_0xc0f392('0x2a')](function(_0x2a138a){const _0x2367dc=_0xc0f392;if(_0x2a138a)for(let _0x82b2d6=0x0,_0x1526c3=_0x2a138a[_0x2367dc('0x27')];_0x82b2d6<_0x1526c3;_0x82b2d6++){_0x364d26[_0x2367dc('0x1')](_0x2367dc('0x23'),_0x2367dc('0xb')+_0x2a138a[_0x82b2d6]['id'],{'type':_0x4c43cd['TEXT']});}}),_0x364d26[_0xc0f392('0x16')]('fax_messages',_0xc0f392('0xa'),{'type':_0x4c43cd[_0xc0f392('0x1e')]}),_0x364d26[_0xc0f392('0x16')](_0xc0f392('0x1c'),_0xc0f392('0x2d'),{'type':_0x4c43cd['STRING'],'defaultValue':''}),_0x364d26[_0xc0f392('0x29')](_0x441e7c);});},'down':function(){}};
\ No newline at end of file