Built motion from commit 4a18b36e645f5fa4a517d36f9783bde259878164. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.46.js
index f56d7b6..dc39ab3 100644 (file)
@@ -1 +1 @@
-const a925_0x15ab=['UPDATE\x20fax_interactions\x20as\x20t1\x20JOIN\x20cm_contacts\x20AS\x20t2\x20ON\x20t1.ContactId\x20=\x20t2.id\x20SET\x20t1.fax\x20=\x20t2.fax','Added\x20column\x20%s\x20to\x20%s','Note','query','fax_interactions','finally','sequelize','prototype','dropTable','addColumn','INTEGER','sequence','users','enqueue','Type\x20a\x20message','addIndex','stringify','catch','STRING','changeColumn','../config/logger','info','removeColumn','Removed\x20column\x20%s\x20from\x20%s','table\x20dropped\x20%s','join','tail','fax','exports','then','showWebBar','queryInterface','noteTitle','chat_websites'];(function(_0x3f26aa,_0x15aba4){const _0x31c0b8=function(_0x3729a2){while(--_0x3729a2){_0x3f26aa['push'](_0x3f26aa['shift']());}};_0x31c0b8(++_0x15aba4);}(a925_0x15ab,0x6f));const a925_0x31c0=function(_0x3f26aa,_0x15aba4){_0x3f26aa=_0x3f26aa-0x0;let _0x31c0b8=a925_0x15ab[_0x3f26aa];return _0x31c0b8;};const _0x4dee16=a925_0x31c0;'use strict';const logger=require(_0x4dee16('0xb'))('migration'),util=require('util'),Sequence=function(){};Sequence[_0x4dee16('0x20')][_0x4dee16('0x4')]=function(_0x3729a2){const _0x8e443d=_0x4dee16;this[_0x8e443d('0x11')]=this[_0x8e443d('0x11')]?this['tail'][_0x8e443d('0x1e')](_0x3729a2):_0x3729a2();};const Migration=function(_0x158830){const _0x15af48=_0x4dee16;this[_0x15af48('0x16')]=_0x158830,this[_0x15af48('0x2')]=new Sequence();};Migration[_0x4dee16('0x20')][_0x4dee16('0xa')]=function(_0x2e1cdf,_0x1a83db,_0x10a1ae){const _0x3e8e5e=_0x4dee16,_0x332841=this;this['sequence'][_0x3e8e5e('0x4')](function(){const _0x1336c9=_0x3e8e5e;return _0x332841[_0x1336c9('0x16')]['changeColumn'](_0x2e1cdf,_0x1a83db,_0x10a1ae)[_0x1336c9('0x14')](function(){const _0xddc243=_0x1336c9;logger[_0xddc243('0xc')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x1a83db,_0x2e1cdf);})[_0x1336c9('0x8')](function(_0x19b560){const _0x21e78d=_0x1336c9;logger[_0x21e78d('0xc')](JSON['stringify'](_0x19b560));});});},Migration['prototype'][_0x4dee16('0x0')]=function(_0x565c36,_0x226206,_0x36a975){const _0x514b43=_0x4dee16,_0x3a9c5e=this;this[_0x514b43('0x2')][_0x514b43('0x4')](function(){const _0x263224=_0x514b43;return _0x3a9c5e[_0x263224('0x16')][_0x263224('0x0')](_0x565c36,_0x226206,_0x36a975)[_0x263224('0x14')](function(){const _0x21f3f8=_0x263224;logger[_0x21f3f8('0xc')](_0x21f3f8('0x1a'),_0x226206,_0x565c36);})[_0x263224('0x8')](function(_0x2c7763){const _0x68915a=_0x263224;logger[_0x68915a('0xc')](JSON[_0x68915a('0x7')](_0x2c7763));});});},Migration[_0x4dee16('0x20')][_0x4dee16('0x21')]=function(_0x339857){const _0x5824cf=_0x4dee16,_0x5d8bdb=this;this[_0x5824cf('0x2')][_0x5824cf('0x4')](function(){const _0x7c19ff=_0x5824cf;return _0x5d8bdb['queryInterface'][_0x7c19ff('0x21')](_0x339857,{'force':!![]})['then'](function(){const _0xb0b50d=_0x7c19ff;logger[_0xb0b50d('0xc')](_0xb0b50d('0xf'),_0x339857);})[_0x7c19ff('0x8')](function(_0x205fd8){const _0x45ed08=_0x7c19ff;logger['info'](JSON[_0x45ed08('0x7')](_0x205fd8));});});},Migration['prototype'][_0x4dee16('0x6')]=function(_0x20671f,_0x3e5dc2,_0x1a1ca4){const _0x1b3a67=_0x4dee16,_0x2c9b89=this;this[_0x1b3a67('0x2')][_0x1b3a67('0x4')](function(){const _0x57605e=_0x1b3a67;return _0x2c9b89[_0x57605e('0x16')][_0x57605e('0x6')](_0x20671f,_0x3e5dc2,{'indexName':_0x1a1ca4})[_0x57605e('0x14')](function(){const _0x17248b=_0x57605e;logger[_0x17248b('0xc')]('addIndex\x20%s\x20%s\x20%s',_0x20671f,_0x3e5dc2[_0x17248b('0x10')](','),_0x1a1ca4);})[_0x57605e('0x8')](function(_0x15e109){const _0x253e40=_0x57605e;logger[_0x253e40('0xc')](JSON[_0x253e40('0x7')](_0x15e109));});});},Migration[_0x4dee16('0x20')][_0x4dee16('0x1c')]=function(_0x4717bb){const _0x3c54e6=this;this['sequence']['enqueue'](function(){const _0x5ca706=a925_0x31c0;return _0x3c54e6['queryInterface'][_0x5ca706('0x1f')][_0x5ca706('0x1c')](_0x4717bb)[_0x5ca706('0x14')](function(){const _0x928d58=_0x5ca706;logger[_0x928d58('0xc')]('query\x20%s',_0x4717bb);})[_0x5ca706('0x8')](function(_0x4480ca){const _0xd081c1=_0x5ca706;logger[_0xd081c1('0xc')](JSON[_0xd081c1('0x7')](_0x4480ca));});});},Migration[_0x4dee16('0x20')][_0x4dee16('0xd')]=function(_0x37a593,_0x520c65){const _0x3f435d=_0x4dee16,_0x52ac92=this;this[_0x3f435d('0x2')][_0x3f435d('0x4')](function(){const _0x34abe8=_0x3f435d;return _0x52ac92[_0x34abe8('0x16')]['removeColumn'](_0x37a593,_0x520c65)[_0x34abe8('0x14')](function(){const _0x3af8c3=_0x34abe8;logger[_0x3af8c3('0xc')](_0x3af8c3('0xe'),_0x520c65,_0x37a593);})[_0x34abe8('0x8')](function(_0x32fa85){logger['info'](util['inspect'](_0x32fa85,{'showHidden':![],'depth':null}));});});},Migration[_0x4dee16('0x20')]['final']=function(_0x3903ae){const _0x1db8eb=_0x4dee16;this[_0x1db8eb('0x2')]['enqueue'](function(){return _0x3903ae();});},module[_0x4dee16('0x13')]={'up':function(_0x41a5b8,_0x27c20c){return new Promise(function(_0x5b91c0){const _0x5a27ae=a925_0x31c0,_0x68ba0=new Migration(_0x41a5b8);_0x68ba0[_0x5a27ae('0xa')](_0x5a27ae('0x3'),_0x5a27ae('0x15'),{'type':_0x27c20c[_0x5a27ae('0x1')],'defaultValue':0x0}),_0x68ba0[_0x5a27ae('0x1c')]('UPDATE\x20users\x20SET\x20permissions=\x27101,102,103,104,105,106,107,108,109,100\x27\x20WHERE\x20role=\x27agent\x27\x20AND\x20(permissions\x20IS\x20NULL\x20OR\x20permissions\x20=\x20\x27\x27)'),_0x68ba0[_0x5a27ae('0x0')](_0x5a27ae('0x3'),'crudPermissions',{'type':_0x27c20c[_0x5a27ae('0x1')],'defaultValue':0x0}),_0x68ba0[_0x5a27ae('0x0')](_0x5a27ae('0x18'),_0x5a27ae('0x17'),{'type':_0x27c20c[_0x5a27ae('0x9')],'defaultValue':_0x5a27ae('0x1b')}),_0x68ba0[_0x5a27ae('0x0')](_0x5a27ae('0x18'),'placeholderMessage',{'type':_0x27c20c[_0x5a27ae('0x9')],'defaultValue':_0x5a27ae('0x5')}),_0x68ba0['addColumn'](_0x5a27ae('0x1d'),_0x5a27ae('0x12'),{'type':_0x27c20c[_0x5a27ae('0x9')]}),_0x68ba0['query'](_0x5a27ae('0x19')),_0x68ba0['final'](_0x5b91c0);});},'down':function(){}};
\ No newline at end of file
+const a924_0x5afd=['exports','noteTitle','join','migration','STRING','dropTable','then','../config/logger','util','addIndex','enqueue','stringify','table\x20dropped\x20%s','queryInterface','query\x20%s','placeholderMessage','fax_interactions','info','showWebBar','sequelize','query','UPDATE\x20users\x20SET\x20permissions=\x27101,102,103,104,105,106,107,108,109,100\x27\x20WHERE\x20role=\x27agent\x27\x20AND\x20(permissions\x20IS\x20NULL\x20OR\x20permissions\x20=\x20\x27\x27)','users','sequence','final','removeColumn','chat_websites','fax','catch','INTEGER','changeColumn','finally','prototype','tail','inspect','Added\x20column\x20%s\x20to\x20%s','Type\x20a\x20message','addColumn'];(function(_0x514e12,_0x5afd34){const _0x7ec6da=function(_0x2f80df){while(--_0x2f80df){_0x514e12['push'](_0x514e12['shift']());}};_0x7ec6da(++_0x5afd34);}(a924_0x5afd,0x198));const a924_0x7ec6=function(_0x514e12,_0x5afd34){_0x514e12=_0x514e12-0x0;let _0x7ec6da=a924_0x5afd[_0x514e12];return _0x7ec6da;};const _0x47f646=a924_0x7ec6;'use strict';const logger=require(_0x47f646('0x11'))(_0x47f646('0xd')),util=require(_0x47f646('0x12')),Sequence=function(){};Sequence['prototype'][_0x47f646('0x14')]=function(_0x2f80df){const _0x5e1c0f=_0x47f646;this[_0x5e1c0f('0x5')]=this[_0x5e1c0f('0x5')]?this[_0x5e1c0f('0x5')][_0x5e1c0f('0x3')](_0x2f80df):_0x2f80df();};const Migration=function(_0x1b6c89){const _0x38b73d=_0x47f646;this[_0x38b73d('0x17')]=_0x1b6c89,this[_0x38b73d('0x21')]=new Sequence();};Migration[_0x47f646('0x4')]['changeColumn']=function(_0x1c1c5b,_0x358ba8,_0x1172c1){const _0x1b7b11=_0x47f646,_0x312c53=this;this[_0x1b7b11('0x21')][_0x1b7b11('0x14')](function(){const _0x3ec5f4=_0x1b7b11;return _0x312c53['queryInterface'][_0x3ec5f4('0x2')](_0x1c1c5b,_0x358ba8,_0x1172c1)[_0x3ec5f4('0x10')](function(){const _0x2da9ec=_0x3ec5f4;logger[_0x2da9ec('0x1b')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x358ba8,_0x1c1c5b);})[_0x3ec5f4('0x0')](function(_0x4416bc){const _0xe1bd63=_0x3ec5f4;logger[_0xe1bd63('0x1b')](JSON[_0xe1bd63('0x15')](_0x4416bc));});});},Migration[_0x47f646('0x4')][_0x47f646('0x9')]=function(_0xdc645e,_0x2c7c3d,_0x4126a4){const _0x51fa05=_0x47f646,_0x3789ab=this;this[_0x51fa05('0x21')][_0x51fa05('0x14')](function(){const _0x2348b1=_0x51fa05;return _0x3789ab[_0x2348b1('0x17')][_0x2348b1('0x9')](_0xdc645e,_0x2c7c3d,_0x4126a4)[_0x2348b1('0x10')](function(){const _0x5cbd75=_0x2348b1;logger[_0x5cbd75('0x1b')](_0x5cbd75('0x7'),_0x2c7c3d,_0xdc645e);})[_0x2348b1('0x0')](function(_0x21832c){const _0x401c3b=_0x2348b1;logger[_0x401c3b('0x1b')](JSON[_0x401c3b('0x15')](_0x21832c));});});},Migration[_0x47f646('0x4')]['dropTable']=function(_0x258062){const _0x2bd1c7=_0x47f646,_0x538bc8=this;this[_0x2bd1c7('0x21')][_0x2bd1c7('0x14')](function(){const _0x1c38a0=_0x2bd1c7;return _0x538bc8[_0x1c38a0('0x17')][_0x1c38a0('0xf')](_0x258062,{'force':!![]})[_0x1c38a0('0x10')](function(){const _0x3a3507=_0x1c38a0;logger[_0x3a3507('0x1b')](_0x3a3507('0x16'),_0x258062);})[_0x1c38a0('0x0')](function(_0x24dc53){const _0x5b2827=_0x1c38a0;logger[_0x5b2827('0x1b')](JSON[_0x5b2827('0x15')](_0x24dc53));});});},Migration[_0x47f646('0x4')][_0x47f646('0x13')]=function(_0x4b2ee2,_0x466e44,_0x33f459){const _0x4e7c8f=_0x47f646,_0x3cd42b=this;this['sequence'][_0x4e7c8f('0x14')](function(){const _0x19d512=_0x4e7c8f;return _0x3cd42b['queryInterface'][_0x19d512('0x13')](_0x4b2ee2,_0x466e44,{'indexName':_0x33f459})[_0x19d512('0x10')](function(){const _0xbf862c=_0x19d512;logger[_0xbf862c('0x1b')]('addIndex\x20%s\x20%s\x20%s',_0x4b2ee2,_0x466e44[_0xbf862c('0xc')](','),_0x33f459);})[_0x19d512('0x0')](function(_0x4aa416){const _0x44b664=_0x19d512;logger['info'](JSON[_0x44b664('0x15')](_0x4aa416));});});},Migration[_0x47f646('0x4')][_0x47f646('0x1e')]=function(_0x440c55){const _0x1513cd=_0x47f646,_0x5d75ee=this;this[_0x1513cd('0x21')][_0x1513cd('0x14')](function(){const _0x5e3dac=_0x1513cd;return _0x5d75ee[_0x5e3dac('0x17')][_0x5e3dac('0x1d')][_0x5e3dac('0x1e')](_0x440c55)['then'](function(){const _0x80efae=_0x5e3dac;logger[_0x80efae('0x1b')](_0x80efae('0x18'),_0x440c55);})[_0x5e3dac('0x0')](function(_0x370ff2){const _0x3b3ae6=_0x5e3dac;logger[_0x3b3ae6('0x1b')](JSON[_0x3b3ae6('0x15')](_0x370ff2));});});},Migration[_0x47f646('0x4')][_0x47f646('0x23')]=function(_0x1accaf,_0xf7ffb6){const _0x34e56f=_0x47f646,_0x5ce085=this;this['sequence'][_0x34e56f('0x14')](function(){const _0x5a7b5f=_0x34e56f;return _0x5ce085[_0x5a7b5f('0x17')][_0x5a7b5f('0x23')](_0x1accaf,_0xf7ffb6)[_0x5a7b5f('0x10')](function(){const _0x9612fd=_0x5a7b5f;logger[_0x9612fd('0x1b')]('Removed\x20column\x20%s\x20from\x20%s',_0xf7ffb6,_0x1accaf);})[_0x5a7b5f('0x0')](function(_0x13628b){const _0x57031d=_0x5a7b5f;logger[_0x57031d('0x1b')](util[_0x57031d('0x6')](_0x13628b,{'showHidden':![],'depth':null}));});});},Migration[_0x47f646('0x4')][_0x47f646('0x22')]=function(_0x21e302){const _0x13f3b3=_0x47f646;this['sequence'][_0x13f3b3('0x14')](function(){return _0x21e302();});},module[_0x47f646('0xa')]={'up':function(_0x8fdb2b,_0x18dc48){return new Promise(function(_0x4cd943){const _0x54f230=a924_0x7ec6,_0x58d7fc=new Migration(_0x8fdb2b);_0x58d7fc[_0x54f230('0x2')](_0x54f230('0x20'),_0x54f230('0x1c'),{'type':_0x18dc48[_0x54f230('0x1')],'defaultValue':0x0}),_0x58d7fc['query'](_0x54f230('0x1f')),_0x58d7fc[_0x54f230('0x9')](_0x54f230('0x20'),'crudPermissions',{'type':_0x18dc48[_0x54f230('0x1')],'defaultValue':0x0}),_0x58d7fc[_0x54f230('0x9')](_0x54f230('0x24'),_0x54f230('0xb'),{'type':_0x18dc48[_0x54f230('0xe')],'defaultValue':'Note'}),_0x58d7fc[_0x54f230('0x9')](_0x54f230('0x24'),_0x54f230('0x19'),{'type':_0x18dc48[_0x54f230('0xe')],'defaultValue':_0x54f230('0x8')}),_0x58d7fc['addColumn'](_0x54f230('0x1a'),_0x54f230('0x25'),{'type':_0x18dc48[_0x54f230('0xe')]}),_0x58d7fc[_0x54f230('0x1e')]('UPDATE\x20fax_interactions\x20as\x20t1\x20JOIN\x20cm_contacts\x20AS\x20t2\x20ON\x20t1.ContactId\x20=\x20t2.id\x20SET\x20t1.fax\x20=\x20t2.fax'),_0x58d7fc[_0x54f230('0x22')](_0x4cd943);});},'down':function(){}};
\ No newline at end of file