Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.38.js
index cf8e15f..9c72d59 100644 (file)
@@ -1 +1 @@
-'use strict';const a1086_0x5a28=['sms_messages','Changed\x20column\x20%s\x20in\x20table\x20%s','4169OjyKpN','431UHCHwK','125kTXIKe','catch','462GfqIfW','AttachmentId','exports','1XeqkEk','dropTable','2666mZPIql','sequence','@config/logger','exec','resolve','addIndex\x20%s\x20%s\x20%s','STRING','t38pt_udptl','util','query\x20%s','removeColumn','prototype','messageId','inspect','552202kBXdyR','stringify','1129ZLRCDs','finally','info','token','683815PJbgtm','query','Exec\x20chmod','\x20Error\x20:','1012540MyPcUH','18480YCFSkH','fax_applications','sms_accounts','addColumn','remote','tail','fax_messages','child_process','Added\x20column\x20%s\x20to\x20%s','sequelize','chown\x20motion:asterisk\x20/var/opt/motion2/server/files/attachments','ALTER\x20TABLE\x20`fax_messages`\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ADD\x20CONSTRAINT\x20`fax_messages_ibfk_5`\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FOREIGN\x20KEY\x20(`AttachmentId`)\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20REFERENCES\x20attachments(`id`)\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ON\x20UPDATE\x20CASCADE\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ON\x20DELETE\x20SET\x20NULL','queryInterface','migration','table\x20dropped\x20%s','enqueue','join','final','then'];const a1086_0x62a8=function(_0x218727,_0xa2de93){_0x218727=_0x218727-0x17a;let _0x5a28b3=a1086_0x5a28[_0x218727];return _0x5a28b3;};const a1086_0x358140=a1086_0x62a8;(function(_0x3b2c66,_0x4df47d){const _0x1f866c=a1086_0x62a8;while(!![]){try{const _0x33a1a7=-parseInt(_0x1f866c(0x180))*parseInt(_0x1f866c(0x185))+-parseInt(_0x1f866c(0x17c))*-parseInt(_0x1f866c(0x17d))+parseInt(_0x1f866c(0x193))+-parseInt(_0x1f866c(0x19e))+parseInt(_0x1f866c(0x183))*parseInt(_0x1f866c(0x199))+-parseInt(_0x1f866c(0x19d))+-parseInt(_0x1f866c(0x195))*-parseInt(_0x1f866c(0x17e));if(_0x33a1a7===_0x4df47d)break;else _0x3b2c66['push'](_0x3b2c66['shift']());}catch(_0xd04ea9){_0x3b2c66['push'](_0x3b2c66['shift']());}}}(a1086_0x5a28,0xde7a5));const logger=require(a1086_0x358140(0x187))(a1086_0x358140(0x1ab)),util=require(a1086_0x358140(0x18d)),exec=require(a1086_0x358140(0x1a5))[a1086_0x358140(0x188)],cmd=a1086_0x358140(0x1a8),ls='ls\x20-la\x20/var/opt/motion2/server/files',Sequence=function(){};Sequence['prototype'][a1086_0x358140(0x1ad)]=function(_0x175fa9){const _0x460385=a1086_0x358140;this['tail']=this[_0x460385(0x1a3)]?this['tail'][_0x460385(0x196)](_0x175fa9):_0x175fa9();};const Migration=function(_0x13d792){const _0x3bc421=a1086_0x358140;this[_0x3bc421(0x1aa)]=_0x13d792,this[_0x3bc421(0x186)]=new Sequence();};Migration[a1086_0x358140(0x190)]['changeColumn']=function(_0x3717c4,_0x316a4e,_0x41abb4){const _0x3ca147=a1086_0x358140,_0x23d811=this;this[_0x3ca147(0x186)][_0x3ca147(0x1ad)](function(){const _0x145c46=_0x3ca147;return _0x23d811[_0x145c46(0x1aa)]['changeColumn'](_0x3717c4,_0x316a4e,_0x41abb4)[_0x145c46(0x1b0)](function(){const _0xaec1b3=_0x145c46;logger[_0xaec1b3(0x197)](_0xaec1b3(0x17b),_0x316a4e,_0x3717c4);})[_0x145c46(0x17f)](function(_0x2312b4){const _0x3b362f=_0x145c46;logger[_0x3b362f(0x197)](JSON[_0x3b362f(0x194)](_0x2312b4));});});},Migration[a1086_0x358140(0x190)]['addColumn']=function(_0x19dd73,_0x14a8c7,_0x45e570){const _0x5b5cd4=a1086_0x358140,_0x9a80e2=this;this['sequence'][_0x5b5cd4(0x1ad)](function(){const _0xab77a3=_0x5b5cd4;return _0x9a80e2[_0xab77a3(0x1aa)][_0xab77a3(0x1a1)](_0x19dd73,_0x14a8c7,_0x45e570)[_0xab77a3(0x1b0)](function(){const _0x1e5f01=_0xab77a3;logger[_0x1e5f01(0x197)](_0x1e5f01(0x1a6),_0x14a8c7,_0x19dd73);})[_0xab77a3(0x17f)](function(_0x282371){const _0x1d6767=_0xab77a3;logger[_0x1d6767(0x197)](JSON[_0x1d6767(0x194)](_0x282371));});});},Migration[a1086_0x358140(0x190)][a1086_0x358140(0x184)]=function(_0x6a7870){const _0x417074=a1086_0x358140,_0x466527=this;this[_0x417074(0x186)][_0x417074(0x1ad)](function(){const _0x283836=_0x417074;return _0x466527[_0x283836(0x1aa)][_0x283836(0x184)](_0x6a7870,{'force':!![]})[_0x283836(0x1b0)](function(){const _0x31875c=_0x283836;logger[_0x31875c(0x197)](_0x31875c(0x1ac),_0x6a7870);})[_0x283836(0x17f)](function(_0x4de02f){const _0x5ec25b=_0x283836;logger[_0x5ec25b(0x197)](JSON[_0x5ec25b(0x194)](_0x4de02f));});});},Migration[a1086_0x358140(0x190)]['addIndex']=function(_0x16b5a8,_0x55f2ca,_0x5610a0){const _0x8cdc99=a1086_0x358140,_0xc4ab69=this;this[_0x8cdc99(0x186)][_0x8cdc99(0x1ad)](function(){const _0x19e3f5=_0x8cdc99;return _0xc4ab69[_0x19e3f5(0x1aa)]['addIndex'](_0x16b5a8,_0x55f2ca,{'indexName':_0x5610a0})[_0x19e3f5(0x1b0)](function(){const _0xda2b28=_0x19e3f5;logger[_0xda2b28(0x197)](_0xda2b28(0x18a),_0x16b5a8,_0x55f2ca[_0xda2b28(0x1ae)](','),_0x5610a0);})[_0x19e3f5(0x17f)](function(_0x13f941){const _0x1fbd3d=_0x19e3f5;logger[_0x1fbd3d(0x197)](JSON['stringify'](_0x13f941));});});},Migration[a1086_0x358140(0x190)][a1086_0x358140(0x19a)]=function(_0x19466d){const _0x4fd024=a1086_0x358140,_0x1bd667=this;this[_0x4fd024(0x186)][_0x4fd024(0x1ad)](function(){const _0x43dbe6=_0x4fd024;return _0x1bd667['queryInterface'][_0x43dbe6(0x1a7)][_0x43dbe6(0x19a)](_0x19466d)[_0x43dbe6(0x1b0)](function(){const _0x26228a=_0x43dbe6;logger[_0x26228a(0x197)](_0x26228a(0x18e),_0x19466d);})[_0x43dbe6(0x17f)](function(_0xed61ef){const _0x1df619=_0x43dbe6;logger[_0x1df619(0x197)](JSON['stringify'](_0xed61ef));});});},Migration['prototype'][a1086_0x358140(0x18f)]=function(_0x14f8cb,_0x417390){const _0x345581=a1086_0x358140,_0x849820=this;this[_0x345581(0x186)][_0x345581(0x1ad)](function(){const _0x3daf97=_0x345581;return _0x849820['queryInterface']['removeColumn'](_0x14f8cb,_0x417390)[_0x3daf97(0x1b0)](function(){const _0x2f35fc=_0x3daf97;logger[_0x2f35fc(0x197)]('Removed\x20column\x20%s\x20from\x20%s',_0x417390,_0x14f8cb);})[_0x3daf97(0x17f)](function(_0x574213){const _0x54214b=_0x3daf97;logger[_0x54214b(0x197)](util[_0x54214b(0x192)](_0x574213,{'showHidden':![],'depth':null}));});});},Migration['prototype'][a1086_0x358140(0x1af)]=function(_0x3e30c4){const _0x4db53d=a1086_0x358140;this[_0x4db53d(0x186)][_0x4db53d(0x1ad)](function(){return _0x3e30c4();});},module[a1086_0x358140(0x182)]={'up':function(_0x1128f0,_0x2939a4){return new Promise(function(_0x1d763f){const _0x3fc8f5=a1086_0x62a8,_0x4e4b6b=new Migration(_0x1128f0);_0x4e4b6b[_0x3fc8f5(0x1a1)](_0x3fc8f5(0x1a0),_0x3fc8f5(0x1a2),{'type':_0x2939a4['STRING']}),_0x4e4b6b[_0x3fc8f5(0x1a1)]('sms_accounts',_0x3fc8f5(0x198),{'type':_0x2939a4[_0x3fc8f5(0x18b)]}),_0x4e4b6b[_0x3fc8f5(0x1a1)](_0x3fc8f5(0x17a),_0x3fc8f5(0x191),{'type':_0x2939a4[_0x3fc8f5(0x18b)]}),exec(cmd,function(_0x3ec4f2,_0x53a42b,_0x272992){const _0x4112a6=_0x3fc8f5;logger[_0x4112a6(0x197)](_0x4112a6(0x19b),'\x20Error\x20:',JSON[_0x4112a6(0x194)](_0x3ec4f2),_0x53a42b,_0x272992),exec(ls,function(_0x1d374c,_0x4cffc2,_0x27ffbd){const _0x1ee678=_0x4112a6;logger[_0x1ee678(0x197)]('Ls\x20:',_0x1ee678(0x19c),JSON[_0x1ee678(0x194)](_0x1d374c),_0x4cffc2,_0x27ffbd);});}),_0x4e4b6b['dropTable'](_0x3fc8f5(0x19f)),_0x4e4b6b[_0x3fc8f5(0x1a1)](_0x3fc8f5(0x1a4),_0x3fc8f5(0x181),{'type':_0x2939a4['INTEGER']}),_0x4e4b6b[_0x3fc8f5(0x19a)](_0x3fc8f5(0x1a9)),_0x4e4b6b['addColumn']('tools_trunks',_0x3fc8f5(0x18c),{'type':_0x2939a4[_0x3fc8f5(0x18b)],'defaultValue':'no'}),_0x4e4b6b[_0x3fc8f5(0x1af)](_0x1d763f);});},'down':function(){const _0x3f1bbc=a1086_0x358140;return Promise[_0x3f1bbc(0x189)]();}};
\ No newline at end of file
+'use strict';const a1089_0x1b47=['ALTER\x20TABLE\x20`fax_messages`\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ADD\x20CONSTRAINT\x20`fax_messages_ibfk_5`\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FOREIGN\x20KEY\x20(`AttachmentId`)\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20REFERENCES\x20attachments(`id`)\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ON\x20UPDATE\x20CASCADE\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ON\x20DELETE\x20SET\x20NULL','queryInterface','391910yRZLbo','chown\x20motion:asterisk\x20/var/opt/motion2/server/files/attachments','table\x20dropped\x20%s','307oTVvTg','then','Exec\x20chmod','token','resolve','\x20Error\x20:','child_process','817491aFCqct','query','addIndex','sms_messages','1bwbbbV','finally','675181iTrRnd','inspect','sms_accounts','enqueue','Added\x20column\x20%s\x20to\x20%s','util','changeColumn','exec','@config/logger','2343mzPTUG','catch','info','136607JguJWz','prototype','INTEGER','stringify','addColumn','Changed\x20column\x20%s\x20in\x20table\x20%s','addIndex\x20%s\x20%s\x20%s','1199053RujhZA','fax_messages','removeColumn','1JzeLEv','tail','sequence','7BIoBux','remote','sequelize','Ls\x20:','final','messageId','ls\x20-la\x20/var/opt/motion2/server/files','STRING','dropTable','AttachmentId','1024528BOeoNB'];const a1089_0x5efa=function(_0x331bfa,_0x533e6d){_0x331bfa=_0x331bfa-0x68;let _0x1b478f=a1089_0x1b47[_0x331bfa];return _0x1b478f;};const a1089_0x543d65=a1089_0x5efa;(function(_0x19e91c,_0x21504f){const _0x1596ee=a1089_0x5efa;while(!![]){try{const _0x50257a=parseInt(_0x1596ee(0x8f))*parseInt(_0x1596ee(0x82))+-parseInt(_0x1596ee(0x9c))+parseInt(_0x1596ee(0x7f))*parseInt(_0x1596ee(0x69))+parseInt(_0x1596ee(0x89))*-parseInt(_0x1596ee(0x74))+parseInt(_0x1596ee(0x70))*-parseInt(_0x1596ee(0x8c))+parseInt(_0x1596ee(0x99))+parseInt(_0x1596ee(0x76));if(_0x50257a===_0x21504f)break;else _0x19e91c['push'](_0x19e91c['shift']());}catch(_0x3c4324){_0x19e91c['push'](_0x19e91c['shift']());}}}(a1089_0x1b47,0xec095));const logger=require(a1089_0x543d65(0x7e))('migration'),util=require(a1089_0x543d65(0x7b)),exec=require(a1089_0x543d65(0x6f))[a1089_0x543d65(0x7d)],cmd=a1089_0x543d65(0x9d),ls=a1089_0x543d65(0x95),Sequence=function(){};Sequence[a1089_0x543d65(0x83)][a1089_0x543d65(0x79)]=function(_0x3b02f3){const _0x402b19=a1089_0x543d65;this[_0x402b19(0x8d)]=this['tail']?this[_0x402b19(0x8d)][_0x402b19(0x75)](_0x3b02f3):_0x3b02f3();};const Migration=function(_0xd781a7){const _0x7a0398=a1089_0x543d65;this[_0x7a0398(0x9b)]=_0xd781a7,this[_0x7a0398(0x8e)]=new Sequence();};Migration[a1089_0x543d65(0x83)][a1089_0x543d65(0x7c)]=function(_0x5a2fd5,_0xdbb1b7,_0x427602){const _0x421614=a1089_0x543d65,_0x9759e5=this;this[_0x421614(0x8e)][_0x421614(0x79)](function(){const _0x3dbd6f=_0x421614;return _0x9759e5[_0x3dbd6f(0x9b)][_0x3dbd6f(0x7c)](_0x5a2fd5,_0xdbb1b7,_0x427602)[_0x3dbd6f(0x6a)](function(){const _0xec6463=_0x3dbd6f;logger[_0xec6463(0x81)](_0xec6463(0x87),_0xdbb1b7,_0x5a2fd5);})[_0x3dbd6f(0x80)](function(_0x4a326e){const _0x5dfb05=_0x3dbd6f;logger[_0x5dfb05(0x81)](JSON['stringify'](_0x4a326e));});});},Migration['prototype']['addColumn']=function(_0x5a6596,_0x2e5b2f,_0x2e14ec){const _0x3e2215=a1089_0x543d65,_0x558f13=this;this['sequence'][_0x3e2215(0x79)](function(){const _0x4d95f3=_0x3e2215;return _0x558f13[_0x4d95f3(0x9b)][_0x4d95f3(0x86)](_0x5a6596,_0x2e5b2f,_0x2e14ec)[_0x4d95f3(0x6a)](function(){const _0x1b0cf7=_0x4d95f3;logger['info'](_0x1b0cf7(0x7a),_0x2e5b2f,_0x5a6596);})['catch'](function(_0x39b20e){const _0x3aab5=_0x4d95f3;logger[_0x3aab5(0x81)](JSON[_0x3aab5(0x85)](_0x39b20e));});});},Migration[a1089_0x543d65(0x83)][a1089_0x543d65(0x97)]=function(_0x583432){const _0x2537f1=a1089_0x543d65,_0x224971=this;this[_0x2537f1(0x8e)]['enqueue'](function(){const _0x580c13=_0x2537f1;return _0x224971[_0x580c13(0x9b)]['dropTable'](_0x583432,{'force':!![]})[_0x580c13(0x6a)](function(){const _0x3564a4=_0x580c13;logger[_0x3564a4(0x81)](_0x3564a4(0x68),_0x583432);})['catch'](function(_0x10250b){const _0x1c73a9=_0x580c13;logger[_0x1c73a9(0x81)](JSON[_0x1c73a9(0x85)](_0x10250b));});});},Migration['prototype'][a1089_0x543d65(0x72)]=function(_0x37c6f6,_0x2e3500,_0x201d80){const _0x34bab9=a1089_0x543d65,_0x502ed4=this;this['sequence'][_0x34bab9(0x79)](function(){const _0x17a4e0=_0x34bab9;return _0x502ed4[_0x17a4e0(0x9b)][_0x17a4e0(0x72)](_0x37c6f6,_0x2e3500,{'indexName':_0x201d80})['then'](function(){const _0x394fb6=_0x17a4e0;logger[_0x394fb6(0x81)](_0x394fb6(0x88),_0x37c6f6,_0x2e3500['join'](','),_0x201d80);})[_0x17a4e0(0x80)](function(_0x356c12){const _0x115179=_0x17a4e0;logger['info'](JSON[_0x115179(0x85)](_0x356c12));});});},Migration[a1089_0x543d65(0x83)]['query']=function(_0x102671){const _0x11b386=a1089_0x543d65,_0x49dd91=this;this[_0x11b386(0x8e)][_0x11b386(0x79)](function(){const _0xbf63dd=_0x11b386;return _0x49dd91[_0xbf63dd(0x9b)][_0xbf63dd(0x91)][_0xbf63dd(0x71)](_0x102671)['then'](function(){logger['info']('query\x20%s',_0x102671);})[_0xbf63dd(0x80)](function(_0x2b7c70){const _0x30b8da=_0xbf63dd;logger[_0x30b8da(0x81)](JSON[_0x30b8da(0x85)](_0x2b7c70));});});},Migration[a1089_0x543d65(0x83)]['removeColumn']=function(_0x2200dc,_0x4ff997){const _0x4abc99=a1089_0x543d65,_0x466319=this;this[_0x4abc99(0x8e)]['enqueue'](function(){const _0x4c2132=_0x4abc99;return _0x466319['queryInterface'][_0x4c2132(0x8b)](_0x2200dc,_0x4ff997)[_0x4c2132(0x6a)](function(){const _0x272b3b=_0x4c2132;logger[_0x272b3b(0x81)]('Removed\x20column\x20%s\x20from\x20%s',_0x4ff997,_0x2200dc);})[_0x4c2132(0x80)](function(_0x434e13){const _0x28ff69=_0x4c2132;logger[_0x28ff69(0x81)](util[_0x28ff69(0x77)](_0x434e13,{'showHidden':![],'depth':null}));});});},Migration[a1089_0x543d65(0x83)][a1089_0x543d65(0x93)]=function(_0x8a52e2){const _0x5899b0=a1089_0x543d65;this['sequence'][_0x5899b0(0x79)](function(){return _0x8a52e2();});},module['exports']={'up':function(_0x5c382e,_0x535fbf){return new Promise(function(_0x2551d7){const _0x486125=a1089_0x5efa,_0x115bf1=new Migration(_0x5c382e);_0x115bf1[_0x486125(0x86)](_0x486125(0x78),_0x486125(0x90),{'type':_0x535fbf[_0x486125(0x96)]}),_0x115bf1[_0x486125(0x86)](_0x486125(0x78),_0x486125(0x6c),{'type':_0x535fbf['STRING']}),_0x115bf1[_0x486125(0x86)](_0x486125(0x73),_0x486125(0x94),{'type':_0x535fbf[_0x486125(0x96)]}),exec(cmd,function(_0x1b340f,_0x484ae9,_0xe26832){const _0x17a30d=_0x486125;logger[_0x17a30d(0x81)](_0x17a30d(0x6b),'\x20Error\x20:',JSON[_0x17a30d(0x85)](_0x1b340f),_0x484ae9,_0xe26832),exec(ls,function(_0x1394cf,_0x2419ba,_0x1f2532){const _0xcbc0a=_0x17a30d;logger[_0xcbc0a(0x81)](_0xcbc0a(0x92),_0xcbc0a(0x6e),JSON['stringify'](_0x1394cf),_0x2419ba,_0x1f2532);});}),_0x115bf1[_0x486125(0x97)]('fax_applications'),_0x115bf1[_0x486125(0x86)](_0x486125(0x8a),_0x486125(0x98),{'type':_0x535fbf[_0x486125(0x84)]}),_0x115bf1[_0x486125(0x71)](_0x486125(0x9a)),_0x115bf1['addColumn']('tools_trunks','t38pt_udptl',{'type':_0x535fbf[_0x486125(0x96)],'defaultValue':'no'}),_0x115bf1[_0x486125(0x93)](_0x2551d7);});},'down':function(){const _0x5e485a=a1089_0x543d65;return Promise[_0x5e485a(0x6d)]();}};
\ No newline at end of file