Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.46.js
index 4b5fd6b..b328f65 100644 (file)
@@ -1 +1 @@
-const a925_0x5c6b=['changeColumn','query','catch','users','addColumn','finally','addIndex\x20%s\x20%s\x20%s','enqueue','dropTable','stringify','final','noteTitle','../config/logger','INTEGER','tail','inspect','Removed\x20column\x20%s\x20from\x20%s','prototype','chat_websites','addIndex','fax','sequelize','Changed\x20column\x20%s\x20in\x20table\x20%s','Type\x20a\x20message','queryInterface','migration','info','sequence','crudPermissions','UPDATE\x20fax_interactions\x20as\x20t1\x20JOIN\x20cm_contacts\x20AS\x20t2\x20ON\x20t1.ContactId\x20=\x20t2.id\x20SET\x20t1.fax\x20=\x20t2.fax','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)','STRING','Added\x20column\x20%s\x20to\x20%s','join','then','removeColumn','placeholderMessage','Note'];(function(_0x5b8e81,_0x5c6b8e){const _0x3a8dd1=function(_0xc05d50){while(--_0xc05d50){_0x5b8e81['push'](_0x5b8e81['shift']());}};_0x3a8dd1(++_0x5c6b8e);}(a925_0x5c6b,0xd6));const a925_0x3a8d=function(_0x5b8e81,_0x5c6b8e){_0x5b8e81=_0x5b8e81-0x0;let _0x3a8dd1=a925_0x5c6b[_0x5b8e81];return _0x3a8dd1;};const _0x33fa9f=a925_0x3a8d;'use strict';const logger=require(_0x33fa9f('0x1a'))(_0x33fa9f('0x1')),util=require('util'),Sequence=function(){};Sequence[_0x33fa9f('0x1f')][_0x33fa9f('0x15')]=function(_0xc05d50){const _0x161efa=_0x33fa9f;this['tail']=this[_0x161efa('0x1c')]?this[_0x161efa('0x1c')][_0x161efa('0x13')](_0xc05d50):_0xc05d50();};const Migration=function(_0x38aad9){const _0x3dc9d2=_0x33fa9f;this['queryInterface']=_0x38aad9,this[_0x3dc9d2('0x3')]=new Sequence();};Migration[_0x33fa9f('0x1f')][_0x33fa9f('0xe')]=function(_0x162219,_0x56c709,_0xd7b578){const _0x3e746d=_0x33fa9f,_0x4541aa=this;this[_0x3e746d('0x3')]['enqueue'](function(){const _0x497c91=_0x3e746d;return _0x4541aa[_0x497c91('0x0')][_0x497c91('0xe')](_0x162219,_0x56c709,_0xd7b578)[_0x497c91('0xa')](function(){const _0x2fef75=_0x497c91;logger[_0x2fef75('0x2')](_0x2fef75('0x24'),_0x56c709,_0x162219);})[_0x497c91('0x10')](function(_0xb7caac){const _0x3c4e5c=_0x497c91;logger['info'](JSON[_0x3c4e5c('0x17')](_0xb7caac));});});},Migration['prototype'][_0x33fa9f('0x12')]=function(_0x40e665,_0x595aaf,_0x12b57d){const _0x30599e=_0x33fa9f,_0x3cba73=this;this['sequence'][_0x30599e('0x15')](function(){const _0x30a175=_0x30599e;return _0x3cba73[_0x30a175('0x0')]['addColumn'](_0x40e665,_0x595aaf,_0x12b57d)[_0x30a175('0xa')](function(){const _0x4fe4b2=_0x30a175;logger[_0x4fe4b2('0x2')](_0x4fe4b2('0x8'),_0x595aaf,_0x40e665);})[_0x30a175('0x10')](function(_0xfa24c0){const _0x444566=_0x30a175;logger[_0x444566('0x2')](JSON[_0x444566('0x17')](_0xfa24c0));});});},Migration['prototype'][_0x33fa9f('0x16')]=function(_0x2ae276){const _0x8c293b=_0x33fa9f,_0x1a2233=this;this[_0x8c293b('0x3')][_0x8c293b('0x15')](function(){const _0x595bae=_0x8c293b;return _0x1a2233['queryInterface']['dropTable'](_0x2ae276,{'force':!![]})[_0x595bae('0xa')](function(){const _0x3da62d=_0x595bae;logger[_0x3da62d('0x2')]('table\x20dropped\x20%s',_0x2ae276);})[_0x595bae('0x10')](function(_0x30b825){const _0x2ee17e=_0x595bae;logger[_0x2ee17e('0x2')](JSON['stringify'](_0x30b825));});});},Migration[_0x33fa9f('0x1f')]['addIndex']=function(_0x1e90db,_0x101989,_0xb5860){const _0x159cae=_0x33fa9f,_0x141252=this;this[_0x159cae('0x3')][_0x159cae('0x15')](function(){const _0x4235d6=_0x159cae;return _0x141252[_0x4235d6('0x0')][_0x4235d6('0x21')](_0x1e90db,_0x101989,{'indexName':_0xb5860})[_0x4235d6('0xa')](function(){const _0x30a698=_0x4235d6;logger['info'](_0x30a698('0x14'),_0x1e90db,_0x101989[_0x30a698('0x9')](','),_0xb5860);})[_0x4235d6('0x10')](function(_0x17b9cf){const _0x225f24=_0x4235d6;logger[_0x225f24('0x2')](JSON[_0x225f24('0x17')](_0x17b9cf));});});},Migration[_0x33fa9f('0x1f')]['query']=function(_0x336c08){const _0x342887=_0x33fa9f,_0x4d9e48=this;this[_0x342887('0x3')][_0x342887('0x15')](function(){const _0x6e23f2=_0x342887;return _0x4d9e48[_0x6e23f2('0x0')][_0x6e23f2('0x23')][_0x6e23f2('0xf')](_0x336c08)['then'](function(){logger['info']('query\x20%s',_0x336c08);})[_0x6e23f2('0x10')](function(_0x5b8861){const _0x55e45d=_0x6e23f2;logger[_0x55e45d('0x2')](JSON[_0x55e45d('0x17')](_0x5b8861));});});},Migration[_0x33fa9f('0x1f')][_0x33fa9f('0xb')]=function(_0xa0b4b1,_0x4ca23e){const _0x3dbf16=_0x33fa9f,_0x160305=this;this[_0x3dbf16('0x3')][_0x3dbf16('0x15')](function(){const _0x40cf9e=_0x3dbf16;return _0x160305[_0x40cf9e('0x0')][_0x40cf9e('0xb')](_0xa0b4b1,_0x4ca23e)['then'](function(){const _0x441a08=_0x40cf9e;logger[_0x441a08('0x2')](_0x441a08('0x1e'),_0x4ca23e,_0xa0b4b1);})['catch'](function(_0x4c806d){const _0x9e9791=_0x40cf9e;logger[_0x9e9791('0x2')](util[_0x9e9791('0x1d')](_0x4c806d,{'showHidden':![],'depth':null}));});});},Migration[_0x33fa9f('0x1f')][_0x33fa9f('0x18')]=function(_0x3891b5){const _0x4ceabf=_0x33fa9f;this['sequence'][_0x4ceabf('0x15')](function(){return _0x3891b5();});},module['exports']={'up':function(_0x381b19,_0x3683b6){return new Promise(function(_0x99e0ff){const _0xb9a478=a925_0x3a8d,_0x8c0a31=new Migration(_0x381b19);_0x8c0a31['changeColumn'](_0xb9a478('0x11'),'showWebBar',{'type':_0x3683b6[_0xb9a478('0x1b')],'defaultValue':0x0}),_0x8c0a31[_0xb9a478('0xf')](_0xb9a478('0x6')),_0x8c0a31['addColumn'](_0xb9a478('0x11'),_0xb9a478('0x4'),{'type':_0x3683b6[_0xb9a478('0x1b')],'defaultValue':0x0}),_0x8c0a31[_0xb9a478('0x12')](_0xb9a478('0x20'),_0xb9a478('0x19'),{'type':_0x3683b6[_0xb9a478('0x7')],'defaultValue':_0xb9a478('0xd')}),_0x8c0a31['addColumn'](_0xb9a478('0x20'),_0xb9a478('0xc'),{'type':_0x3683b6['STRING'],'defaultValue':_0xb9a478('0x25')}),_0x8c0a31[_0xb9a478('0x12')]('fax_interactions',_0xb9a478('0x22'),{'type':_0x3683b6['STRING']}),_0x8c0a31[_0xb9a478('0xf')](_0xb9a478('0x5')),_0x8c0a31[_0xb9a478('0x18')](_0x99e0ff);});},'down':function(){}};
\ No newline at end of file
+const a925_0x5191=['STRING','INTEGER','query','final','enqueue','finally','fax','addIndex','query\x20%s','queryInterface','sequelize','chat_websites','crudPermissions','addIndex\x20%s\x20%s\x20%s','showWebBar','Added\x20column\x20%s\x20to\x20%s','Note','removeColumn','../config/logger','changeColumn','users','then','sequence','util','dropTable','inspect','catch','stringify','prototype','tail','addColumn','Removed\x20column\x20%s\x20from\x20%s','placeholderMessage','fax_interactions','info','noteTitle'];(function(_0x515b64,_0x51919c){const _0x3392de=function(_0x180ef2){while(--_0x180ef2){_0x515b64['push'](_0x515b64['shift']());}};_0x3392de(++_0x51919c);}(a925_0x5191,0x1ed));const a925_0x3392=function(_0x515b64,_0x51919c){_0x515b64=_0x515b64-0x0;let _0x3392de=a925_0x5191[_0x515b64];return _0x3392de;};const _0x28c11a=a925_0x3392;'use strict';const logger=require(_0x28c11a('0x1d'))('migration'),util=require(_0x28c11a('0x22')),Sequence=function(){};Sequence[_0x28c11a('0x3')]['enqueue']=function(_0x180ef2){const _0x23d913=_0x28c11a;this[_0x23d913('0x4')]=this['tail']?this[_0x23d913('0x4')][_0x23d913('0x10')](_0x180ef2):_0x180ef2();};const Migration=function(_0x3c2372){const _0x71e27f=_0x28c11a;this['queryInterface']=_0x3c2372,this[_0x71e27f('0x21')]=new Sequence();};Migration[_0x28c11a('0x3')][_0x28c11a('0x1e')]=function(_0x1437c7,_0x1f6370,_0x1433a7){const _0x186363=_0x28c11a,_0x1c7d2b=this;this['sequence'][_0x186363('0xf')](function(){const _0x1789cb=_0x186363;return _0x1c7d2b[_0x1789cb('0x14')][_0x1789cb('0x1e')](_0x1437c7,_0x1f6370,_0x1433a7)['then'](function(){const _0x24c6b8=_0x1789cb;logger[_0x24c6b8('0x9')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x1f6370,_0x1437c7);})[_0x1789cb('0x1')](function(_0x4108c7){const _0x25df84=_0x1789cb;logger['info'](JSON[_0x25df84('0x2')](_0x4108c7));});});},Migration[_0x28c11a('0x3')][_0x28c11a('0x5')]=function(_0x556de7,_0x47ab72,_0x596d31){const _0x2f4561=_0x28c11a,_0x517c26=this;this[_0x2f4561('0x21')][_0x2f4561('0xf')](function(){const _0x4b8376=_0x2f4561;return _0x517c26[_0x4b8376('0x14')]['addColumn'](_0x556de7,_0x47ab72,_0x596d31)['then'](function(){const _0x34e2c5=_0x4b8376;logger['info'](_0x34e2c5('0x1a'),_0x47ab72,_0x556de7);})[_0x4b8376('0x1')](function(_0x50100d){const _0x18b2d6=_0x4b8376;logger[_0x18b2d6('0x9')](JSON[_0x18b2d6('0x2')](_0x50100d));});});},Migration[_0x28c11a('0x3')]['dropTable']=function(_0x461c83){const _0x5e6b4a=_0x28c11a,_0x24fcf9=this;this[_0x5e6b4a('0x21')][_0x5e6b4a('0xf')](function(){const _0x5cecb2=_0x5e6b4a;return _0x24fcf9[_0x5cecb2('0x14')][_0x5cecb2('0x23')](_0x461c83,{'force':!![]})[_0x5cecb2('0x20')](function(){const _0x3fb6b5=_0x5cecb2;logger[_0x3fb6b5('0x9')]('table\x20dropped\x20%s',_0x461c83);})[_0x5cecb2('0x1')](function(_0x267eb2){const _0x444f6d=_0x5cecb2;logger[_0x444f6d('0x9')](JSON[_0x444f6d('0x2')](_0x267eb2));});});},Migration[_0x28c11a('0x3')][_0x28c11a('0x12')]=function(_0x2f30fb,_0x16449,_0x365c3e){const _0x36dba9=_0x28c11a,_0x1b13d4=this;this[_0x36dba9('0x21')][_0x36dba9('0xf')](function(){const _0x19ccb8=_0x36dba9;return _0x1b13d4[_0x19ccb8('0x14')][_0x19ccb8('0x12')](_0x2f30fb,_0x16449,{'indexName':_0x365c3e})[_0x19ccb8('0x20')](function(){const _0x50509e=_0x19ccb8;logger['info'](_0x50509e('0x18'),_0x2f30fb,_0x16449['join'](','),_0x365c3e);})[_0x19ccb8('0x1')](function(_0x114b8d){const _0x55f525=_0x19ccb8;logger[_0x55f525('0x9')](JSON[_0x55f525('0x2')](_0x114b8d));});});},Migration[_0x28c11a('0x3')][_0x28c11a('0xd')]=function(_0x1f74d9){const _0x47eaea=_0x28c11a,_0x40a861=this;this[_0x47eaea('0x21')][_0x47eaea('0xf')](function(){const _0x5f0265=_0x47eaea;return _0x40a861[_0x5f0265('0x14')][_0x5f0265('0x15')]['query'](_0x1f74d9)[_0x5f0265('0x20')](function(){const _0x337039=_0x5f0265;logger[_0x337039('0x9')](_0x337039('0x13'),_0x1f74d9);})[_0x5f0265('0x1')](function(_0x4dd7d0){const _0x20cea8=_0x5f0265;logger[_0x20cea8('0x9')](JSON[_0x20cea8('0x2')](_0x4dd7d0));});});},Migration[_0x28c11a('0x3')][_0x28c11a('0x1c')]=function(_0x4e72f4,_0x22792f){const _0xdf8922=_0x28c11a,_0x1f5360=this;this[_0xdf8922('0x21')]['enqueue'](function(){const _0x180a30=_0xdf8922;return _0x1f5360[_0x180a30('0x14')][_0x180a30('0x1c')](_0x4e72f4,_0x22792f)[_0x180a30('0x20')](function(){const _0x4c3c34=_0x180a30;logger['info'](_0x4c3c34('0x6'),_0x22792f,_0x4e72f4);})['catch'](function(_0x41e227){const _0x544cce=_0x180a30;logger[_0x544cce('0x9')](util[_0x544cce('0x0')](_0x41e227,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x28c11a('0xe')]=function(_0x1590bf){const _0x511fbd=_0x28c11a;this[_0x511fbd('0x21')]['enqueue'](function(){return _0x1590bf();});},module['exports']={'up':function(_0x13bc0f,_0xa38bcb){return new Promise(function(_0x30addf){const _0x3d1c40=a925_0x3392,_0x18c0e2=new Migration(_0x13bc0f);_0x18c0e2['changeColumn']('users',_0x3d1c40('0x19'),{'type':_0xa38bcb['INTEGER'],'defaultValue':0x0}),_0x18c0e2[_0x3d1c40('0xd')]('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)'),_0x18c0e2[_0x3d1c40('0x5')](_0x3d1c40('0x1f'),_0x3d1c40('0x17'),{'type':_0xa38bcb[_0x3d1c40('0xc')],'defaultValue':0x0}),_0x18c0e2[_0x3d1c40('0x5')](_0x3d1c40('0x16'),_0x3d1c40('0xa'),{'type':_0xa38bcb['STRING'],'defaultValue':_0x3d1c40('0x1b')}),_0x18c0e2['addColumn'](_0x3d1c40('0x16'),_0x3d1c40('0x7'),{'type':_0xa38bcb[_0x3d1c40('0xb')],'defaultValue':'Type\x20a\x20message'}),_0x18c0e2[_0x3d1c40('0x5')](_0x3d1c40('0x8'),_0x3d1c40('0x11'),{'type':_0xa38bcb[_0x3d1c40('0xb')]}),_0x18c0e2[_0x3d1c40('0xd')]('UPDATE\x20fax_interactions\x20as\x20t1\x20JOIN\x20cm_contacts\x20AS\x20t2\x20ON\x20t1.ContactId\x20=\x20t2.id\x20SET\x20t1.fax\x20=\x20t2.fax'),_0x18c0e2[_0x3d1c40('0xe')](_0x30addf);});},'down':function(){}};
\ No newline at end of file