703eb8e9b5427a1380eec88410c05095f36c9f7d
[motion-next.git] / server / migrations / 2.0.47.js
1 const a926_0x317d=['finally','interval','migration','Added\x20column\x20%s\x20to\x20%s','long','Changed\x20column\x20%s\x20in\x20table\x20%s','enqueue','then','addColumn','dropTable','query\x20%s','info','attrs','../config/logger','TEXT','sms_messages','catch','secret','table\x20dropped\x20%s','addIndex','sequence','data','util','final','query','exports','stringify','removeColumn','BOOLEAN','tail','changeColumn','STRING','prototype','Form\x20submission\x20error','dashboard_items','chat_websites','DELETE\x20FROM\x20dashboards','join','queryInterface'];(function(_0x3d9b6f,_0x317d8a){const _0x33e8bd=function(_0x993269){while(--_0x993269){_0x3d9b6f['push'](_0x3d9b6f['shift']());}};_0x33e8bd(++_0x317d8a);}(a926_0x317d,0x1ee));const a926_0x33e8=function(_0x3d9b6f,_0x317d8a){_0x3d9b6f=_0x3d9b6f-0x0;let _0x33e8bd=a926_0x317d[_0x3d9b6f];return _0x33e8bd;};const _0x51510d=a926_0x33e8;'use strict';const logger=require(_0x51510d('0x1a'))(_0x51510d('0xf')),util=require(_0x51510d('0x23')),Sequence=function(){};Sequence[_0x51510d('0x6')][_0x51510d('0x13')]=function(_0x993269){const _0x3e1360=_0x51510d;this[_0x3e1360('0x3')]=this['tail']?this[_0x3e1360('0x3')][_0x3e1360('0xd')](_0x993269):_0x993269();};const Migration=function(_0x51388d){const _0x3720ad=_0x51510d;this[_0x3720ad('0xc')]=_0x51388d,this[_0x3720ad('0x21')]=new Sequence();};Migration['prototype']['changeColumn']=function(_0x315ce1,_0x1f6fb8,_0x42224c){const _0x1cb958=_0x51510d,_0x55b33c=this;this['sequence'][_0x1cb958('0x13')](function(){const _0x5266c=_0x1cb958;return _0x55b33c[_0x5266c('0xc')][_0x5266c('0x4')](_0x315ce1,_0x1f6fb8,_0x42224c)[_0x5266c('0x14')](function(){const _0x5c0339=_0x5266c;logger[_0x5c0339('0x18')](_0x5c0339('0x12'),_0x1f6fb8,_0x315ce1);})[_0x5266c('0x1d')](function(_0x21d0b7){const _0x26dec3=_0x5266c;logger['info'](JSON[_0x26dec3('0x0')](_0x21d0b7));});});},Migration['prototype'][_0x51510d('0x15')]=function(_0xf1d69d,_0x55794e,_0x518ac4){const _0x3da747=_0x51510d,_0x38c8cd=this;this[_0x3da747('0x21')][_0x3da747('0x13')](function(){const _0xf7968e=_0x3da747;return _0x38c8cd[_0xf7968e('0xc')]['addColumn'](_0xf1d69d,_0x55794e,_0x518ac4)[_0xf7968e('0x14')](function(){const _0x17ad69=_0xf7968e;logger[_0x17ad69('0x18')](_0x17ad69('0x10'),_0x55794e,_0xf1d69d);})[_0xf7968e('0x1d')](function(_0x252a22){const _0x31dd82=_0xf7968e;logger[_0x31dd82('0x18')](JSON['stringify'](_0x252a22));});});},Migration['prototype'][_0x51510d('0x16')]=function(_0x9e8bf4){const _0x16a40f=_0x51510d,_0x35ac11=this;this[_0x16a40f('0x21')][_0x16a40f('0x13')](function(){const _0xbb7259=_0x16a40f;return _0x35ac11[_0xbb7259('0xc')][_0xbb7259('0x16')](_0x9e8bf4,{'force':!![]})['then'](function(){const _0x498519=_0xbb7259;logger[_0x498519('0x18')](_0x498519('0x1f'),_0x9e8bf4);})[_0xbb7259('0x1d')](function(_0x1268e7){const _0x135a7e=_0xbb7259;logger[_0x135a7e('0x18')](JSON['stringify'](_0x1268e7));});});},Migration['prototype'][_0x51510d('0x20')]=function(_0x117232,_0x24a78c,_0x14599c){const _0x2c37a0=_0x51510d,_0x5873ea=this;this[_0x2c37a0('0x21')]['enqueue'](function(){const _0x125f1e=_0x2c37a0;return _0x5873ea[_0x125f1e('0xc')][_0x125f1e('0x20')](_0x117232,_0x24a78c,{'indexName':_0x14599c})[_0x125f1e('0x14')](function(){const _0x42f076=_0x125f1e;logger[_0x42f076('0x18')]('addIndex\x20%s\x20%s\x20%s',_0x117232,_0x24a78c[_0x42f076('0xb')](','),_0x14599c);})[_0x125f1e('0x1d')](function(_0xa2a308){const _0xad7555=_0x125f1e;logger['info'](JSON[_0xad7555('0x0')](_0xa2a308));});});},Migration[_0x51510d('0x6')]['query']=function(_0x4896af){const _0x3ccc81=_0x51510d,_0x41abcc=this;this[_0x3ccc81('0x21')][_0x3ccc81('0x13')](function(){const _0x5eeef3=_0x3ccc81;return _0x41abcc[_0x5eeef3('0xc')]['sequelize'][_0x5eeef3('0x25')](_0x4896af)[_0x5eeef3('0x14')](function(){const _0x542853=_0x5eeef3;logger[_0x542853('0x18')](_0x542853('0x17'),_0x4896af);})[_0x5eeef3('0x1d')](function(_0x29e9d0){const _0x37111d=_0x5eeef3;logger[_0x37111d('0x18')](JSON['stringify'](_0x29e9d0));});});},Migration[_0x51510d('0x6')][_0x51510d('0x1')]=function(_0x356c1a,_0x4a2f59){const _0x5a070c=_0x51510d,_0xb59865=this;this[_0x5a070c('0x21')][_0x5a070c('0x13')](function(){const _0x5e9de7=_0x5a070c;return _0xb59865[_0x5e9de7('0xc')]['removeColumn'](_0x356c1a,_0x4a2f59)[_0x5e9de7('0x14')](function(){logger['info']('Removed\x20column\x20%s\x20from\x20%s',_0x4a2f59,_0x356c1a);})[_0x5e9de7('0x1d')](function(_0x22d7ce){const _0x31f52c=_0x5e9de7;logger[_0x31f52c('0x18')](util['inspect'](_0x22d7ce,{'showHidden':![],'depth':null}));});});},Migration[_0x51510d('0x6')][_0x51510d('0x24')]=function(_0xbc23d2){const _0x1ef5a5=_0x51510d;this[_0x1ef5a5('0x21')][_0x1ef5a5('0x13')](function(){return _0xbc23d2();});},module[_0x51510d('0x26')]={'up':function(_0x462b4a,_0x45cece){return new Promise(function(_0x2ea529){const _0x432c99=a926_0x33e8,_0x224f37=new Migration(_0x462b4a);_0x224f37['query'](_0x432c99('0xa')),_0x224f37['removeColumn']('dashboards',_0x432c99('0xe')),_0x224f37[_0x432c99('0x4')](_0x432c99('0x8'),'type',{'type':_0x45cece[_0x432c99('0x5')](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}}),_0x224f37[_0x432c99('0x1')](_0x432c99('0x8'),'query'),_0x224f37[_0x432c99('0x1')](_0x432c99('0x8'),_0x432c99('0x22')),_0x224f37[_0x432c99('0x15')](_0x432c99('0x8'),'title',{'type':_0x45cece[_0x432c99('0x5')](0x14),'validate':{'len':[0x0,0x14]}}),_0x224f37[_0x432c99('0x15')](_0x432c99('0x8'),_0x432c99('0x19'),{'type':_0x45cece[_0x432c99('0x1b')](_0x432c99('0x11'))}),_0x224f37['addColumn'](_0x432c99('0x1c'),_0x432c99('0x1e'),{'type':_0x45cece[_0x432c99('0x2')],'defaultValue':![]}),_0x224f37[_0x432c99('0x15')](_0x432c99('0x9'),'formSubmitSuccessMessage',{'type':_0x45cece[_0x432c99('0x5')],'defaultValue':'Form\x20properly\x20submitted'}),_0x224f37[_0x432c99('0x15')](_0x432c99('0x9'),'formSubmitFailureMessage',{'type':_0x45cece[_0x432c99('0x5')],'defaultValue':_0x432c99('0x7')}),_0x224f37['final'](_0x2ea529);});},'down':function(){}};