6c30216d553e1e05d0c855a211501182b38387a0
[motion-next.git] / server / migrations / 2.5.3.js
1 const a1016_0x2335=['enqueue','query','stringify','addIndex','removeColumn','addColumn','removeIndex\x20%s\x20%s','indicesType','query\x20%s','final','changeColumn','then','color_button','Changed\x20column\x20%s\x20in\x20table\x20%s','color','sequence','info','tail','Added\x20column\x20%s\x20to\x20%s','migration','inspect','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','indexName','prototype','catch','sequelize','queryInterface','renameColumn','#011F6A','chat_websites','removeIndex'];(function(_0x95f4f0,_0x233593){const _0x46a0f5=function(_0x1c393f){while(--_0x1c393f){_0x95f4f0['push'](_0x95f4f0['shift']());}};_0x46a0f5(++_0x233593);}(a1016_0x2335,0x159));const a1016_0x46a0=function(_0x95f4f0,_0x233593){_0x95f4f0=_0x95f4f0-0x0;let _0x46a0f5=a1016_0x2335[_0x95f4f0];return _0x46a0f5;};const _0x598cc9=a1016_0x46a0;'use strict';const util=require('util'),logger=require('../config/logger')(_0x598cc9('0xf')),Sequence=function(){};Sequence[_0x598cc9('0x13')][_0x598cc9('0x1b')]=function(_0x1c393f){const _0xaaa7fb=_0x598cc9;this[_0xaaa7fb('0xd')]=this[_0xaaa7fb('0xd')]?this['tail']['finally'](_0x1c393f):_0x1c393f();};const Migration=function(_0x160a64){const _0x16d575=_0x598cc9;this[_0x16d575('0x16')]=_0x160a64,this[_0x16d575('0xb')]=new Sequence();};Migration[_0x598cc9('0x13')][_0x598cc9('0x6')]=function(_0x15edf9,_0x2fbe2a,_0x23906a){const _0x2dd805=_0x598cc9,_0x43ee41=this;this[_0x2dd805('0xb')][_0x2dd805('0x1b')](function(){const _0xfdee14=_0x2dd805;return _0x43ee41[_0xfdee14('0x16')][_0xfdee14('0x6')](_0x15edf9,_0x2fbe2a,_0x23906a)[_0xfdee14('0x7')](function(){const _0x5e6d06=_0xfdee14;logger['info'](_0x5e6d06('0x9'),_0x2fbe2a,_0x15edf9);})['catch'](function(_0x4f59d2){const _0x5a5fd4=_0xfdee14;logger['info'](JSON[_0x5a5fd4('0x1d')](_0x4f59d2));});});},Migration['prototype']['addColumn']=function(_0xda0c8e,_0x51abd0,_0x36b90b){const _0x1258bb=_0x598cc9,_0x4f6d51=this;this[_0x1258bb('0xb')][_0x1258bb('0x1b')](function(){const _0x588c83=_0x1258bb;return _0x4f6d51[_0x588c83('0x16')][_0x588c83('0x1')](_0xda0c8e,_0x51abd0,_0x36b90b)[_0x588c83('0x7')](function(){const _0x379b8c=_0x588c83;logger[_0x379b8c('0xc')](_0x379b8c('0xe'),_0x51abd0,_0xda0c8e);})[_0x588c83('0x14')](function(_0x9db0e1){const _0x4a0744=_0x588c83;logger[_0x4a0744('0xc')](JSON['stringify'](_0x9db0e1));});});},Migration['prototype']['dropTable']=function(_0x558566){const _0x5152f3=_0x598cc9,_0x53a1da=this;this[_0x5152f3('0xb')]['enqueue'](function(){const _0x406010=_0x5152f3;return _0x53a1da[_0x406010('0x16')]['dropTable'](_0x558566,{'force':!![]})[_0x406010('0x7')](function(){const _0x3f4b85=_0x406010;logger[_0x3f4b85('0xc')]('table\x20dropped\x20%s',_0x558566);})['catch'](function(_0x402703){logger['info'](JSON['stringify'](_0x402703));});});},Migration[_0x598cc9('0x13')][_0x598cc9('0x1e')]=function(_0x5991fb,_0x5b9a64,_0x4dc4e2){const _0x207b80=_0x598cc9,_0x5b78f4=this;this['sequence'][_0x207b80('0x1b')](function(){const _0x2b9a53=_0x207b80;return _0x5b78f4[_0x2b9a53('0x16')][_0x2b9a53('0x1e')](_0x5991fb,_0x5b9a64,{'indexName':_0x4dc4e2['indexName'],'indicesType':_0x4dc4e2['indicesType']})[_0x2b9a53('0x7')](function(){const _0x4987d0=_0x2b9a53;logger['info']('addIndex\x20%s\x20%s\x20%s\x20[%s]',_0x5991fb,_0x5b9a64['join'](','),_0x4dc4e2[_0x4987d0('0x12')],_0x4dc4e2[_0x4987d0('0x3')]);})[_0x2b9a53('0x14')](function(_0x2c5dd9){const _0x2331fe=_0x2b9a53;logger[_0x2331fe('0xc')](JSON[_0x2331fe('0x1d')](_0x2c5dd9));});});},Migration[_0x598cc9('0x13')][_0x598cc9('0x1a')]=function(_0x8ecaae,_0x5035fb){const _0x49c037=this;this['sequence']['enqueue'](function(){const _0x5cd005=a1016_0x46a0;return _0x49c037[_0x5cd005('0x16')][_0x5cd005('0x1a')](_0x8ecaae,_0x5035fb)['then'](function(){const _0x3f758a=_0x5cd005;logger[_0x3f758a('0xc')](_0x3f758a('0x2'),_0x8ecaae,_0x5035fb);})[_0x5cd005('0x14')](function(_0x541737){const _0x257a88=_0x5cd005;logger[_0x257a88('0xc')](JSON[_0x257a88('0x1d')](_0x541737));});});},Migration[_0x598cc9('0x13')][_0x598cc9('0x1c')]=function(_0x4eb4c1){const _0x31947f=_0x598cc9,_0xa7a389=this;this[_0x31947f('0xb')][_0x31947f('0x1b')](function(){const _0x2115b1=_0x31947f;return _0xa7a389[_0x2115b1('0x16')][_0x2115b1('0x15')][_0x2115b1('0x1c')](_0x4eb4c1)[_0x2115b1('0x7')](function(){const _0x4d25a6=_0x2115b1;logger[_0x4d25a6('0xc')](_0x4d25a6('0x4'),_0x4eb4c1);})[_0x2115b1('0x14')](function(_0x3e3cfe){const _0x1a12a3=_0x2115b1;logger[_0x1a12a3('0xc')](JSON[_0x1a12a3('0x1d')](_0x3e3cfe));});});},Migration[_0x598cc9('0x13')][_0x598cc9('0x0')]=function(_0x1774e0,_0x3def0b){const _0x5f5c94=_0x598cc9,_0x25315c=this;this[_0x5f5c94('0xb')][_0x5f5c94('0x1b')](function(){const _0x310937=_0x5f5c94;return _0x25315c[_0x310937('0x16')][_0x310937('0x0')](_0x1774e0,_0x3def0b)[_0x310937('0x7')](function(){const _0xfee591=_0x310937;logger[_0xfee591('0xc')]('Removed\x20column\x20%s\x20from\x20%s',_0x3def0b,_0x1774e0);})[_0x310937('0x14')](function(_0x19a3c4){const _0x1eb219=_0x310937;logger[_0x1eb219('0xc')](util[_0x1eb219('0x10')](_0x19a3c4,{'showHidden':![],'depth':null}));});});},Migration[_0x598cc9('0x13')][_0x598cc9('0x17')]=function(_0x40193b,_0x916261,_0x18290c){const _0x4f460b=_0x598cc9,_0xcb1099=this;this[_0x4f460b('0xb')][_0x4f460b('0x1b')](function(){const _0x5a0c7f=_0x4f460b;return _0xcb1099[_0x5a0c7f('0x16')][_0x5a0c7f('0x17')](_0x40193b,_0x916261,_0x18290c)[_0x5a0c7f('0x7')](function(){const _0x7a473c=_0x5a0c7f;logger['info'](_0x7a473c('0x11'),_0x916261,_0x18290c,_0x40193b);})[_0x5a0c7f('0x14')](function(_0x55b74d){const _0x4cb8f1=_0x5a0c7f;logger[_0x4cb8f1('0xc')](util['inspect'](_0x55b74d,{'showHidden':![],'depth':null}));});});},Migration[_0x598cc9('0x13')][_0x598cc9('0x5')]=function(_0x5ec07a){const _0x51d311=_0x598cc9;this[_0x51d311('0xb')][_0x51d311('0x1b')](function(){return _0x5ec07a();});},module['exports']={'up':function(_0x2f727d,_0x237dfa){return new Promise(function(_0x561f18){const _0x3ec4b0=a1016_0x46a0,_0x23c46c=new Migration(_0x2f727d);_0x23c46c['changeColumn'](_0x3ec4b0('0x19'),_0x3ec4b0('0xa'),{'type':_0x237dfa['STRING'],'allowNull':![],'defaultValue':_0x3ec4b0('0x18'),'validate':{'notEmpty':!![]}}),_0x23c46c[_0x3ec4b0('0x6')](_0x3ec4b0('0x19'),_0x3ec4b0('0x8'),{'type':_0x237dfa['STRING'],'allowNull':![],'defaultValue':_0x3ec4b0('0x18'),'validate':{'notEmpty':!![]}}),_0x23c46c['final'](_0x561f18);});},'down':function(){}};