Built motion from commit c49361c37b5f784889c8087ac6e0e91b7e6b561a. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.46.js
index a29b2d9..1159673 100644 (file)
@@ -1 +1 @@
-const a925_0x37d6=['util','changeColumn','Changed\x20column\x20%s\x20in\x20table\x20%s','placeholderMessage','then','stringify','chat_websites','removeColumn','fax','../config/logger','exports','sequelize','sequence','enqueue','info','Note','addIndex\x20%s\x20%s\x20%s','query','prototype','addColumn','Removed\x20column\x20%s\x20from\x20%s','tail','catch','showWebBar','migration','dropTable','queryInterface','noteTitle','finally','final','table\x20dropped\x20%s','INTEGER','fax_interactions','inspect','users','Type\x20a\x20message','join','addIndex','STRING'];(function(_0x460e82,_0x37d6a1){const _0x48f7cc=function(_0xd59e28){while(--_0xd59e28){_0x460e82['push'](_0x460e82['shift']());}};_0x48f7cc(++_0x37d6a1);}(a925_0x37d6,0x1e8));const a925_0x48f7=function(_0x460e82,_0x37d6a1){_0x460e82=_0x460e82-0x0;let _0x48f7cc=a925_0x37d6[_0x460e82];return _0x48f7cc;};const _0x27b8d0=a925_0x48f7;'use strict';const logger=require(_0x27b8d0('0x1c'))(_0x27b8d0('0x4')),util=require(_0x27b8d0('0x13')),Sequence=function(){};Sequence['prototype'][_0x27b8d0('0x20')]=function(_0xd59e28){const _0x3dc14b=_0x27b8d0;this[_0x3dc14b('0x1')]=this['tail']?this['tail'][_0x3dc14b('0x8')](_0xd59e28):_0xd59e28();};const Migration=function(_0x291db3){const _0x19b5cb=_0x27b8d0;this[_0x19b5cb('0x6')]=_0x291db3,this[_0x19b5cb('0x1f')]=new Sequence();};Migration['prototype'][_0x27b8d0('0x14')]=function(_0x19f328,_0x9211d9,_0x43c685){const _0x567815=_0x27b8d0,_0xb7e3c7=this;this[_0x567815('0x1f')]['enqueue'](function(){const _0x53d07d=_0x567815;return _0xb7e3c7[_0x53d07d('0x6')][_0x53d07d('0x14')](_0x19f328,_0x9211d9,_0x43c685)['then'](function(){const _0x2f8f1a=_0x53d07d;logger[_0x2f8f1a('0x21')](_0x2f8f1a('0x15'),_0x9211d9,_0x19f328);})[_0x53d07d('0x2')](function(_0x553df0){const _0x9c2b80=_0x53d07d;logger[_0x9c2b80('0x21')](JSON[_0x9c2b80('0x18')](_0x553df0));});});},Migration['prototype']['addColumn']=function(_0x50bb43,_0x3530c7,_0x5479e6){const _0x159c47=_0x27b8d0,_0x27731e=this;this[_0x159c47('0x1f')][_0x159c47('0x20')](function(){const _0x10f160=_0x159c47;return _0x27731e[_0x10f160('0x6')][_0x10f160('0x26')](_0x50bb43,_0x3530c7,_0x5479e6)[_0x10f160('0x17')](function(){const _0x241a05=_0x10f160;logger[_0x241a05('0x21')]('Added\x20column\x20%s\x20to\x20%s',_0x3530c7,_0x50bb43);})['catch'](function(_0x30f97f){const _0x1eca1d=_0x10f160;logger['info'](JSON[_0x1eca1d('0x18')](_0x30f97f));});});},Migration[_0x27b8d0('0x25')][_0x27b8d0('0x5')]=function(_0x31395e){const _0x50521d=_0x27b8d0,_0x48f3f2=this;this[_0x50521d('0x1f')][_0x50521d('0x20')](function(){const _0x3c2496=_0x50521d;return _0x48f3f2[_0x3c2496('0x6')]['dropTable'](_0x31395e,{'force':!![]})[_0x3c2496('0x17')](function(){const _0x668b74=_0x3c2496;logger[_0x668b74('0x21')](_0x668b74('0xa'),_0x31395e);})[_0x3c2496('0x2')](function(_0x3ac8b3){const _0x499e57=_0x3c2496;logger[_0x499e57('0x21')](JSON[_0x499e57('0x18')](_0x3ac8b3));});});},Migration['prototype'][_0x27b8d0('0x11')]=function(_0x35f98d,_0x1bce14,_0x3ab6e1){const _0x5009dc=_0x27b8d0,_0x22bec2=this;this[_0x5009dc('0x1f')][_0x5009dc('0x20')](function(){const _0x53d5ea=_0x5009dc;return _0x22bec2[_0x53d5ea('0x6')][_0x53d5ea('0x11')](_0x35f98d,_0x1bce14,{'indexName':_0x3ab6e1})[_0x53d5ea('0x17')](function(){const _0x139b5b=_0x53d5ea;logger[_0x139b5b('0x21')](_0x139b5b('0x23'),_0x35f98d,_0x1bce14[_0x139b5b('0x10')](','),_0x3ab6e1);})[_0x53d5ea('0x2')](function(_0x2a53ad){const _0xa7e9a0=_0x53d5ea;logger[_0xa7e9a0('0x21')](JSON[_0xa7e9a0('0x18')](_0x2a53ad));});});},Migration[_0x27b8d0('0x25')]['query']=function(_0x2fc2b4){const _0xa551f3=this;this['sequence']['enqueue'](function(){const _0x58c645=a925_0x48f7;return _0xa551f3[_0x58c645('0x6')][_0x58c645('0x1e')][_0x58c645('0x24')](_0x2fc2b4)[_0x58c645('0x17')](function(){logger['info']('query\x20%s',_0x2fc2b4);})[_0x58c645('0x2')](function(_0x3d32ad){const _0x15af4b=_0x58c645;logger[_0x15af4b('0x21')](JSON['stringify'](_0x3d32ad));});});},Migration[_0x27b8d0('0x25')][_0x27b8d0('0x1a')]=function(_0x5b8eaa,_0x999b34){const _0x3b3678=_0x27b8d0,_0x4e263c=this;this[_0x3b3678('0x1f')][_0x3b3678('0x20')](function(){const _0x30dc97=_0x3b3678;return _0x4e263c[_0x30dc97('0x6')][_0x30dc97('0x1a')](_0x5b8eaa,_0x999b34)['then'](function(){const _0x3d8bc7=_0x30dc97;logger[_0x3d8bc7('0x21')](_0x3d8bc7('0x0'),_0x999b34,_0x5b8eaa);})['catch'](function(_0x128866){const _0x449582=_0x30dc97;logger[_0x449582('0x21')](util[_0x449582('0xd')](_0x128866,{'showHidden':![],'depth':null}));});});},Migration[_0x27b8d0('0x25')][_0x27b8d0('0x9')]=function(_0x52a403){const _0x3fda8f=_0x27b8d0;this[_0x3fda8f('0x1f')][_0x3fda8f('0x20')](function(){return _0x52a403();});},module[_0x27b8d0('0x1d')]={'up':function(_0x126161,_0x54f8e6){return new Promise(function(_0x58a1e5){const _0x3bdb5f=a925_0x48f7,_0x9d1ae0=new Migration(_0x126161);_0x9d1ae0[_0x3bdb5f('0x14')](_0x3bdb5f('0xe'),_0x3bdb5f('0x3'),{'type':_0x54f8e6['INTEGER'],'defaultValue':0x0}),_0x9d1ae0[_0x3bdb5f('0x24')]('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)'),_0x9d1ae0['addColumn'](_0x3bdb5f('0xe'),'crudPermissions',{'type':_0x54f8e6[_0x3bdb5f('0xb')],'defaultValue':0x0}),_0x9d1ae0[_0x3bdb5f('0x26')]('chat_websites',_0x3bdb5f('0x7'),{'type':_0x54f8e6[_0x3bdb5f('0x12')],'defaultValue':_0x3bdb5f('0x22')}),_0x9d1ae0[_0x3bdb5f('0x26')](_0x3bdb5f('0x19'),_0x3bdb5f('0x16'),{'type':_0x54f8e6['STRING'],'defaultValue':_0x3bdb5f('0xf')}),_0x9d1ae0[_0x3bdb5f('0x26')](_0x3bdb5f('0xc'),_0x3bdb5f('0x1b'),{'type':_0x54f8e6[_0x3bdb5f('0x12')]}),_0x9d1ae0[_0x3bdb5f('0x24')]('UPDATE\x20fax_interactions\x20as\x20t1\x20JOIN\x20cm_contacts\x20AS\x20t2\x20ON\x20t1.ContactId\x20=\x20t2.id\x20SET\x20t1.fax\x20=\x20t2.fax'),_0x9d1ae0[_0x3bdb5f('0x9')](_0x58a1e5);});},'down':function(){}};
\ No newline at end of file
+const a925_0x1c76=['removeColumn','STRING','tail','Note','noteTitle','util','fax','then','info','prototype','query\x20%s','users','../config/logger','Added\x20column\x20%s\x20to\x20%s','migration','inspect','addIndex','table\x20dropped\x20%s','showWebBar','Removed\x20column\x20%s\x20from\x20%s','Changed\x20column\x20%s\x20in\x20table\x20%s','INTEGER','sequelize','chat_websites','UPDATE\x20fax_interactions\x20as\x20t1\x20JOIN\x20cm_contacts\x20AS\x20t2\x20ON\x20t1.ContactId\x20=\x20t2.id\x20SET\x20t1.fax\x20=\x20t2.fax','sequence','dropTable','addColumn','catch','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)','exports','changeColumn','placeholderMessage','addIndex\x20%s\x20%s\x20%s','crudPermissions','queryInterface','stringify','Type\x20a\x20message','enqueue','finally','final','query'];(function(_0x5526fd,_0x1c7636){const _0xe956a8=function(_0x3b9d02){while(--_0x3b9d02){_0x5526fd['push'](_0x5526fd['shift']());}};_0xe956a8(++_0x1c7636);}(a925_0x1c76,0xc5));const a925_0xe956=function(_0x5526fd,_0x1c7636){_0x5526fd=_0x5526fd-0x0;let _0xe956a8=a925_0x1c76[_0x5526fd];return _0xe956a8;};const _0x457cf7=a925_0xe956;'use strict';const logger=require(_0x457cf7('0x19'))(_0x457cf7('0x1b')),util=require(_0x457cf7('0x12')),Sequence=function(){};Sequence[_0x457cf7('0x16')]['enqueue']=function(_0x3b9d02){const _0x14f976=_0x457cf7;this['tail']=this['tail']?this[_0x14f976('0xf')][_0x14f976('0xa')](_0x3b9d02):_0x3b9d02();};const Migration=function(_0x1ad9c7){const _0x4a557b=_0x457cf7;this[_0x4a557b('0x6')]=_0x1ad9c7,this[_0x4a557b('0x26')]=new Sequence();};Migration[_0x457cf7('0x16')]['changeColumn']=function(_0x5205d8,_0x71ccd9,_0x399599){const _0x50b875=this;this['sequence']['enqueue'](function(){const _0x156251=a925_0xe956;return _0x50b875[_0x156251('0x6')][_0x156251('0x2')](_0x5205d8,_0x71ccd9,_0x399599)[_0x156251('0x14')](function(){const _0x3f660a=_0x156251;logger[_0x3f660a('0x15')](_0x3f660a('0x21'),_0x71ccd9,_0x5205d8);})[_0x156251('0x29')](function(_0x449e09){const _0x32cf5e=_0x156251;logger[_0x32cf5e('0x15')](JSON[_0x32cf5e('0x7')](_0x449e09));});});},Migration[_0x457cf7('0x16')]['addColumn']=function(_0x28a9ae,_0x4b6c9f,_0x14fc12){const _0x5b5470=_0x457cf7,_0x19b24b=this;this[_0x5b5470('0x26')][_0x5b5470('0x9')](function(){const _0xf46e1e=_0x5b5470;return _0x19b24b['queryInterface']['addColumn'](_0x28a9ae,_0x4b6c9f,_0x14fc12)['then'](function(){const _0x573f76=a925_0xe956;logger['info'](_0x573f76('0x1a'),_0x4b6c9f,_0x28a9ae);})[_0xf46e1e('0x29')](function(_0x73961a){const _0x20e057=_0xf46e1e;logger['info'](JSON[_0x20e057('0x7')](_0x73961a));});});},Migration[_0x457cf7('0x16')]['dropTable']=function(_0x524abb){const _0x51e44c=_0x457cf7,_0x43c694=this;this[_0x51e44c('0x26')][_0x51e44c('0x9')](function(){const _0x7c5356=_0x51e44c;return _0x43c694[_0x7c5356('0x6')][_0x7c5356('0x27')](_0x524abb,{'force':!![]})[_0x7c5356('0x14')](function(){const _0x215ca3=_0x7c5356;logger[_0x215ca3('0x15')](_0x215ca3('0x1e'),_0x524abb);})['catch'](function(_0x5d5be4){const _0x202534=_0x7c5356;logger['info'](JSON[_0x202534('0x7')](_0x5d5be4));});});},Migration['prototype'][_0x457cf7('0x1d')]=function(_0x34d0ef,_0x15d0f2,_0xdf4445){const _0x30f5a6=_0x457cf7,_0x503a98=this;this[_0x30f5a6('0x26')][_0x30f5a6('0x9')](function(){const _0x5e82d8=_0x30f5a6;return _0x503a98[_0x5e82d8('0x6')][_0x5e82d8('0x1d')](_0x34d0ef,_0x15d0f2,{'indexName':_0xdf4445})[_0x5e82d8('0x14')](function(){const _0x5a1dcf=_0x5e82d8;logger[_0x5a1dcf('0x15')](_0x5a1dcf('0x4'),_0x34d0ef,_0x15d0f2['join'](','),_0xdf4445);})[_0x5e82d8('0x29')](function(_0xaca411){const _0x48660b=_0x5e82d8;logger[_0x48660b('0x15')](JSON[_0x48660b('0x7')](_0xaca411));});});},Migration[_0x457cf7('0x16')]['query']=function(_0x29116c){const _0x40029d=_0x457cf7,_0x31056a=this;this[_0x40029d('0x26')][_0x40029d('0x9')](function(){const _0x2168a6=_0x40029d;return _0x31056a[_0x2168a6('0x6')][_0x2168a6('0x23')][_0x2168a6('0xc')](_0x29116c)[_0x2168a6('0x14')](function(){const _0x47e86c=_0x2168a6;logger[_0x47e86c('0x15')](_0x47e86c('0x17'),_0x29116c);})[_0x2168a6('0x29')](function(_0x4c4052){const _0x1009cf=_0x2168a6;logger['info'](JSON[_0x1009cf('0x7')](_0x4c4052));});});},Migration['prototype']['removeColumn']=function(_0x44d583,_0x3673b5){const _0x4918ba=_0x457cf7,_0x385de3=this;this['sequence'][_0x4918ba('0x9')](function(){const _0x41430c=_0x4918ba;return _0x385de3[_0x41430c('0x6')][_0x41430c('0xd')](_0x44d583,_0x3673b5)[_0x41430c('0x14')](function(){const _0x8315c6=_0x41430c;logger[_0x8315c6('0x15')](_0x8315c6('0x20'),_0x3673b5,_0x44d583);})[_0x41430c('0x29')](function(_0x36bd95){const _0x26e6eb=_0x41430c;logger['info'](util[_0x26e6eb('0x1c')](_0x36bd95,{'showHidden':![],'depth':null}));});});},Migration[_0x457cf7('0x16')][_0x457cf7('0xb')]=function(_0x467c1d){const _0x10e426=_0x457cf7;this[_0x10e426('0x26')]['enqueue'](function(){return _0x467c1d();});},module[_0x457cf7('0x1')]={'up':function(_0xdfef5a,_0x17d64e){return new Promise(function(_0x4e2c66){const _0x12c042=a925_0xe956,_0x4f5285=new Migration(_0xdfef5a);_0x4f5285[_0x12c042('0x2')]('users',_0x12c042('0x1f'),{'type':_0x17d64e[_0x12c042('0x22')],'defaultValue':0x0}),_0x4f5285[_0x12c042('0xc')](_0x12c042('0x0')),_0x4f5285[_0x12c042('0x28')](_0x12c042('0x18'),_0x12c042('0x5'),{'type':_0x17d64e[_0x12c042('0x22')],'defaultValue':0x0}),_0x4f5285[_0x12c042('0x28')](_0x12c042('0x24'),_0x12c042('0x11'),{'type':_0x17d64e[_0x12c042('0xe')],'defaultValue':_0x12c042('0x10')}),_0x4f5285[_0x12c042('0x28')]('chat_websites',_0x12c042('0x3'),{'type':_0x17d64e[_0x12c042('0xe')],'defaultValue':_0x12c042('0x8')}),_0x4f5285[_0x12c042('0x28')]('fax_interactions',_0x12c042('0x13'),{'type':_0x17d64e['STRING']}),_0x4f5285['query'](_0x12c042('0x25')),_0x4f5285[_0x12c042('0xb')](_0x4e2c66);});},'down':function(){}};
\ No newline at end of file