4f1dfdeb6b9a949f48acb86570333fba3c6429a7
[motion-next.git] / server / migrations / 2.0.55.js
1 const a934_0xa446=['Removed\x20column\x20%s\x20from\x20%s','queryInterface','tail','stringify','Changed\x20column\x20%s\x20in\x20table\x20%s','addColumn','info','sms_accounts','CREATE\x20TABLE\x20`mail_substatuses`\x20(\x20\x20\x20\x20\x20\x20\x20\x20\x20`id`\x20int(11)\x20NOT\x20NULL\x20AUTO_INCREMENT,\x20\x20\x20\x20\x20\x20\x20\x20\x20`name`\x20varchar(255)\x20NOT\x20NULL,\x20\x20\x20\x20\x20\x20\x20\x20\x20`description`\x20varchar(255)\x20DEFAULT\x20NULL,\x20\x20\x20\x20\x20\x20\x20\x20\x20`createdAt`\x20datetime\x20NOT\x20NULL,\x20\x20\x20\x20\x20\x20\x20\x20\x20`updatedAt`\x20datetime\x20NOT\x20NULL,\x20\x20\x20\x20\x20\x20\x20\x20\x20PRIMARY\x20KEY\x20(`id`),\x20\x20\x20\x20\x20\x20\x20\x20\x20UNIQUE\x20KEY\x20`name`\x20(`name`)\x20\x20\x20\x20\x20\x20\x20)\x20ENGINE=InnoDB\x20DEFAULT\x20CHARSET=utf8;','migration','changeColumn','final','INSERT\x20INTO\x20`mail_substatuses`\x20(`name`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27pending\x27,\x20\x27Pending\x20status\x20for\x20mail\x20interaction\x27,\x20NOW(),\x20NOW());','dropTable','table\x20dropped\x20%s','query','Added\x20column\x20%s\x20to\x20%s','renameColumn','then','authId','removeColumn','enqueue','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','query\x20%s','prototype','finally','addIndex','sequence','inspect','catch','STRING'];(function(_0x30ed61,_0xa44653){const _0x2715f1=function(_0x344f73){while(--_0x344f73){_0x30ed61['push'](_0x30ed61['shift']());}};_0x2715f1(++_0xa44653);}(a934_0xa446,0xb5));const a934_0x2715=function(_0x30ed61,_0xa44653){_0x30ed61=_0x30ed61-0x0;let _0x2715f1=a934_0xa446[_0x30ed61];return _0x2715f1;};const _0x4c65f1=a934_0x2715;'use strict';const util=require('util'),logger=require('../config/logger')(_0x4c65f1('0xe')),Sequence=function(){};Sequence['prototype'][_0x4c65f1('0x1a')]=function(_0x344f73){const _0x339a1b=_0x4c65f1;this['tail']=this[_0x339a1b('0x7')]?this[_0x339a1b('0x7')][_0x339a1b('0x1e')](_0x344f73):_0x344f73();};const Migration=function(_0x2de492){const _0x819e94=_0x4c65f1;this['queryInterface']=_0x2de492,this[_0x819e94('0x1')]=new Sequence();};Migration[_0x4c65f1('0x1d')][_0x4c65f1('0xf')]=function(_0x4252db,_0x125f77,_0x15ea9a){const _0x17f379=_0x4c65f1,_0x4a2062=this;this[_0x17f379('0x1')][_0x17f379('0x1a')](function(){const _0x47560c=_0x17f379;return _0x4a2062[_0x47560c('0x6')]['changeColumn'](_0x4252db,_0x125f77,_0x15ea9a)['then'](function(){const _0x4d82c8=_0x47560c;logger[_0x4d82c8('0xb')](_0x4d82c8('0x9'),_0x125f77,_0x4252db);})[_0x47560c('0x3')](function(_0x59a50d){const _0x584737=_0x47560c;logger[_0x584737('0xb')](JSON[_0x584737('0x8')](_0x59a50d));});});},Migration[_0x4c65f1('0x1d')][_0x4c65f1('0xa')]=function(_0x5c6c30,_0x48db70,_0x393c42){const _0x32ab0c=_0x4c65f1,_0x2e9705=this;this[_0x32ab0c('0x1')]['enqueue'](function(){const _0xe622e6=_0x32ab0c;return _0x2e9705[_0xe622e6('0x6')][_0xe622e6('0xa')](_0x5c6c30,_0x48db70,_0x393c42)[_0xe622e6('0x17')](function(){const _0xfc09b0=_0xe622e6;logger['info'](_0xfc09b0('0x15'),_0x48db70,_0x5c6c30);})[_0xe622e6('0x3')](function(_0x2ebbdf){const _0x4964a5=_0xe622e6;logger[_0x4964a5('0xb')](JSON[_0x4964a5('0x8')](_0x2ebbdf));});});},Migration[_0x4c65f1('0x1d')][_0x4c65f1('0x12')]=function(_0x3f7029){const _0x562244=_0x4c65f1,_0xbdf6fd=this;this[_0x562244('0x1')]['enqueue'](function(){const _0xf7d1b=_0x562244;return _0xbdf6fd[_0xf7d1b('0x6')]['dropTable'](_0x3f7029,{'force':!![]})[_0xf7d1b('0x17')](function(){const _0x388f53=_0xf7d1b;logger['info'](_0x388f53('0x13'),_0x3f7029);})[_0xf7d1b('0x3')](function(_0x362e17){const _0xbcd99f=_0xf7d1b;logger['info'](JSON[_0xbcd99f('0x8')](_0x362e17));});});},Migration[_0x4c65f1('0x1d')][_0x4c65f1('0x0')]=function(_0x558607,_0x52584c,_0x461efe){const _0x195d01=_0x4c65f1,_0x1d1286=this;this[_0x195d01('0x1')][_0x195d01('0x1a')](function(){const _0x3a5cd7=_0x195d01;return _0x1d1286[_0x3a5cd7('0x6')][_0x3a5cd7('0x0')](_0x558607,_0x52584c,{'indexName':_0x461efe})[_0x3a5cd7('0x17')](function(){const _0x265a5a=_0x3a5cd7;logger[_0x265a5a('0xb')]('addIndex\x20%s\x20%s\x20%s',_0x558607,_0x52584c['join'](','),_0x461efe);})['catch'](function(_0x17070c){const _0x448cc9=_0x3a5cd7;logger[_0x448cc9('0xb')](JSON['stringify'](_0x17070c));});});},Migration[_0x4c65f1('0x1d')][_0x4c65f1('0x14')]=function(_0x5ed6ea){const _0x1ce99d=_0x4c65f1,_0x10a88e=this;this['sequence'][_0x1ce99d('0x1a')](function(){const _0x54cd02=_0x1ce99d;return _0x10a88e['queryInterface']['sequelize'][_0x54cd02('0x14')](_0x5ed6ea)['then'](function(){const _0x502f77=_0x54cd02;logger[_0x502f77('0xb')](_0x502f77('0x1c'),_0x5ed6ea);})[_0x54cd02('0x3')](function(_0x566759){const _0x312680=_0x54cd02;logger[_0x312680('0xb')](JSON['stringify'](_0x566759));});});},Migration[_0x4c65f1('0x1d')][_0x4c65f1('0x19')]=function(_0x183782,_0x20fbb7){const _0x54952d=_0x4c65f1,_0x2182bb=this;this['sequence'][_0x54952d('0x1a')](function(){const _0x438c2a=_0x54952d;return _0x2182bb[_0x438c2a('0x6')][_0x438c2a('0x19')](_0x183782,_0x20fbb7)['then'](function(){const _0x57f9a8=_0x438c2a;logger[_0x57f9a8('0xb')](_0x57f9a8('0x5'),_0x20fbb7,_0x183782);})[_0x438c2a('0x3')](function(_0x352507){const _0x2ba3cc=_0x438c2a;logger[_0x2ba3cc('0xb')](util[_0x2ba3cc('0x2')](_0x352507,{'showHidden':![],'depth':null}));});});},Migration[_0x4c65f1('0x1d')]['renameColumn']=function(_0x5d2caf,_0x133132,_0xd0b0f6){const _0x268148=_0x4c65f1,_0x4455b8=this;this[_0x268148('0x1')][_0x268148('0x1a')](function(){const _0x43eb5d=_0x268148;return _0x4455b8[_0x43eb5d('0x6')][_0x43eb5d('0x16')](_0x5d2caf,_0x133132,_0xd0b0f6)[_0x43eb5d('0x17')](function(){const _0x1981fb=_0x43eb5d;logger[_0x1981fb('0xb')](_0x1981fb('0x1b'),_0x133132,_0xd0b0f6,_0x5d2caf);})[_0x43eb5d('0x3')](function(_0x4ee485){const _0x40b9b7=_0x43eb5d;logger[_0x40b9b7('0xb')](util['inspect'](_0x4ee485,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x4c65f1('0x10')]=function(_0x56003d){const _0x32545f=_0x4c65f1;this[_0x32545f('0x1')][_0x32545f('0x1a')](function(){return _0x56003d();});},module['exports']={'up':function(_0x510070,_0x5c33f4){return new Promise(function(_0x4baf6d){const _0x3059b8=a934_0x2715,_0x1ce07e=new Migration(_0x510070);_0x1ce07e[_0x3059b8('0xa')](_0x3059b8('0xc'),_0x3059b8('0x18'),{'type':_0x5c33f4[_0x3059b8('0x4')]}),_0x1ce07e[_0x3059b8('0x14')](_0x3059b8('0xd')),_0x1ce07e[_0x3059b8('0x14')](_0x3059b8('0x11')),_0x1ce07e[_0x3059b8('0x10')](_0x4baf6d);});},'down':function(){}};