Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.81.js
index f871c16..c5df35c 100644 (file)
@@ -1 +1 @@
-const a960_0x4f8a=['addIndex\x20%s\x20%s\x20%s','basic','cm_contacts','STRING','tail','sequelize','UPDATE\x20sms_accounts\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SET\x20smsMethod\x20=\x20\x27SI\x27\x20WHERE\x20smsMethod\x20=\x20\x27basic\x27','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','changeColumn','info','sequence','addColumn','exports','classic+','then','removeIndex','UPDATE\x20sms_accounts\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SET\x20smsMethod\x20=\x20\x27TI\x27\x20WHERE\x20smsMethod\x20=\x20\x27classic\x27','query','catch','UPDATE\x20sms_accounts\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SET\x20smsMethod\x20=\x20\x27GP\x27\x20WHERE\x20smsMethod\x20=\x20\x27classic+\x27','Added\x20column\x20%s\x20to\x20%s','smsMethod','dropTable','removeColumn','ENUM','final','migration','removeIndex\x20%s\x20%s','renameColumn','Changed\x20column\x20%s\x20in\x20table\x20%s','stringify','prototype','queryInterface','inspect','Removed\x20column\x20%s\x20from\x20%s','enqueue','finally','sms_accounts','addIndex','join'];(function(_0x50bea7,_0x4f8a22){const _0x12c6d8=function(_0x369e6e){while(--_0x369e6e){_0x50bea7['push'](_0x50bea7['shift']());}};_0x12c6d8(++_0x4f8a22);}(a960_0x4f8a,0x1c0));const a960_0x12c6=function(_0x50bea7,_0x4f8a22){_0x50bea7=_0x50bea7-0x0;let _0x12c6d8=a960_0x4f8a[_0x50bea7];return _0x12c6d8;};const _0x3a4f3d=a960_0x12c6;'use strict';const util=require('util'),logger=require('../config/logger')(_0x3a4f3d('0x12')),Sequence=function(){};Sequence['prototype'][_0x3a4f3d('0x1b')]=function(_0x369e6e){const _0xbc7bc3=_0x3a4f3d;this[_0xbc7bc3('0x24')]=this[_0xbc7bc3('0x24')]?this[_0xbc7bc3('0x24')][_0xbc7bc3('0x1c')](_0x369e6e):_0x369e6e();};const Migration=function(_0x8e908d){const _0x47c68f=_0x3a4f3d;this[_0x47c68f('0x18')]=_0x8e908d,this[_0x47c68f('0x2')]=new Sequence();};Migration[_0x3a4f3d('0x17')][_0x3a4f3d('0x0')]=function(_0x4e5017,_0x5c4ffb,_0x84d3ae){const _0x114869=_0x3a4f3d,_0x25344e=this;this[_0x114869('0x2')][_0x114869('0x1b')](function(){const _0x4f1192=_0x114869;return _0x25344e[_0x4f1192('0x18')][_0x4f1192('0x0')](_0x4e5017,_0x5c4ffb,_0x84d3ae)[_0x4f1192('0x6')](function(){const _0xe2073c=_0x4f1192;logger[_0xe2073c('0x1')](_0xe2073c('0x15'),_0x5c4ffb,_0x4e5017);})['catch'](function(_0x50e047){const _0x4f4d18=_0x4f1192;logger[_0x4f4d18('0x1')](JSON[_0x4f4d18('0x16')](_0x50e047));});});},Migration['prototype'][_0x3a4f3d('0x3')]=function(_0x18651a,_0x4ce5aa,_0x10f381){const _0x269af5=_0x3a4f3d,_0x9be899=this;this[_0x269af5('0x2')][_0x269af5('0x1b')](function(){const _0x3af9c2=_0x269af5;return _0x9be899[_0x3af9c2('0x18')][_0x3af9c2('0x3')](_0x18651a,_0x4ce5aa,_0x10f381)[_0x3af9c2('0x6')](function(){const _0x391e5b=_0x3af9c2;logger[_0x391e5b('0x1')](_0x391e5b('0xc'),_0x4ce5aa,_0x18651a);})['catch'](function(_0x350a63){const _0x1f78fe=_0x3af9c2;logger[_0x1f78fe('0x1')](JSON[_0x1f78fe('0x16')](_0x350a63));});});},Migration[_0x3a4f3d('0x17')][_0x3a4f3d('0xe')]=function(_0x1f8532){const _0x4e4a23=_0x3a4f3d,_0x4a6ef7=this;this[_0x4e4a23('0x2')][_0x4e4a23('0x1b')](function(){const _0xd73b06=_0x4e4a23;return _0x4a6ef7['queryInterface'][_0xd73b06('0xe')](_0x1f8532,{'force':!![]})[_0xd73b06('0x6')](function(){logger['info']('table\x20dropped\x20%s',_0x1f8532);})['catch'](function(_0x13b177){const _0x281423=_0xd73b06;logger[_0x281423('0x1')](JSON[_0x281423('0x16')](_0x13b177));});});},Migration['prototype'][_0x3a4f3d('0x1e')]=function(_0x2b36c7,_0x42aac3,_0x1232cc){const _0x458b59=_0x3a4f3d,_0x43e5fa=this;this[_0x458b59('0x2')][_0x458b59('0x1b')](function(){const _0x44df82=_0x458b59;return _0x43e5fa[_0x44df82('0x18')][_0x44df82('0x1e')](_0x2b36c7,_0x42aac3,{'indexName':_0x1232cc})[_0x44df82('0x6')](function(){const _0x16eaa4=_0x44df82;logger[_0x16eaa4('0x1')](_0x16eaa4('0x20'),_0x2b36c7,_0x42aac3[_0x16eaa4('0x1f')](','),_0x1232cc);})['catch'](function(_0x10d196){const _0x249510=_0x44df82;logger[_0x249510('0x1')](JSON['stringify'](_0x10d196));});});},Migration[_0x3a4f3d('0x17')]['removeIndex']=function(_0x203fb9,_0x176d68){const _0x4d7b38=_0x3a4f3d,_0x1bed06=this;this[_0x4d7b38('0x2')]['enqueue'](function(){const _0x3be896=_0x4d7b38;return _0x1bed06['queryInterface'][_0x3be896('0x7')](_0x203fb9,_0x176d68)['then'](function(){const _0x52bc52=_0x3be896;logger[_0x52bc52('0x1')](_0x52bc52('0x13'),_0x203fb9,_0x176d68);})[_0x3be896('0xa')](function(_0x522d75){const _0x5a2d97=_0x3be896;logger[_0x5a2d97('0x1')](JSON[_0x5a2d97('0x16')](_0x522d75));});});},Migration[_0x3a4f3d('0x17')]['query']=function(_0x36ce90){const _0x2777a6=_0x3a4f3d,_0x113a87=this;this[_0x2777a6('0x2')]['enqueue'](function(){const _0x3f2318=_0x2777a6;return _0x113a87[_0x3f2318('0x18')][_0x3f2318('0x25')][_0x3f2318('0x9')](_0x36ce90)[_0x3f2318('0x6')](function(){logger['info']('query\x20%s',_0x36ce90);})['catch'](function(_0x1d7d28){const _0x5135ad=_0x3f2318;logger['info'](JSON[_0x5135ad('0x16')](_0x1d7d28));});});},Migration[_0x3a4f3d('0x17')][_0x3a4f3d('0xf')]=function(_0x47aed0,_0x3b2434){const _0x948f6e=_0x3a4f3d,_0x57e5e3=this;this[_0x948f6e('0x2')][_0x948f6e('0x1b')](function(){const _0x5949df=_0x948f6e;return _0x57e5e3[_0x5949df('0x18')][_0x5949df('0xf')](_0x47aed0,_0x3b2434)[_0x5949df('0x6')](function(){const _0x46839f=_0x5949df;logger[_0x46839f('0x1')](_0x46839f('0x1a'),_0x3b2434,_0x47aed0);})[_0x5949df('0xa')](function(_0x5ef336){const _0x489efa=_0x5949df;logger[_0x489efa('0x1')](util[_0x489efa('0x19')](_0x5ef336,{'showHidden':![],'depth':null}));});});},Migration[_0x3a4f3d('0x17')][_0x3a4f3d('0x14')]=function(_0x55594b,_0x419641,_0x5204ac){const _0x3dbab9=_0x3a4f3d,_0x39ac01=this;this['sequence'][_0x3dbab9('0x1b')](function(){const _0x4ee180=_0x3dbab9;return _0x39ac01['queryInterface'][_0x4ee180('0x14')](_0x55594b,_0x419641,_0x5204ac)[_0x4ee180('0x6')](function(){const _0x4c250d=_0x4ee180;logger[_0x4c250d('0x1')](_0x4c250d('0x27'),_0x419641,_0x5204ac,_0x55594b);})[_0x4ee180('0xa')](function(_0x355f31){const _0x1697af=_0x4ee180;logger[_0x1697af('0x1')](util['inspect'](_0x355f31,{'showHidden':![],'depth':null}));});});},Migration['prototype']['final']=function(_0x15982c){const _0x44cfb4=_0x3a4f3d;this[_0x44cfb4('0x2')][_0x44cfb4('0x1b')](function(){return _0x15982c();});},module[_0x3a4f3d('0x4')]={'up':function(_0x3e5c0f,_0x1b6ba2){return new Promise(function(_0x57ab27){const _0x48eb81=a960_0x12c6,_0x2139a1=new Migration(_0x3e5c0f);_0x2139a1[_0x48eb81('0x0')](_0x48eb81('0x1d'),_0x48eb81('0xd'),{'type':_0x1b6ba2['ENUM'](_0x48eb81('0x21'),'classic',_0x48eb81('0x5'),'SI','TI','GP')}),_0x2139a1[_0x48eb81('0x9')](_0x48eb81('0x26')),_0x2139a1['query'](_0x48eb81('0x8')),_0x2139a1[_0x48eb81('0x9')](_0x48eb81('0xb')),_0x2139a1[_0x48eb81('0x0')](_0x48eb81('0x1d'),'smsMethod',{'type':_0x1b6ba2[_0x48eb81('0x10')]('SI','TI','GP')}),_0x2139a1[_0x48eb81('0x3')](_0x48eb81('0x22'),'telegram',{'type':_0x1b6ba2[_0x48eb81('0x23')]}),_0x2139a1[_0x48eb81('0x11')](_0x57ab27);});},'down':function(){}};
\ No newline at end of file
+const a960_0x4a82=['UPDATE\x20sms_accounts\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SET\x20smsMethod\x20=\x20\x27SI\x27\x20WHERE\x20smsMethod\x20=\x20\x27basic\x27','query\x20%s','enqueue','UPDATE\x20sms_accounts\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SET\x20smsMethod\x20=\x20\x27GP\x27\x20WHERE\x20smsMethod\x20=\x20\x27classic+\x27','dropTable','exports','migration','sequence','query','Added\x20column\x20%s\x20to\x20%s','sequelize','catch','addIndex','classic+','queryInterface','inspect','addIndex\x20%s\x20%s\x20%s','cm_contacts','renameColumn','removeColumn','ENUM','tail','table\x20dropped\x20%s','classic','basic','removeIndex','changeColumn','final','Changed\x20column\x20%s\x20in\x20table\x20%s','info','stringify','prototype','UPDATE\x20sms_accounts\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SET\x20smsMethod\x20=\x20\x27TI\x27\x20WHERE\x20smsMethod\x20=\x20\x27classic\x27','sms_accounts','smsMethod','finally','addColumn','util','then'];(function(_0x3a1349,_0x4a825e){const _0x27bf0f=function(_0x1fdac0){while(--_0x1fdac0){_0x3a1349['push'](_0x3a1349['shift']());}};_0x27bf0f(++_0x4a825e);}(a960_0x4a82,0x66));const a960_0x27bf=function(_0x3a1349,_0x4a825e){_0x3a1349=_0x3a1349-0x0;let _0x27bf0f=a960_0x4a82[_0x3a1349];return _0x27bf0f;};const _0x1ef2e8=a960_0x27bf;'use strict';const util=require(_0x1ef2e8('0xd')),logger=require('../config/logger')(_0x1ef2e8('0x15')),Sequence=function(){};Sequence[_0x1ef2e8('0x7')][_0x1ef2e8('0x11')]=function(_0x1fdac0){const _0x4c671b=_0x1ef2e8;this[_0x4c671b('0x24')]=this[_0x4c671b('0x24')]?this['tail'][_0x4c671b('0xb')](_0x1fdac0):_0x1fdac0();};const Migration=function(_0x1fdb82){const _0xbb15bc=_0x1ef2e8;this['queryInterface']=_0x1fdb82,this[_0xbb15bc('0x16')]=new Sequence();};Migration['prototype'][_0x1ef2e8('0x2')]=function(_0x275327,_0x3d98f1,_0x4d0f50){const _0x316213=_0x1ef2e8,_0xaca9c1=this;this[_0x316213('0x16')][_0x316213('0x11')](function(){const _0x40147f=_0x316213;return _0xaca9c1[_0x40147f('0x1d')][_0x40147f('0x2')](_0x275327,_0x3d98f1,_0x4d0f50)[_0x40147f('0xe')](function(){const _0x5e409f=_0x40147f;logger[_0x5e409f('0x5')](_0x5e409f('0x4'),_0x3d98f1,_0x275327);})[_0x40147f('0x1a')](function(_0x116e7f){const _0x108457=_0x40147f;logger['info'](JSON[_0x108457('0x6')](_0x116e7f));});});},Migration[_0x1ef2e8('0x7')][_0x1ef2e8('0xc')]=function(_0x284b0f,_0x1ce681,_0x175b32){const _0x4f83ad=_0x1ef2e8,_0x3e299=this;this[_0x4f83ad('0x16')][_0x4f83ad('0x11')](function(){const _0x3c6681=_0x4f83ad;return _0x3e299[_0x3c6681('0x1d')][_0x3c6681('0xc')](_0x284b0f,_0x1ce681,_0x175b32)[_0x3c6681('0xe')](function(){const _0x200531=_0x3c6681;logger[_0x200531('0x5')](_0x200531('0x18'),_0x1ce681,_0x284b0f);})['catch'](function(_0x502902){const _0x475186=_0x3c6681;logger[_0x475186('0x5')](JSON[_0x475186('0x6')](_0x502902));});});},Migration[_0x1ef2e8('0x7')][_0x1ef2e8('0x13')]=function(_0x26cbb2){const _0x572096=_0x1ef2e8,_0xbfcf99=this;this['sequence'][_0x572096('0x11')](function(){const _0x37aa6e=_0x572096;return _0xbfcf99[_0x37aa6e('0x1d')]['dropTable'](_0x26cbb2,{'force':!![]})['then'](function(){const _0x42b7a7=_0x37aa6e;logger['info'](_0x42b7a7('0x25'),_0x26cbb2);})[_0x37aa6e('0x1a')](function(_0x10e12d){const _0x4350ea=_0x37aa6e;logger['info'](JSON[_0x4350ea('0x6')](_0x10e12d));});});},Migration['prototype'][_0x1ef2e8('0x1b')]=function(_0x3cb213,_0x34a627,_0x5df067){const _0x1094ce=_0x1ef2e8,_0x17f94f=this;this[_0x1094ce('0x16')][_0x1094ce('0x11')](function(){const _0x5e9cc2=_0x1094ce;return _0x17f94f[_0x5e9cc2('0x1d')][_0x5e9cc2('0x1b')](_0x3cb213,_0x34a627,{'indexName':_0x5df067})[_0x5e9cc2('0xe')](function(){const _0x184eaa=_0x5e9cc2;logger['info'](_0x184eaa('0x1f'),_0x3cb213,_0x34a627['join'](','),_0x5df067);})[_0x5e9cc2('0x1a')](function(_0x40683f){const _0x4dedc2=_0x5e9cc2;logger[_0x4dedc2('0x5')](JSON[_0x4dedc2('0x6')](_0x40683f));});});},Migration[_0x1ef2e8('0x7')][_0x1ef2e8('0x1')]=function(_0x5e2021,_0x30b677){const _0x34694f=_0x1ef2e8,_0x1a6019=this;this[_0x34694f('0x16')][_0x34694f('0x11')](function(){const _0x177549=_0x34694f;return _0x1a6019[_0x177549('0x1d')][_0x177549('0x1')](_0x5e2021,_0x30b677)[_0x177549('0xe')](function(){const _0x1eb88a=_0x177549;logger[_0x1eb88a('0x5')]('removeIndex\x20%s\x20%s',_0x5e2021,_0x30b677);})['catch'](function(_0x1db91c){const _0x41f984=_0x177549;logger[_0x41f984('0x5')](JSON[_0x41f984('0x6')](_0x1db91c));});});},Migration['prototype']['query']=function(_0x5c2f09){const _0x19f8de=_0x1ef2e8,_0xc294eb=this;this[_0x19f8de('0x16')]['enqueue'](function(){const _0xa963f8=_0x19f8de;return _0xc294eb[_0xa963f8('0x1d')][_0xa963f8('0x19')]['query'](_0x5c2f09)['then'](function(){const _0x3577e3=_0xa963f8;logger['info'](_0x3577e3('0x10'),_0x5c2f09);})['catch'](function(_0x4cfbaa){const _0x2bd666=_0xa963f8;logger[_0x2bd666('0x5')](JSON['stringify'](_0x4cfbaa));});});},Migration['prototype'][_0x1ef2e8('0x22')]=function(_0x487354,_0x17b2ff){const _0x51468a=_0x1ef2e8,_0x4e22c3=this;this[_0x51468a('0x16')]['enqueue'](function(){const _0x49b427=_0x51468a;return _0x4e22c3[_0x49b427('0x1d')]['removeColumn'](_0x487354,_0x17b2ff)['then'](function(){logger['info']('Removed\x20column\x20%s\x20from\x20%s',_0x17b2ff,_0x487354);})[_0x49b427('0x1a')](function(_0xe8c1dc){const _0x4906bd=_0x49b427;logger[_0x4906bd('0x5')](util[_0x4906bd('0x1e')](_0xe8c1dc,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x1ef2e8('0x21')]=function(_0x406e1f,_0x40a62b,_0x448568){const _0x1367f1=_0x1ef2e8,_0x23d519=this;this['sequence'][_0x1367f1('0x11')](function(){const _0x548d3d=_0x1367f1;return _0x23d519['queryInterface'][_0x548d3d('0x21')](_0x406e1f,_0x40a62b,_0x448568)[_0x548d3d('0xe')](function(){logger['info']('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x40a62b,_0x448568,_0x406e1f);})[_0x548d3d('0x1a')](function(_0x463c85){const _0x258ee1=_0x548d3d;logger[_0x258ee1('0x5')](util[_0x258ee1('0x1e')](_0x463c85,{'showHidden':![],'depth':null}));});});},Migration[_0x1ef2e8('0x7')]['final']=function(_0x9f11bf){const _0x2095cd=_0x1ef2e8;this[_0x2095cd('0x16')]['enqueue'](function(){return _0x9f11bf();});},module[_0x1ef2e8('0x14')]={'up':function(_0x21c2fe,_0x3aeec0){return new Promise(function(_0x4c0db9){const _0x7a8a20=a960_0x27bf,_0x4dde05=new Migration(_0x21c2fe);_0x4dde05[_0x7a8a20('0x2')](_0x7a8a20('0x9'),_0x7a8a20('0xa'),{'type':_0x3aeec0[_0x7a8a20('0x23')](_0x7a8a20('0x0'),_0x7a8a20('0x26'),_0x7a8a20('0x1c'),'SI','TI','GP')}),_0x4dde05[_0x7a8a20('0x17')](_0x7a8a20('0xf')),_0x4dde05[_0x7a8a20('0x17')](_0x7a8a20('0x8')),_0x4dde05['query'](_0x7a8a20('0x12')),_0x4dde05[_0x7a8a20('0x2')](_0x7a8a20('0x9'),_0x7a8a20('0xa'),{'type':_0x3aeec0[_0x7a8a20('0x23')]('SI','TI','GP')}),_0x4dde05['addColumn'](_0x7a8a20('0x20'),'telegram',{'type':_0x3aeec0['STRING']}),_0x4dde05[_0x7a8a20('0x3')](_0x4c0db9);});},'down':function(){}};
\ No newline at end of file