605fccf7a5589e7aab8f49aaf86e021f80285370
[motion-next.git] / server / migrations / 2.0.64.js
1 const a943_0x2e00=['final','stringify','finally','changeColumn','lastdata','Added\x20column\x20%s\x20to\x20%s','migration','addColumn','inspect','enqueue','tail','analytics_report_fields','query\x20%s','table\x20dropped\x20%s','sequence','exports','TEXT','then','BOOLEAN','report_call','../config/logger','query','addIndex\x20%s\x20%s\x20%s','info','uniqueid','Changed\x20column\x20%s\x20in\x20table\x20%s','renameColumn','STRING','removeIndex','removeColumn','removeIndex\x20%s\x20%s','dropTable','addIndex','join','sequelize','prototype','util','chat_websites','catch','queryInterface','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s'];(function(_0x41da77,_0x2e0099){const _0x50aefd=function(_0x2ea792){while(--_0x2ea792){_0x41da77['push'](_0x41da77['shift']());}};_0x50aefd(++_0x2e0099);}(a943_0x2e00,0x185));const a943_0x50ae=function(_0x41da77,_0x2e0099){_0x41da77=_0x41da77-0x0;let _0x50aefd=a943_0x2e00[_0x41da77];return _0x50aefd;};const _0x3dff22=a943_0x50ae;'use strict';const util=require(_0x3dff22('0x10')),logger=require(_0x3dff22('0x0'))(_0x3dff22('0x1b')),Sequence=function(){};Sequence[_0x3dff22('0xf')]['enqueue']=function(_0x2ea792){const _0x5899de=_0x3dff22;this[_0x5899de('0x1f')]=this[_0x5899de('0x1f')]?this[_0x5899de('0x1f')][_0x5899de('0x17')](_0x2ea792):_0x2ea792();};const Migration=function(_0x523b36){const _0x4c07d2=_0x3dff22;this[_0x4c07d2('0x13')]=_0x523b36,this['sequence']=new Sequence();};Migration[_0x3dff22('0xf')][_0x3dff22('0x18')]=function(_0x5dbb42,_0x404a0b,_0x5b92c0){const _0x6e8ace=_0x3dff22,_0x3893f5=this;this[_0x6e8ace('0x23')][_0x6e8ace('0x1e')](function(){const _0x34da10=_0x6e8ace;return _0x3893f5['queryInterface'][_0x34da10('0x18')](_0x5dbb42,_0x404a0b,_0x5b92c0)['then'](function(){const _0x460259=_0x34da10;logger[_0x460259('0x3')](_0x460259('0x5'),_0x404a0b,_0x5dbb42);})[_0x34da10('0x12')](function(_0x27e489){const _0x2240d5=_0x34da10;logger['info'](JSON[_0x2240d5('0x16')](_0x27e489));});});},Migration[_0x3dff22('0xf')][_0x3dff22('0x1c')]=function(_0x340488,_0x5138c3,_0x2af4f){const _0x522ea3=_0x3dff22,_0x6d513=this;this[_0x522ea3('0x23')][_0x522ea3('0x1e')](function(){const _0x8d073a=_0x522ea3;return _0x6d513[_0x8d073a('0x13')]['addColumn'](_0x340488,_0x5138c3,_0x2af4f)[_0x8d073a('0x26')](function(){const _0x54e813=_0x8d073a;logger['info'](_0x54e813('0x1a'),_0x5138c3,_0x340488);})[_0x8d073a('0x12')](function(_0x20180e){const _0x4e24ce=_0x8d073a;logger[_0x4e24ce('0x3')](JSON[_0x4e24ce('0x16')](_0x20180e));});});},Migration[_0x3dff22('0xf')][_0x3dff22('0xb')]=function(_0x11db93){const _0x4bd876=_0x3dff22,_0x4457cf=this;this['sequence'][_0x4bd876('0x1e')](function(){const _0x18c7fa=_0x4bd876;return _0x4457cf[_0x18c7fa('0x13')]['dropTable'](_0x11db93,{'force':!![]})['then'](function(){const _0x3554b2=_0x18c7fa;logger[_0x3554b2('0x3')](_0x3554b2('0x22'),_0x11db93);})[_0x18c7fa('0x12')](function(_0x57724f){const _0x1dbac3=_0x18c7fa;logger[_0x1dbac3('0x3')](JSON['stringify'](_0x57724f));});});},Migration[_0x3dff22('0xf')][_0x3dff22('0xc')]=function(_0xeb6bb2,_0x1190f,_0x506740){const _0x4c5d0f=_0x3dff22,_0x6d8a16=this;this[_0x4c5d0f('0x23')][_0x4c5d0f('0x1e')](function(){const _0x505143=_0x4c5d0f;return _0x6d8a16[_0x505143('0x13')]['addIndex'](_0xeb6bb2,_0x1190f,{'indexName':_0x506740})[_0x505143('0x26')](function(){const _0x2e4dc8=_0x505143;logger[_0x2e4dc8('0x3')](_0x2e4dc8('0x2'),_0xeb6bb2,_0x1190f[_0x2e4dc8('0xd')](','),_0x506740);})['catch'](function(_0x338f7e){const _0x532704=_0x505143;logger[_0x532704('0x3')](JSON[_0x532704('0x16')](_0x338f7e));});});},Migration['prototype']['removeIndex']=function(_0x3d470b,_0x29e656){const _0x38762b=_0x3dff22,_0xd3debe=this;this['sequence'][_0x38762b('0x1e')](function(){const _0x30270e=_0x38762b;return _0xd3debe['queryInterface'][_0x30270e('0x8')](_0x3d470b,_0x29e656)['then'](function(){const _0x38fe62=_0x30270e;logger['info'](_0x38fe62('0xa'),_0x3d470b,_0x29e656);})[_0x30270e('0x12')](function(_0x235409){const _0x2c0b2f=_0x30270e;logger[_0x2c0b2f('0x3')](JSON[_0x2c0b2f('0x16')](_0x235409));});});},Migration[_0x3dff22('0xf')]['query']=function(_0x10b52e){const _0x33c610=_0x3dff22,_0x472b81=this;this[_0x33c610('0x23')][_0x33c610('0x1e')](function(){const _0x509672=_0x33c610;return _0x472b81[_0x509672('0x13')][_0x509672('0xe')][_0x509672('0x1')](_0x10b52e)['then'](function(){const _0x5e2b11=_0x509672;logger[_0x5e2b11('0x3')](_0x5e2b11('0x21'),_0x10b52e);})['catch'](function(_0x1214b6){const _0x2ac16b=_0x509672;logger[_0x2ac16b('0x3')](JSON['stringify'](_0x1214b6));});});},Migration['prototype'][_0x3dff22('0x9')]=function(_0x443492,_0x24c455){const _0x590b2e=_0x3dff22,_0x3a726a=this;this['sequence'][_0x590b2e('0x1e')](function(){const _0x839a6f=_0x590b2e;return _0x3a726a['queryInterface'][_0x839a6f('0x9')](_0x443492,_0x24c455)[_0x839a6f('0x26')](function(){const _0x3f3ce8=_0x839a6f;logger[_0x3f3ce8('0x3')]('Removed\x20column\x20%s\x20from\x20%s',_0x24c455,_0x443492);})['catch'](function(_0x1c2ec2){const _0x4c4578=_0x839a6f;logger[_0x4c4578('0x3')](util[_0x4c4578('0x1d')](_0x1c2ec2,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x3dff22('0x6')]=function(_0x5936e0,_0x16b99f,_0x46bfbf){const _0x24093b=_0x3dff22,_0x5ca967=this;this['sequence'][_0x24093b('0x1e')](function(){const _0x38c4a7=_0x24093b;return _0x5ca967[_0x38c4a7('0x13')][_0x38c4a7('0x6')](_0x5936e0,_0x16b99f,_0x46bfbf)[_0x38c4a7('0x26')](function(){const _0x13fb09=_0x38c4a7;logger[_0x13fb09('0x3')](_0x13fb09('0x14'),_0x16b99f,_0x46bfbf,_0x5936e0);})['catch'](function(_0x3dadff){const _0x39ffc1=_0x38c4a7;logger[_0x39ffc1('0x3')](util[_0x39ffc1('0x1d')](_0x3dadff,{'showHidden':![],'depth':null}));});});},Migration[_0x3dff22('0xf')][_0x3dff22('0x15')]=function(_0x1e61a6){const _0x2ffbab=_0x3dff22;this[_0x2ffbab('0x23')][_0x2ffbab('0x1e')](function(){return _0x1e61a6();});},module[_0x3dff22('0x24')]={'up':function(_0x1aef6e,_0x3748fb){return new Promise(function(_0x26ddbb){const _0x1b7dd4=a943_0x50ae,_0x46e5b1=new Migration(_0x1aef6e);_0x46e5b1[_0x1b7dd4('0x1c')]('users','phoneBarEnableVideoRecording',{'type':_0x3748fb[_0x1b7dd4('0x27')],'defaultValue':![]}),_0x46e5b1[_0x1b7dd4('0x18')](_0x1b7dd4('0x28'),_0x1b7dd4('0x19'),{'type':_0x3748fb[_0x1b7dd4('0x25')]}),_0x46e5b1[_0x1b7dd4('0x1c')](_0x1b7dd4('0x11'),'customerAlias',{'type':_0x3748fb[_0x1b7dd4('0x7')],'defaultValue':'Me'}),_0x46e5b1[_0x1b7dd4('0x18')](_0x1b7dd4('0x20'),'field',{'type':_0x3748fb['TEXT'],'allowNull':![]}),_0x46e5b1[_0x1b7dd4('0x8')](_0x1b7dd4('0x28'),_0x1b7dd4('0x4')),_0x46e5b1[_0x1b7dd4('0x15')](_0x26ddbb);});},'down':function(){}};