Built motion from commit bfc7a72f7045b27461c9a5d1f71c1a658cfd0b8b. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.71.js
1 const a950_0x16dd=['dropTable','Added\x20column\x20%s\x20to\x20%s','query','BOOLEAN','addIndex','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','query\x20%s','chatTimeout','INTEGER','chat_websites','sequelize','renameColumn','util','systemAvatar','catch','addColumn','prototype','agentTransfer','stringify','sequence','final','phoneBarRememberMeEnabled','queueTransferTimeout','finally','agentTransferTimeout','changeColumn','tail','inspect','TEXT','license','Removed\x20column\x20%s\x20from\x20%s','openchannel_accounts','Changed\x20column\x20%s\x20in\x20table\x20%s','data7','enableCustomerCheckmarks','STRING','queryInterface','tools_actions','sms_accounts','enqueue','settings','removeIndex\x20%s\x20%s','systemAlias','info','exports','join','then','fax_accounts','table\x20dropped\x20%s','queueTransfer','addIndex\x20%s\x20%s\x20%s'];(function(_0x576d2f,_0x16dd12){const _0x58e103=function(_0x593320){while(--_0x593320){_0x576d2f['push'](_0x576d2f['shift']());}};_0x58e103(++_0x16dd12);}(a950_0x16dd,0x10f));const a950_0x58e1=function(_0x576d2f,_0x16dd12){_0x576d2f=_0x576d2f-0x0;let _0x58e103=a950_0x16dd[_0x576d2f];return _0x58e103;};const _0x3ef18d=a950_0x58e1;'use strict';const util=require(_0x3ef18d('0x2f')),logger=require('../config/logger')('migration'),Sequence=function(){};Sequence[_0x3ef18d('0x0')][_0x3ef18d('0x17')]=function(_0x593320){const _0xe73767=_0x3ef18d;this[_0xe73767('0xa')]=this['tail']?this['tail'][_0xe73767('0x7')](_0x593320):_0x593320();};const Migration=function(_0x5b941a){const _0x3df15e=_0x3ef18d;this[_0x3df15e('0x14')]=_0x5b941a,this[_0x3df15e('0x3')]=new Sequence();};Migration[_0x3ef18d('0x0')][_0x3ef18d('0x9')]=function(_0x375b3b,_0x331bb5,_0x533c5f){const _0x42405a=_0x3ef18d,_0x4f8bf7=this;this[_0x42405a('0x3')][_0x42405a('0x17')](function(){const _0x17d90d=_0x42405a;return _0x4f8bf7[_0x17d90d('0x14')][_0x17d90d('0x9')](_0x375b3b,_0x331bb5,_0x533c5f)[_0x17d90d('0x1e')](function(){const _0x38b93a=_0x17d90d;logger[_0x38b93a('0x1b')](_0x38b93a('0x10'),_0x331bb5,_0x375b3b);})[_0x17d90d('0x31')](function(_0x5f1db9){const _0x183644=_0x17d90d;logger['info'](JSON[_0x183644('0x2')](_0x5f1db9));});});},Migration[_0x3ef18d('0x0')][_0x3ef18d('0x32')]=function(_0x4bd3a6,_0x39fcf7,_0x3eff60){const _0x5a106f=this;this['sequence']['enqueue'](function(){const _0x1b3ffc=a950_0x58e1;return _0x5a106f[_0x1b3ffc('0x14')][_0x1b3ffc('0x32')](_0x4bd3a6,_0x39fcf7,_0x3eff60)['then'](function(){const _0x5f1934=_0x1b3ffc;logger[_0x5f1934('0x1b')](_0x5f1934('0x24'),_0x39fcf7,_0x4bd3a6);})[_0x1b3ffc('0x31')](function(_0xddec9b){const _0xde554e=_0x1b3ffc;logger[_0xde554e('0x1b')](JSON[_0xde554e('0x2')](_0xddec9b));});});},Migration[_0x3ef18d('0x0')][_0x3ef18d('0x23')]=function(_0x2c1e7c){const _0x64029d=_0x3ef18d,_0x27b670=this;this[_0x64029d('0x3')][_0x64029d('0x17')](function(){const _0x141a6b=_0x64029d;return _0x27b670[_0x141a6b('0x14')]['dropTable'](_0x2c1e7c,{'force':!![]})[_0x141a6b('0x1e')](function(){const _0x299467=_0x141a6b;logger['info'](_0x299467('0x20'),_0x2c1e7c);})[_0x141a6b('0x31')](function(_0x17f820){const _0x1d6ade=_0x141a6b;logger['info'](JSON[_0x1d6ade('0x2')](_0x17f820));});});},Migration[_0x3ef18d('0x0')][_0x3ef18d('0x27')]=function(_0x2d281a,_0x4afb34,_0x4b0ae8){const _0x22dfc4=_0x3ef18d,_0x33dc61=this;this[_0x22dfc4('0x3')][_0x22dfc4('0x17')](function(){const _0x35d56a=_0x22dfc4;return _0x33dc61[_0x35d56a('0x14')][_0x35d56a('0x27')](_0x2d281a,_0x4afb34,{'indexName':_0x4b0ae8})[_0x35d56a('0x1e')](function(){const _0x2f047a=_0x35d56a;logger[_0x2f047a('0x1b')](_0x2f047a('0x22'),_0x2d281a,_0x4afb34[_0x2f047a('0x1d')](','),_0x4b0ae8);})[_0x35d56a('0x31')](function(_0x1cd7a1){const _0x8d0d98=_0x35d56a;logger['info'](JSON[_0x8d0d98('0x2')](_0x1cd7a1));});});},Migration[_0x3ef18d('0x0')]['removeIndex']=function(_0x1cae2f,_0xc9af55){const _0x128328=_0x3ef18d,_0x378db3=this;this[_0x128328('0x3')][_0x128328('0x17')](function(){const _0x5eccb8=_0x128328;return _0x378db3[_0x5eccb8('0x14')]['removeIndex'](_0x1cae2f,_0xc9af55)['then'](function(){const _0xd47df1=_0x5eccb8;logger[_0xd47df1('0x1b')](_0xd47df1('0x19'),_0x1cae2f,_0xc9af55);})[_0x5eccb8('0x31')](function(_0x1d674f){const _0x44aaef=_0x5eccb8;logger[_0x44aaef('0x1b')](JSON[_0x44aaef('0x2')](_0x1d674f));});});},Migration[_0x3ef18d('0x0')][_0x3ef18d('0x25')]=function(_0x4da107){const _0x412596=_0x3ef18d,_0x473f52=this;this[_0x412596('0x3')][_0x412596('0x17')](function(){const _0x50acf3=_0x412596;return _0x473f52[_0x50acf3('0x14')][_0x50acf3('0x2d')]['query'](_0x4da107)[_0x50acf3('0x1e')](function(){const _0x4ee40d=_0x50acf3;logger[_0x4ee40d('0x1b')](_0x4ee40d('0x29'),_0x4da107);})[_0x50acf3('0x31')](function(_0x341358){const _0x4031a2=_0x50acf3;logger[_0x4031a2('0x1b')](JSON[_0x4031a2('0x2')](_0x341358));});});},Migration[_0x3ef18d('0x0')]['removeColumn']=function(_0x409300,_0x4563f1){const _0x3816ed=_0x3ef18d,_0x5555cf=this;this['sequence'][_0x3816ed('0x17')](function(){const _0x78fe20=_0x3816ed;return _0x5555cf[_0x78fe20('0x14')]['removeColumn'](_0x409300,_0x4563f1)[_0x78fe20('0x1e')](function(){const _0x4af8b6=_0x78fe20;logger[_0x4af8b6('0x1b')](_0x4af8b6('0xe'),_0x4563f1,_0x409300);})[_0x78fe20('0x31')](function(_0x102a96){const _0x27e5f2=_0x78fe20;logger[_0x27e5f2('0x1b')](util[_0x27e5f2('0xb')](_0x102a96,{'showHidden':![],'depth':null}));});});},Migration[_0x3ef18d('0x0')][_0x3ef18d('0x2e')]=function(_0x325c2d,_0x3f44ad,_0x122ab8){const _0x3ec845=_0x3ef18d,_0x329595=this;this[_0x3ec845('0x3')][_0x3ec845('0x17')](function(){const _0x41571d=_0x3ec845;return _0x329595[_0x41571d('0x14')][_0x41571d('0x2e')](_0x325c2d,_0x3f44ad,_0x122ab8)['then'](function(){const _0x53bd9f=_0x41571d;logger[_0x53bd9f('0x1b')](_0x53bd9f('0x28'),_0x3f44ad,_0x122ab8,_0x325c2d);})[_0x41571d('0x31')](function(_0x33d369){const _0xd6a0f3=_0x41571d;logger[_0xd6a0f3('0x1b')](util['inspect'](_0x33d369,{'showHidden':![],'depth':null}));});});},Migration[_0x3ef18d('0x0')]['final']=function(_0x3b8562){const _0x52f918=_0x3ef18d;this[_0x52f918('0x3')][_0x52f918('0x17')](function(){return _0x3b8562();});},module[_0x3ef18d('0x1c')]={'up':function(_0x3f6481,_0x373007){return new Promise(function(_0x10df1b){const _0x2bfa67=a950_0x58e1,_0x1fb3e8=new Migration(_0x3f6481);_0x1fb3e8[_0x2bfa67('0x32')](_0x2bfa67('0x2c'),_0x2bfa67('0x21'),{'type':_0x373007[_0x2bfa67('0x26')],'defaultValue':![]}),_0x1fb3e8[_0x2bfa67('0x32')]('chat_websites',_0x2bfa67('0x12'),{'type':_0x373007[_0x2bfa67('0x26')],'defaultValue':![]}),_0x1fb3e8[_0x2bfa67('0x32')](_0x2bfa67('0x2c'),_0x2bfa67('0x6'),{'type':_0x373007[_0x2bfa67('0x2b')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x1fb3e8[_0x2bfa67('0x32')](_0x2bfa67('0x2c'),_0x2bfa67('0x1'),{'type':_0x373007[_0x2bfa67('0x26')],'defaultValue':![]}),_0x1fb3e8[_0x2bfa67('0x32')](_0x2bfa67('0x2c'),_0x2bfa67('0x8'),{'type':_0x373007[_0x2bfa67('0x2b')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x1fb3e8[_0x2bfa67('0x32')]('chat_websites',_0x2bfa67('0x1a'),{'type':_0x373007[_0x2bfa67('0x13')],'defaultValue':'System'}),_0x1fb3e8['addColumn']('chat_websites',_0x2bfa67('0x30'),{'type':_0x373007[_0x2bfa67('0xc')]}),_0x1fb3e8[_0x2bfa67('0x32')]('fax_accounts',_0x2bfa67('0x21'),{'type':_0x373007[_0x2bfa67('0x26')],'defaultValue':![]}),_0x1fb3e8[_0x2bfa67('0x32')](_0x2bfa67('0x1f'),_0x2bfa67('0x6'),{'type':_0x373007[_0x2bfa67('0x2b')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x1fb3e8[_0x2bfa67('0x32')](_0x2bfa67('0x1f'),'agentTransfer',{'type':_0x373007[_0x2bfa67('0x26')],'defaultValue':![]}),_0x1fb3e8[_0x2bfa67('0x32')](_0x2bfa67('0x1f'),_0x2bfa67('0x8'),{'type':_0x373007['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x1fb3e8[_0x2bfa67('0x32')](_0x2bfa67('0xf'),'queueTransfer',{'type':_0x373007[_0x2bfa67('0x26')],'defaultValue':![]}),_0x1fb3e8['addColumn'](_0x2bfa67('0xf'),_0x2bfa67('0x6'),{'type':_0x373007[_0x2bfa67('0x2b')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x1fb3e8[_0x2bfa67('0x32')]('openchannel_accounts',_0x2bfa67('0x1'),{'type':_0x373007[_0x2bfa67('0x26')],'defaultValue':![]}),_0x1fb3e8[_0x2bfa67('0x32')](_0x2bfa67('0xf'),_0x2bfa67('0x8'),{'type':_0x373007[_0x2bfa67('0x2b')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x1fb3e8['addColumn'](_0x2bfa67('0x16'),_0x2bfa67('0x21'),{'type':_0x373007['BOOLEAN'],'defaultValue':![]}),_0x1fb3e8[_0x2bfa67('0x32')]('sms_accounts',_0x2bfa67('0x6'),{'type':_0x373007[_0x2bfa67('0x2b')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x1fb3e8[_0x2bfa67('0x32')](_0x2bfa67('0x16'),_0x2bfa67('0x1'),{'type':_0x373007['BOOLEAN'],'defaultValue':![]}),_0x1fb3e8[_0x2bfa67('0x32')]('sms_accounts',_0x2bfa67('0x8'),{'type':_0x373007[_0x2bfa67('0x2b')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x1fb3e8[_0x2bfa67('0x32')](_0x2bfa67('0x18'),_0x2bfa67('0x2a'),{'type':_0x373007[_0x2bfa67('0x2b')],'defaultValue':0x1e}),_0x1fb3e8[_0x2bfa67('0x25')]('UPDATE\x20settings\x20SET\x20chatTimeout\x20=\x200;'),_0x1fb3e8[_0x2bfa67('0x32')]('settings',_0x2bfa67('0x5'),{'type':_0x373007[_0x2bfa67('0x26')],'defaultValue':!![]}),_0x1fb3e8[_0x2bfa67('0x32')](_0x2bfa67('0xd'),'chatLicenseExceeded',{'type':_0x373007[_0x2bfa67('0x2b')],'defaultValue':0x0}),_0x1fb3e8[_0x2bfa67('0x32')](_0x2bfa67('0x15'),_0x2bfa67('0x11'),{'type':_0x373007[_0x2bfa67('0xc')]}),_0x1fb3e8[_0x2bfa67('0x4')](_0x10df1b);});},'down':function(){}};