Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.59.js
index d7bf73f..799e426 100644 (file)
@@ -1 +1 @@
-const a1099_0x3041=['then','openchannel_interactions','removeColumn','DELETE\x20FROM\x20`voice_voicemail_messages`\x20WHERE\x20`mailboxuser`\x20NOT\x20IN\x20(SELECT\x20`mailbox`\x20FROM\x20`voice_voicemail`)','tail','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','addIndex\x20%s\x20%s\x20%s','openedBy','Changed\x20column\x20%s\x20in\x20table\x20%s','Removed\x20column\x20%s\x20from\x20%s','enqueue','mail_interactions','UserId','../config/logger','table\x20dropped\x20%s','fax_interactions','sms_interactions','STRING','inspect','dialPrefix','util','exports','prototype','addColumn','UNSIGNED','migration','renameColumn','query','final','changeColumn','priority','phoneBarAutoUpdaterUrl','catch','query\x20%s','scheduledat','users','dropTable','campaigns','sequence','alias','finally','Added\x20column\x20%s\x20to\x20%s','sequelize','INTEGER','stringify','NOW','cm_contacts','queryInterface','info','settings','ALTER\x20TABLE\x20`voice_voicemail_messages`\x20\x20\x20\x20\x20\x20\x20ADD\x20CONSTRAINT\x20`voice_voicemail_messages_ibfk_1`\x20\x20\x20\x20\x20\x20\x20FOREIGN\x20KEY\x20(`mailboxuser`)\x20\x20\x20\x20\x20\x20\x20REFERENCES\x20voice_voicemail(`mailbox`)\x20\x20\x20\x20\x20\x20\x20ON\x20UPDATE\x20CASCADE\x20\x20\x20\x20\x20\x20\x20ON\x20DELETE\x20CASCADE'];(function(_0x50e6fd,_0x6e0839){const _0x3041a4=function(_0x3f4e6a){while(--_0x3f4e6a){_0x50e6fd['push'](_0x50e6fd['shift']());}};_0x3041a4(++_0x6e0839);}(a1099_0x3041,0x1d3));const a1099_0x3f4e=function(_0x50e6fd,_0x6e0839){_0x50e6fd=_0x50e6fd-0x1a0;let _0x3041a4=a1099_0x3041[_0x50e6fd];return _0x3041a4;};const a1099_0x57865c=a1099_0x3f4e;'use strict';const util=require(a1099_0x57865c(0x1ac)),logger=require(a1099_0x57865c(0x1a5))(a1099_0x57865c(0x1b1)),Sequence=function(){};Sequence['prototype']['enqueue']=function(_0x22d726){const _0x493945=a1099_0x57865c;this[_0x493945(0x1cf)]=this['tail']?this[_0x493945(0x1cf)][_0x493945(0x1c0)](_0x22d726):_0x22d726();};const Migration=function(_0x48a01b){const _0x3a10cb=a1099_0x57865c;this[_0x3a10cb(0x1c7)]=_0x48a01b,this[_0x3a10cb(0x1be)]=new Sequence();};Migration[a1099_0x57865c(0x1ae)][a1099_0x57865c(0x1b5)]=function(_0x4f6035,_0x454b8a,_0x2bb67d){const _0x2c7e91=a1099_0x57865c,_0x422fe5=this;this['sequence'][_0x2c7e91(0x1a2)](function(){const _0x5a6645=_0x2c7e91;return _0x422fe5['queryInterface']['changeColumn'](_0x4f6035,_0x454b8a,_0x2bb67d)[_0x5a6645(0x1cb)](function(){const _0x4d8268=_0x5a6645;logger[_0x4d8268(0x1c8)](_0x4d8268(0x1a0),_0x454b8a,_0x4f6035);})[_0x5a6645(0x1b8)](function(_0x504739){logger['info'](JSON['stringify'](_0x504739));});});},Migration[a1099_0x57865c(0x1ae)][a1099_0x57865c(0x1af)]=function(_0x4fa7e6,_0x440c19,_0x3a2a44){const _0x40f60c=a1099_0x57865c,_0x2a8acb=this;this[_0x40f60c(0x1be)][_0x40f60c(0x1a2)](function(){const _0x27ba23=_0x40f60c;return _0x2a8acb[_0x27ba23(0x1c7)][_0x27ba23(0x1af)](_0x4fa7e6,_0x440c19,_0x3a2a44)[_0x27ba23(0x1cb)](function(){const _0x54a9d8=_0x27ba23;logger[_0x54a9d8(0x1c8)](_0x54a9d8(0x1c1),_0x440c19,_0x4fa7e6);})[_0x27ba23(0x1b8)](function(_0xa5b037){const _0x30d3f8=_0x27ba23;logger[_0x30d3f8(0x1c8)](JSON[_0x30d3f8(0x1c4)](_0xa5b037));});});},Migration[a1099_0x57865c(0x1ae)][a1099_0x57865c(0x1bc)]=function(_0x5f3355){const _0x3b6211=a1099_0x57865c,_0x58b815=this;this[_0x3b6211(0x1be)]['enqueue'](function(){const _0x4d19a3=_0x3b6211;return _0x58b815[_0x4d19a3(0x1c7)]['dropTable'](_0x5f3355,{'force':!![]})['then'](function(){const _0xe32f57=_0x4d19a3;logger[_0xe32f57(0x1c8)](_0xe32f57(0x1a6),_0x5f3355);})[_0x4d19a3(0x1b8)](function(_0x3182b5){const _0x2472bc=_0x4d19a3;logger['info'](JSON[_0x2472bc(0x1c4)](_0x3182b5));});});},Migration[a1099_0x57865c(0x1ae)]['addIndex']=function(_0x8c35ce,_0x3043ff,_0x18004c){const _0x5b50aa=this;this['sequence']['enqueue'](function(){const _0x59562f=a1099_0x3f4e;return _0x5b50aa['queryInterface']['addIndex'](_0x8c35ce,_0x3043ff,{'indexName':_0x18004c})[_0x59562f(0x1cb)](function(){const _0x510c8b=_0x59562f;logger[_0x510c8b(0x1c8)](_0x510c8b(0x1d1),_0x8c35ce,_0x3043ff['join'](','),_0x18004c);})[_0x59562f(0x1b8)](function(_0x5a91bc){const _0x112ae2=_0x59562f;logger[_0x112ae2(0x1c8)](JSON[_0x112ae2(0x1c4)](_0x5a91bc));});});},Migration['prototype'][a1099_0x57865c(0x1b3)]=function(_0x45e857){const _0x466a82=a1099_0x57865c,_0x3e171a=this;this[_0x466a82(0x1be)]['enqueue'](function(){const _0x5970a7=_0x466a82;return _0x3e171a['queryInterface'][_0x5970a7(0x1c2)][_0x5970a7(0x1b3)](_0x45e857)[_0x5970a7(0x1cb)](function(){const _0x58ea98=_0x5970a7;logger[_0x58ea98(0x1c8)](_0x58ea98(0x1b9),_0x45e857);})[_0x5970a7(0x1b8)](function(_0x3b5bd6){const _0x2dc2ce=_0x5970a7;logger['info'](JSON[_0x2dc2ce(0x1c4)](_0x3b5bd6));});});},Migration[a1099_0x57865c(0x1ae)][a1099_0x57865c(0x1cd)]=function(_0x384f11,_0x52fd40){const _0x5eeda8=this;this['sequence']['enqueue'](function(){const _0x5c6aba=a1099_0x3f4e;return _0x5eeda8[_0x5c6aba(0x1c7)]['removeColumn'](_0x384f11,_0x52fd40)[_0x5c6aba(0x1cb)](function(){const _0x3726f0=_0x5c6aba;logger[_0x3726f0(0x1c8)](_0x3726f0(0x1a1),_0x52fd40,_0x384f11);})[_0x5c6aba(0x1b8)](function(_0x43330c){const _0x1ea87d=_0x5c6aba;logger['info'](util[_0x1ea87d(0x1aa)](_0x43330c,{'showHidden':![],'depth':null}));});});},Migration[a1099_0x57865c(0x1ae)][a1099_0x57865c(0x1b2)]=function(_0x54baa8,_0x7d0ba3,_0x41a86b){const _0x324c53=a1099_0x57865c,_0x24ce97=this;this['sequence'][_0x324c53(0x1a2)](function(){const _0x42cf69=_0x324c53;return _0x24ce97[_0x42cf69(0x1c7)][_0x42cf69(0x1b2)](_0x54baa8,_0x7d0ba3,_0x41a86b)[_0x42cf69(0x1cb)](function(){const _0x243da0=_0x42cf69;logger[_0x243da0(0x1c8)](_0x243da0(0x1d0),_0x7d0ba3,_0x41a86b,_0x54baa8);})['catch'](function(_0x261b86){const _0x2c6d6d=_0x42cf69;logger['info'](util[_0x2c6d6d(0x1aa)](_0x261b86,{'showHidden':![],'depth':null}));});});},Migration[a1099_0x57865c(0x1ae)][a1099_0x57865c(0x1b4)]=function(_0x5e62d9){const _0x39bec3=a1099_0x57865c;this[_0x39bec3(0x1be)][_0x39bec3(0x1a2)](function(){return _0x5e62d9();});},module[a1099_0x57865c(0x1ad)]={'up':function(_0x24a964,_0x4d1d05){return new Promise(function(_0x218571){const _0x2ade12=a1099_0x3f4e,_0x1bf663=new Migration(_0x24a964);_0x1bf663[_0x2ade12(0x1af)]('settings','phoneBarAutoUpdater',{'type':_0x4d1d05['BOOLEAN'],'defaultValue':!![]}),_0x1bf663[_0x2ade12(0x1af)](_0x2ade12(0x1c9),_0x2ade12(0x1b7),{'type':_0x4d1d05['STRING'],'defaultValue':'https://www.xcally.com/bar/phonebar/autoupdater.xml'}),_0x1bf663[_0x2ade12(0x1af)](_0x2ade12(0x1bd),_0x2ade12(0x1ab),{'type':_0x4d1d05[_0x2ade12(0x1a9)]}),_0x1bf663[_0x2ade12(0x1af)]('cm_lists',_0x2ade12(0x1ab),{'type':_0x4d1d05['STRING']}),_0x1bf663[_0x2ade12(0x1af)](_0x2ade12(0x1bb),_0x2ade12(0x1bf),{'type':_0x4d1d05[_0x2ade12(0x1a9)]}),_0x1bf663[_0x2ade12(0x1af)]('cm_contacts','skype',{'type':_0x4d1d05[_0x2ade12(0x1a9)]}),_0x1bf663[_0x2ade12(0x1af)](_0x2ade12(0x1c6),_0x2ade12(0x1a4),{'type':_0x4d1d05[_0x2ade12(0x1c3)]}),_0x1bf663[_0x2ade12(0x1af)](_0x2ade12(0x1c6),_0x2ade12(0x1b6),{'type':_0x4d1d05[_0x2ade12(0x1c3)](0x2)[_0x2ade12(0x1b0)],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}}),_0x1bf663[_0x2ade12(0x1af)]('cm_contacts',_0x2ade12(0x1ba),{'type':_0x4d1d05['DATE'],'defaultValue':_0x4d1d05[_0x2ade12(0x1c5)]}),_0x1bf663[_0x2ade12(0x1af)](_0x2ade12(0x1a3),_0x2ade12(0x1d2),{'type':_0x4d1d05[_0x2ade12(0x1a9)],'defaultValue':''}),_0x1bf663['addColumn']('chat_interactions',_0x2ade12(0x1d2),{'type':_0x4d1d05[_0x2ade12(0x1a9)],'defaultValue':''}),_0x1bf663[_0x2ade12(0x1af)](_0x2ade12(0x1a8),_0x2ade12(0x1d2),{'type':_0x4d1d05[_0x2ade12(0x1a9)],'defaultValue':''}),_0x1bf663['addColumn'](_0x2ade12(0x1cc),_0x2ade12(0x1d2),{'type':_0x4d1d05[_0x2ade12(0x1a9)],'defaultValue':''}),_0x1bf663['addColumn'](_0x2ade12(0x1a7),'openedBy',{'type':_0x4d1d05['STRING'],'defaultValue':''}),_0x1bf663['query'](_0x2ade12(0x1ce)),_0x1bf663[_0x2ade12(0x1b3)](_0x2ade12(0x1ca)),_0x1bf663[_0x2ade12(0x1b4)](_0x218571);});},'down':function(){}};
\ No newline at end of file
+const a1102_0x38d2=['renameColumn','tail','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','then','util','enqueue','changeColumn','queryInterface','query','inspect','skype','openedBy','catch','finally','settings','final','Removed\x20column\x20%s\x20from\x20%s','chat_interactions','addIndex','Added\x20column\x20%s\x20to\x20%s','prototype','https://www.xcally.com/bar/phonebar/autoupdater.xml','INTEGER','DATE','Changed\x20column\x20%s\x20in\x20table\x20%s','removeColumn','cm_lists','campaigns','join','BOOLEAN','cm_contacts','sequelize','dialPrefix','info','UserId','NOW','priority','STRING','addColumn','scheduledat','dropTable','alias','phoneBarAutoUpdaterUrl','DELETE\x20FROM\x20`voice_voicemail_messages`\x20WHERE\x20`mailboxuser`\x20NOT\x20IN\x20(SELECT\x20`mailbox`\x20FROM\x20`voice_voicemail`)','sequence','stringify','exports','UNSIGNED','addIndex\x20%s\x20%s\x20%s'];(function(_0x237338,_0x431667){const _0x38d24a=function(_0x4ad3dc){while(--_0x4ad3dc){_0x237338['push'](_0x237338['shift']());}};_0x38d24a(++_0x431667);}(a1102_0x38d2,0x13a));const a1102_0x4ad3=function(_0x237338,_0x431667){_0x237338=_0x237338-0x1de;let _0x38d24a=a1102_0x38d2[_0x237338];return _0x38d24a;};const a1102_0xb9a361=a1102_0x4ad3;'use strict';const util=require(a1102_0xb9a361(0x1ff)),logger=require('../config/logger')('migration'),Sequence=function(){};Sequence['prototype'][a1102_0xb9a361(0x200)]=function(_0x45e92e){const _0x3965b2=a1102_0xb9a361;this['tail']=this[_0x3965b2(0x1fc)]?this[_0x3965b2(0x1fc)][_0x3965b2(0x208)](_0x45e92e):_0x45e92e();};const Migration=function(_0x17dcee){const _0xb90013=a1102_0xb9a361;this['queryInterface']=_0x17dcee,this[_0xb90013(0x1f6)]=new Sequence();};Migration['prototype'][a1102_0xb9a361(0x201)]=function(_0x5ab9ff,_0x113dc4,_0x2e1cad){const _0x233a18=a1102_0xb9a361,_0x1dff49=this;this[_0x233a18(0x1f6)]['enqueue'](function(){const _0x567a45=_0x233a18;return _0x1dff49[_0x567a45(0x202)][_0x567a45(0x201)](_0x5ab9ff,_0x113dc4,_0x2e1cad)['then'](function(){const _0x4b0c37=_0x567a45;logger['info'](_0x4b0c37(0x1e2),_0x113dc4,_0x5ab9ff);})['catch'](function(_0x2b21c5){const _0x5e785e=_0x567a45;logger['info'](JSON[_0x5e785e(0x1f7)](_0x2b21c5));});});},Migration[a1102_0xb9a361(0x1de)][a1102_0xb9a361(0x1f0)]=function(_0x2b1402,_0x8723e2,_0x3b598d){const _0x6d0cee=a1102_0xb9a361,_0x69c2b3=this;this[_0x6d0cee(0x1f6)][_0x6d0cee(0x200)](function(){const _0xb12a1d=_0x6d0cee;return _0x69c2b3['queryInterface'][_0xb12a1d(0x1f0)](_0x2b1402,_0x8723e2,_0x3b598d)[_0xb12a1d(0x1fe)](function(){const _0x9d262f=_0xb12a1d;logger[_0x9d262f(0x1eb)](_0x9d262f(0x20e),_0x8723e2,_0x2b1402);})[_0xb12a1d(0x207)](function(_0x430fc9){const _0x5f4005=_0xb12a1d;logger['info'](JSON[_0x5f4005(0x1f7)](_0x430fc9));});});},Migration[a1102_0xb9a361(0x1de)][a1102_0xb9a361(0x1f2)]=function(_0x4da392){const _0x45d6ad=a1102_0xb9a361,_0x9e474c=this;this[_0x45d6ad(0x1f6)]['enqueue'](function(){const _0x4eb48b=_0x45d6ad;return _0x9e474c[_0x4eb48b(0x202)][_0x4eb48b(0x1f2)](_0x4da392,{'force':!![]})[_0x4eb48b(0x1fe)](function(){const _0x51be42=_0x4eb48b;logger[_0x51be42(0x1eb)]('table\x20dropped\x20%s',_0x4da392);})['catch'](function(_0x1369db){const _0x1a58a1=_0x4eb48b;logger[_0x1a58a1(0x1eb)](JSON['stringify'](_0x1369db));});});},Migration[a1102_0xb9a361(0x1de)]['addIndex']=function(_0x11c7c8,_0x4c369f,_0x5e1d6e){const _0xacfa56=a1102_0xb9a361,_0xfa152b=this;this[_0xacfa56(0x1f6)]['enqueue'](function(){const _0x4ef4ee=_0xacfa56;return _0xfa152b[_0x4ef4ee(0x202)][_0x4ef4ee(0x20d)](_0x11c7c8,_0x4c369f,{'indexName':_0x5e1d6e})['then'](function(){const _0x3c6221=_0x4ef4ee;logger[_0x3c6221(0x1eb)](_0x3c6221(0x1fa),_0x11c7c8,_0x4c369f[_0x3c6221(0x1e6)](','),_0x5e1d6e);})[_0x4ef4ee(0x207)](function(_0x46b0a1){const _0x19e81d=_0x4ef4ee;logger[_0x19e81d(0x1eb)](JSON[_0x19e81d(0x1f7)](_0x46b0a1));});});},Migration['prototype'][a1102_0xb9a361(0x203)]=function(_0x3c0af3){const _0x5820c9=a1102_0xb9a361,_0x15355e=this;this[_0x5820c9(0x1f6)]['enqueue'](function(){const _0x52e684=_0x5820c9;return _0x15355e[_0x52e684(0x202)][_0x52e684(0x1e9)][_0x52e684(0x203)](_0x3c0af3)[_0x52e684(0x1fe)](function(){const _0x20fa28=_0x52e684;logger[_0x20fa28(0x1eb)]('query\x20%s',_0x3c0af3);})[_0x52e684(0x207)](function(_0x3f7bc5){const _0x4e8871=_0x52e684;logger['info'](JSON[_0x4e8871(0x1f7)](_0x3f7bc5));});});},Migration[a1102_0xb9a361(0x1de)][a1102_0xb9a361(0x1e3)]=function(_0x440a87,_0x163686){const _0x990903=a1102_0xb9a361,_0x1507fe=this;this[_0x990903(0x1f6)]['enqueue'](function(){const _0x1f0f0a=_0x990903;return _0x1507fe[_0x1f0f0a(0x202)]['removeColumn'](_0x440a87,_0x163686)[_0x1f0f0a(0x1fe)](function(){const _0x3823af=_0x1f0f0a;logger[_0x3823af(0x1eb)](_0x3823af(0x20b),_0x163686,_0x440a87);})['catch'](function(_0x33760a){const _0xab8065=_0x1f0f0a;logger[_0xab8065(0x1eb)](util[_0xab8065(0x204)](_0x33760a,{'showHidden':![],'depth':null}));});});},Migration[a1102_0xb9a361(0x1de)][a1102_0xb9a361(0x1fb)]=function(_0x209b2a,_0x41848d,_0x390c6c){const _0x134e62=a1102_0xb9a361,_0x183aea=this;this[_0x134e62(0x1f6)][_0x134e62(0x200)](function(){const _0x2fdc2b=_0x134e62;return _0x183aea[_0x2fdc2b(0x202)][_0x2fdc2b(0x1fb)](_0x209b2a,_0x41848d,_0x390c6c)[_0x2fdc2b(0x1fe)](function(){const _0x31ee31=_0x2fdc2b;logger[_0x31ee31(0x1eb)](_0x31ee31(0x1fd),_0x41848d,_0x390c6c,_0x209b2a);})[_0x2fdc2b(0x207)](function(_0xdc89f7){const _0x32b12d=_0x2fdc2b;logger[_0x32b12d(0x1eb)](util[_0x32b12d(0x204)](_0xdc89f7,{'showHidden':![],'depth':null}));});});},Migration[a1102_0xb9a361(0x1de)][a1102_0xb9a361(0x20a)]=function(_0x1d2e27){const _0x5f4a3b=a1102_0xb9a361;this[_0x5f4a3b(0x1f6)][_0x5f4a3b(0x200)](function(){return _0x1d2e27();});},module[a1102_0xb9a361(0x1f8)]={'up':function(_0x2c9257,_0x8c5ec){return new Promise(function(_0x33ee36){const _0x46f431=a1102_0x4ad3,_0x305a22=new Migration(_0x2c9257);_0x305a22['addColumn']('settings','phoneBarAutoUpdater',{'type':_0x8c5ec[_0x46f431(0x1e7)],'defaultValue':!![]}),_0x305a22[_0x46f431(0x1f0)](_0x46f431(0x209),_0x46f431(0x1f4),{'type':_0x8c5ec[_0x46f431(0x1ef)],'defaultValue':_0x46f431(0x1df)}),_0x305a22['addColumn'](_0x46f431(0x1e5),_0x46f431(0x1ea),{'type':_0x8c5ec[_0x46f431(0x1ef)]}),_0x305a22['addColumn'](_0x46f431(0x1e4),_0x46f431(0x1ea),{'type':_0x8c5ec[_0x46f431(0x1ef)]}),_0x305a22['addColumn']('users',_0x46f431(0x1f3),{'type':_0x8c5ec['STRING']}),_0x305a22['addColumn'](_0x46f431(0x1e8),_0x46f431(0x205),{'type':_0x8c5ec[_0x46f431(0x1ef)]}),_0x305a22[_0x46f431(0x1f0)]('cm_contacts',_0x46f431(0x1ec),{'type':_0x8c5ec[_0x46f431(0x1e0)]}),_0x305a22['addColumn']('cm_contacts',_0x46f431(0x1ee),{'type':_0x8c5ec['INTEGER'](0x2)[_0x46f431(0x1f9)],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}}),_0x305a22[_0x46f431(0x1f0)]('cm_contacts',_0x46f431(0x1f1),{'type':_0x8c5ec[_0x46f431(0x1e1)],'defaultValue':_0x8c5ec[_0x46f431(0x1ed)]}),_0x305a22['addColumn']('mail_interactions',_0x46f431(0x206),{'type':_0x8c5ec[_0x46f431(0x1ef)],'defaultValue':''}),_0x305a22[_0x46f431(0x1f0)](_0x46f431(0x20c),_0x46f431(0x206),{'type':_0x8c5ec[_0x46f431(0x1ef)],'defaultValue':''}),_0x305a22[_0x46f431(0x1f0)]('sms_interactions','openedBy',{'type':_0x8c5ec[_0x46f431(0x1ef)],'defaultValue':''}),_0x305a22['addColumn']('openchannel_interactions',_0x46f431(0x206),{'type':_0x8c5ec[_0x46f431(0x1ef)],'defaultValue':''}),_0x305a22[_0x46f431(0x1f0)]('fax_interactions',_0x46f431(0x206),{'type':_0x8c5ec['STRING'],'defaultValue':''}),_0x305a22[_0x46f431(0x203)](_0x46f431(0x1f5)),_0x305a22[_0x46f431(0x203)]('ALTER\x20TABLE\x20`voice_voicemail_messages`\x20\x20\x20\x20\x20\x20\x20ADD\x20CONSTRAINT\x20`voice_voicemail_messages_ibfk_1`\x20\x20\x20\x20\x20\x20\x20FOREIGN\x20KEY\x20(`mailboxuser`)\x20\x20\x20\x20\x20\x20\x20REFERENCES\x20voice_voicemail(`mailbox`)\x20\x20\x20\x20\x20\x20\x20ON\x20UPDATE\x20CASCADE\x20\x20\x20\x20\x20\x20\x20ON\x20DELETE\x20CASCADE'),_0x305a22['final'](_0x33ee36);});},'down':function(){}};
\ No newline at end of file