Built motion from commit 4a18b36e645f5fa4a517d36f9783bde259878164. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.81.js
1 const a959_0x740b=['prototype','table\x20dropped\x20%s','join','classic','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','enqueue','cm_contacts','addIndex\x20%s\x20%s\x20%s','classic+','catch','telegram','sequelize','finally','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','query\x20%s','addColumn','smsMethod','util','stringify','query','sms_accounts','STRING','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','then','Added\x20column\x20%s\x20to\x20%s','Changed\x20column\x20%s\x20in\x20table\x20%s','changeColumn','sequence','inspect','queryInterface','migration','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','addIndex','info','basic','exports','ENUM','removeIndex','tail','renameColumn'];(function(_0x200e63,_0x740b70){const _0x305436=function(_0x355481){while(--_0x355481){_0x200e63['push'](_0x200e63['shift']());}};_0x305436(++_0x740b70);}(a959_0x740b,0x1ab));const a959_0x3054=function(_0x200e63,_0x740b70){_0x200e63=_0x200e63-0x0;let _0x305436=a959_0x740b[_0x200e63];return _0x305436;};const _0x4fc26e=a959_0x3054;'use strict';const util=require(_0x4fc26e('0x0')),logger=require('../config/logger')(_0x4fc26e('0xd')),Sequence=function(){};Sequence['prototype'][_0x4fc26e('0x1d')]=function(_0x355481){const _0x13e415=_0x4fc26e;this[_0x13e415('0x16')]=this[_0x13e415('0x16')]?this[_0x13e415('0x16')][_0x13e415('0x24')](_0x355481):_0x355481();};const Migration=function(_0x2e6c18){const _0x2087ca=_0x4fc26e;this['queryInterface']=_0x2e6c18,this[_0x2087ca('0xa')]=new Sequence();};Migration[_0x4fc26e('0x18')][_0x4fc26e('0x9')]=function(_0x360b80,_0x2b96eb,_0x56c98b){const _0x2a5298=_0x4fc26e,_0x14355a=this;this[_0x2a5298('0xa')][_0x2a5298('0x1d')](function(){const _0x41eef4=_0x2a5298;return _0x14355a[_0x41eef4('0xc')][_0x41eef4('0x9')](_0x360b80,_0x2b96eb,_0x56c98b)[_0x41eef4('0x6')](function(){const _0x35956e=_0x41eef4;logger['info'](_0x35956e('0x8'),_0x2b96eb,_0x360b80);})['catch'](function(_0x12e5e3){const _0x3c67c8=_0x41eef4;logger[_0x3c67c8('0x11')](JSON[_0x3c67c8('0x1')](_0x12e5e3));});});},Migration[_0x4fc26e('0x18')][_0x4fc26e('0x27')]=function(_0xf81df7,_0x157977,_0xaf3669){const _0x5e9340=_0x4fc26e,_0x3a381a=this;this[_0x5e9340('0xa')][_0x5e9340('0x1d')](function(){const _0x5a74ec=_0x5e9340;return _0x3a381a[_0x5a74ec('0xc')][_0x5a74ec('0x27')](_0xf81df7,_0x157977,_0xaf3669)['then'](function(){const _0x4cf547=_0x5a74ec;logger[_0x4cf547('0x11')](_0x4cf547('0x7'),_0x157977,_0xf81df7);})[_0x5a74ec('0x21')](function(_0x537ab0){const _0x2aab5e=_0x5a74ec;logger[_0x2aab5e('0x11')](JSON[_0x2aab5e('0x1')](_0x537ab0));});});},Migration[_0x4fc26e('0x18')][_0x4fc26e('0xf')]=function(_0x4ea5e5){const _0x4a0062=_0x4fc26e,_0x57f07b=this;this[_0x4a0062('0xa')][_0x4a0062('0x1d')](function(){const _0x1ee3f5=_0x4a0062;return _0x57f07b[_0x1ee3f5('0xc')][_0x1ee3f5('0xf')](_0x4ea5e5,{'force':!![]})[_0x1ee3f5('0x6')](function(){const _0x965d5f=_0x1ee3f5;logger[_0x965d5f('0x11')](_0x965d5f('0x19'),_0x4ea5e5);})[_0x1ee3f5('0x21')](function(_0x5a7e51){logger['info'](JSON['stringify'](_0x5a7e51));});});},Migration[_0x4fc26e('0x18')]['addIndex']=function(_0x40d3aa,_0x14e67a,_0x4313ad){const _0x36a3a2=_0x4fc26e,_0x3cae90=this;this[_0x36a3a2('0xa')][_0x36a3a2('0x1d')](function(){const _0x2ae40a=_0x36a3a2;return _0x3cae90[_0x2ae40a('0xc')][_0x2ae40a('0x10')](_0x40d3aa,_0x14e67a,{'indexName':_0x4313ad})['then'](function(){const _0x1d805c=_0x2ae40a;logger[_0x1d805c('0x11')](_0x1d805c('0x1f'),_0x40d3aa,_0x14e67a[_0x1d805c('0x1a')](','),_0x4313ad);})['catch'](function(_0x55bd1b){const _0x2529f8=_0x2ae40a;logger[_0x2529f8('0x11')](JSON['stringify'](_0x55bd1b));});});},Migration[_0x4fc26e('0x18')][_0x4fc26e('0x15')]=function(_0x88a63b,_0x2ed43c){const _0x32b0f1=_0x4fc26e,_0x55e505=this;this['sequence'][_0x32b0f1('0x1d')](function(){const _0x493ccd=_0x32b0f1;return _0x55e505[_0x493ccd('0xc')][_0x493ccd('0x15')](_0x88a63b,_0x2ed43c)[_0x493ccd('0x6')](function(){logger['info']('removeIndex\x20%s\x20%s',_0x88a63b,_0x2ed43c);})[_0x493ccd('0x21')](function(_0x6ab39e){const _0x4eb34e=_0x493ccd;logger[_0x4eb34e('0x11')](JSON[_0x4eb34e('0x1')](_0x6ab39e));});});},Migration['prototype'][_0x4fc26e('0x2')]=function(_0x195966){const _0x2bbed7=this;this['sequence']['enqueue'](function(){const _0x3e013f=a959_0x3054;return _0x2bbed7[_0x3e013f('0xc')][_0x3e013f('0x23')][_0x3e013f('0x2')](_0x195966)[_0x3e013f('0x6')](function(){const _0x2bef31=_0x3e013f;logger['info'](_0x2bef31('0x26'),_0x195966);})['catch'](function(_0x589623){const _0x25bcd1=_0x3e013f;logger[_0x25bcd1('0x11')](JSON['stringify'](_0x589623));});});},Migration['prototype']['removeColumn']=function(_0x530748,_0x352ee3){const _0xaab239=_0x4fc26e,_0x2c1750=this;this[_0xaab239('0xa')][_0xaab239('0x1d')](function(){const _0x3c93c8=_0xaab239;return _0x2c1750['queryInterface']['removeColumn'](_0x530748,_0x352ee3)[_0x3c93c8('0x6')](function(){const _0x36d125=_0x3c93c8;logger[_0x36d125('0x11')]('Removed\x20column\x20%s\x20from\x20%s',_0x352ee3,_0x530748);})[_0x3c93c8('0x21')](function(_0x52483e){const _0x4bdd0c=_0x3c93c8;logger[_0x4bdd0c('0x11')](util[_0x4bdd0c('0xb')](_0x52483e,{'showHidden':![],'depth':null}));});});},Migration[_0x4fc26e('0x18')][_0x4fc26e('0x17')]=function(_0xee08d6,_0x5b23b1,_0x6cc439){const _0x2aeac4=_0x4fc26e,_0x2867fc=this;this[_0x2aeac4('0xa')][_0x2aeac4('0x1d')](function(){const _0x4270a8=_0x2aeac4;return _0x2867fc['queryInterface']['renameColumn'](_0xee08d6,_0x5b23b1,_0x6cc439)[_0x4270a8('0x6')](function(){const _0x5ef6bf=_0x4270a8;logger[_0x5ef6bf('0x11')](_0x5ef6bf('0x25'),_0x5b23b1,_0x6cc439,_0xee08d6);})['catch'](function(_0x31760a){const _0x124313=_0x4270a8;logger[_0x124313('0x11')](util[_0x124313('0xb')](_0x31760a,{'showHidden':![],'depth':null}));});});},Migration[_0x4fc26e('0x18')]['final']=function(_0x266df9){const _0x5246d1=_0x4fc26e;this[_0x5246d1('0xa')][_0x5246d1('0x1d')](function(){return _0x266df9();});},module[_0x4fc26e('0x13')]={'up':function(_0x4cc501,_0x1824f3){return new Promise(function(_0x4502ff){const _0x176697=a959_0x3054,_0x5517a8=new Migration(_0x4cc501);_0x5517a8[_0x176697('0x9')](_0x176697('0x3'),_0x176697('0x28'),{'type':_0x1824f3[_0x176697('0x14')](_0x176697('0x12'),_0x176697('0x1b'),_0x176697('0x20'),'SI','TI','GP')}),_0x5517a8['query'](_0x176697('0x1c')),_0x5517a8[_0x176697('0x2')](_0x176697('0x5')),_0x5517a8['query'](_0x176697('0xe')),_0x5517a8[_0x176697('0x9')](_0x176697('0x3'),_0x176697('0x28'),{'type':_0x1824f3['ENUM']('SI','TI','GP')}),_0x5517a8[_0x176697('0x27')](_0x176697('0x1e'),_0x176697('0x22'),{'type':_0x1824f3[_0x176697('0x4')]}),_0x5517a8['final'](_0x4502ff);});},'down':function(){}};