3aeb97b9d2d805d0e52b954b9c1a2b33db277b17
[motion-next.git] / server / migrations / 2.0.47.js
1 const a926_0xda55=['BOOLEAN','addIndex','STRING','query','sequence','chat_websites','addColumn','secret','info','TEXT','data','interval','finally','removeColumn','table\x20dropped\x20%s','prototype','tail','sequelize','dashboard_items','catch','query\x20%s','final','enqueue','DELETE\x20FROM\x20dashboards','../config/logger','migration','type','Form\x20properly\x20submitted','queryInterface','dashboards','changeColumn','stringify','long','title','Changed\x20column\x20%s\x20in\x20table\x20%s','attrs','dropTable','inspect','Form\x20submission\x20error','join','then'];(function(_0xf8ab4a,_0xda55be){const _0x37d579=function(_0x4aa67d){while(--_0x4aa67d){_0xf8ab4a['push'](_0xf8ab4a['shift']());}};_0x37d579(++_0xda55be);}(a926_0xda55,0xc2));const a926_0x37d5=function(_0xf8ab4a,_0xda55be){_0xf8ab4a=_0xf8ab4a-0x0;let _0x37d579=a926_0xda55[_0xf8ab4a];return _0x37d579;};const _0x150d8c=a926_0x37d5;'use strict';const logger=require(_0x150d8c('0x23'))(_0x150d8c('0x24')),util=require('util'),Sequence=function(){};Sequence[_0x150d8c('0x1a')][_0x150d8c('0x21')]=function(_0x4aa67d){const _0x30fd85=_0x150d8c;this[_0x30fd85('0x1b')]=this[_0x30fd85('0x1b')]?this['tail'][_0x30fd85('0x17')](_0x4aa67d):_0x4aa67d();};const Migration=function(_0xaf6b21){const _0x4cd3fc=_0x150d8c;this[_0x4cd3fc('0x27')]=_0xaf6b21,this[_0x4cd3fc('0xf')]=new Sequence();};Migration[_0x150d8c('0x1a')][_0x150d8c('0x0')]=function(_0x3e0e56,_0x171ad1,_0x179914){const _0x499ded=_0x150d8c,_0x5f0622=this;this[_0x499ded('0xf')]['enqueue'](function(){const _0x512525=_0x499ded;return _0x5f0622[_0x512525('0x27')][_0x512525('0x0')](_0x3e0e56,_0x171ad1,_0x179914)[_0x512525('0xa')](function(){const _0x5a7697=_0x512525;logger[_0x5a7697('0x13')](_0x5a7697('0x4'),_0x171ad1,_0x3e0e56);})[_0x512525('0x1e')](function(_0x518b87){const _0x537ab8=_0x512525;logger[_0x537ab8('0x13')](JSON[_0x537ab8('0x1')](_0x518b87));});});},Migration[_0x150d8c('0x1a')]['addColumn']=function(_0x839ec7,_0x3c8f82,_0x34d117){const _0x3f165b=_0x150d8c,_0x279c5b=this;this[_0x3f165b('0xf')]['enqueue'](function(){const _0x402b4b=_0x3f165b;return _0x279c5b[_0x402b4b('0x27')]['addColumn'](_0x839ec7,_0x3c8f82,_0x34d117)['then'](function(){const _0x54097a=_0x402b4b;logger[_0x54097a('0x13')]('Added\x20column\x20%s\x20to\x20%s',_0x3c8f82,_0x839ec7);})[_0x402b4b('0x1e')](function(_0x469120){const _0x95068e=_0x402b4b;logger[_0x95068e('0x13')](JSON[_0x95068e('0x1')](_0x469120));});});},Migration[_0x150d8c('0x1a')]['dropTable']=function(_0x363f8b){const _0x5dd8d0=_0x150d8c,_0x50bb50=this;this['sequence'][_0x5dd8d0('0x21')](function(){const _0x5cc235=_0x5dd8d0;return _0x50bb50[_0x5cc235('0x27')][_0x5cc235('0x6')](_0x363f8b,{'force':!![]})['then'](function(){const _0x20ce0e=_0x5cc235;logger[_0x20ce0e('0x13')](_0x20ce0e('0x19'),_0x363f8b);})['catch'](function(_0x2a2996){logger['info'](JSON['stringify'](_0x2a2996));});});},Migration[_0x150d8c('0x1a')][_0x150d8c('0xc')]=function(_0x54b0b8,_0x575855,_0x6ac06b){const _0x3d4744=_0x150d8c,_0x53be21=this;this[_0x3d4744('0xf')]['enqueue'](function(){const _0x49e985=_0x3d4744;return _0x53be21[_0x49e985('0x27')]['addIndex'](_0x54b0b8,_0x575855,{'indexName':_0x6ac06b})['then'](function(){const _0x21890b=_0x49e985;logger['info']('addIndex\x20%s\x20%s\x20%s',_0x54b0b8,_0x575855[_0x21890b('0x9')](','),_0x6ac06b);})[_0x49e985('0x1e')](function(_0x42dfba){const _0x1350b0=_0x49e985;logger[_0x1350b0('0x13')](JSON[_0x1350b0('0x1')](_0x42dfba));});});},Migration[_0x150d8c('0x1a')][_0x150d8c('0xe')]=function(_0x413d0e){const _0xefc31d=_0x150d8c,_0x2ff799=this;this[_0xefc31d('0xf')]['enqueue'](function(){const _0x2ebbca=_0xefc31d;return _0x2ff799[_0x2ebbca('0x27')][_0x2ebbca('0x1c')][_0x2ebbca('0xe')](_0x413d0e)[_0x2ebbca('0xa')](function(){const _0x2f5faf=_0x2ebbca;logger[_0x2f5faf('0x13')](_0x2f5faf('0x1f'),_0x413d0e);})[_0x2ebbca('0x1e')](function(_0x55dfd1){const _0x11d978=_0x2ebbca;logger[_0x11d978('0x13')](JSON[_0x11d978('0x1')](_0x55dfd1));});});},Migration[_0x150d8c('0x1a')][_0x150d8c('0x18')]=function(_0x31ba66,_0x2576ba){const _0x296b83=_0x150d8c,_0x3cdcd3=this;this[_0x296b83('0xf')][_0x296b83('0x21')](function(){const _0x3854bb=_0x296b83;return _0x3cdcd3[_0x3854bb('0x27')][_0x3854bb('0x18')](_0x31ba66,_0x2576ba)[_0x3854bb('0xa')](function(){logger['info']('Removed\x20column\x20%s\x20from\x20%s',_0x2576ba,_0x31ba66);})[_0x3854bb('0x1e')](function(_0x563cd7){const _0x5d2414=_0x3854bb;logger[_0x5d2414('0x13')](util[_0x5d2414('0x7')](_0x563cd7,{'showHidden':![],'depth':null}));});});},Migration[_0x150d8c('0x1a')][_0x150d8c('0x20')]=function(_0x4aa833){const _0x59d033=_0x150d8c;this[_0x59d033('0xf')][_0x59d033('0x21')](function(){return _0x4aa833();});},module['exports']={'up':function(_0x1658b9,_0x3a073c){return new Promise(function(_0x3458ce){const _0x24da0b=a926_0x37d5,_0x327588=new Migration(_0x1658b9);_0x327588[_0x24da0b('0xe')](_0x24da0b('0x22')),_0x327588[_0x24da0b('0x18')](_0x24da0b('0x28'),_0x24da0b('0x16')),_0x327588[_0x24da0b('0x0')](_0x24da0b('0x1d'),_0x24da0b('0x25'),{'type':_0x3a073c[_0x24da0b('0xd')](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}}),_0x327588[_0x24da0b('0x18')](_0x24da0b('0x1d'),_0x24da0b('0xe')),_0x327588[_0x24da0b('0x18')](_0x24da0b('0x1d'),_0x24da0b('0x15')),_0x327588['addColumn']('dashboard_items',_0x24da0b('0x3'),{'type':_0x3a073c['STRING'](0x14),'validate':{'len':[0x0,0x14]}}),_0x327588['addColumn'](_0x24da0b('0x1d'),_0x24da0b('0x5'),{'type':_0x3a073c[_0x24da0b('0x14')](_0x24da0b('0x2'))}),_0x327588['addColumn']('sms_messages',_0x24da0b('0x12'),{'type':_0x3a073c[_0x24da0b('0xb')],'defaultValue':![]}),_0x327588['addColumn'](_0x24da0b('0x10'),'formSubmitSuccessMessage',{'type':_0x3a073c[_0x24da0b('0xd')],'defaultValue':_0x24da0b('0x26')}),_0x327588[_0x24da0b('0x11')]('chat_websites','formSubmitFailureMessage',{'type':_0x3a073c[_0x24da0b('0xd')],'defaultValue':_0x24da0b('0x8')}),_0x327588[_0x24da0b('0x20')](_0x3458ce);});},'down':function(){}};