96d6eeb0d4b2a191d14f3f82fa4e8c2466fbbfbd
[motion-next.git] / server / migrations / 2.5.3.js
1 const a1016_0x2794=['removeIndex','finally','#011F6A','addColumn','chat_websites','color_button','../config/logger','info','renameColumn','removeColumn','Removed\x20column\x20%s\x20from\x20%s','indexName','STRING','queryInterface','tail','addIndex','removeIndex\x20%s\x20%s','indicesType','table\x20dropped\x20%s','Changed\x20column\x20%s\x20in\x20table\x20%s','then','sequelize','stringify','color','changeColumn','enqueue','catch','addIndex\x20%s\x20%s\x20%s\x20[%s]','inspect','prototype','Added\x20column\x20%s\x20to\x20%s','util','query','final','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','dropTable','sequence','query\x20%s'];(function(_0x434f0d,_0x27940c){const _0x35bc93=function(_0x417773){while(--_0x417773){_0x434f0d['push'](_0x434f0d['shift']());}};_0x35bc93(++_0x27940c);}(a1016_0x2794,0x113));const a1016_0x35bc=function(_0x434f0d,_0x27940c){_0x434f0d=_0x434f0d-0x0;let _0x35bc93=a1016_0x2794[_0x434f0d];return _0x35bc93;};const _0x40bebb=a1016_0x35bc;'use strict';const util=require(_0x40bebb('0x16')),logger=require(_0x40bebb('0x23'))('migration'),Sequence=function(){};Sequence[_0x40bebb('0x14')][_0x40bebb('0x10')]=function(_0x417773){const _0x13a3c9=_0x40bebb;this[_0x13a3c9('0x5')]=this['tail']?this[_0x13a3c9('0x5')][_0x13a3c9('0x1e')](_0x417773):_0x417773();};const Migration=function(_0x50c8a8){const _0x324064=_0x40bebb;this[_0x324064('0x4')]=_0x50c8a8,this['sequence']=new Sequence();};Migration[_0x40bebb('0x14')][_0x40bebb('0xf')]=function(_0x67ddc6,_0x34552e,_0x4d5c89){const _0x3872c8=_0x40bebb,_0x4d23e4=this;this[_0x3872c8('0x1b')][_0x3872c8('0x10')](function(){const _0x17a09e=_0x3872c8;return _0x4d23e4['queryInterface'][_0x17a09e('0xf')](_0x67ddc6,_0x34552e,_0x4d5c89)['then'](function(){const _0xcbc798=_0x17a09e;logger[_0xcbc798('0x24')](_0xcbc798('0xa'),_0x34552e,_0x67ddc6);})[_0x17a09e('0x11')](function(_0x3a6c9f){const _0xd40ba2=_0x17a09e;logger[_0xd40ba2('0x24')](JSON[_0xd40ba2('0xd')](_0x3a6c9f));});});},Migration[_0x40bebb('0x14')][_0x40bebb('0x20')]=function(_0x1ee374,_0x2e49bd,_0x5b19b7){const _0x480aa7=_0x40bebb,_0x4b790b=this;this[_0x480aa7('0x1b')][_0x480aa7('0x10')](function(){const _0xea1ac7=_0x480aa7;return _0x4b790b[_0xea1ac7('0x4')]['addColumn'](_0x1ee374,_0x2e49bd,_0x5b19b7)[_0xea1ac7('0xb')](function(){const _0x315477=_0xea1ac7;logger[_0x315477('0x24')](_0x315477('0x15'),_0x2e49bd,_0x1ee374);})[_0xea1ac7('0x11')](function(_0x260c0b){const _0x3eb962=_0xea1ac7;logger[_0x3eb962('0x24')](JSON[_0x3eb962('0xd')](_0x260c0b));});});},Migration[_0x40bebb('0x14')]['dropTable']=function(_0x19a2c6){const _0x28d2ab=_0x40bebb,_0x5ab786=this;this[_0x28d2ab('0x1b')]['enqueue'](function(){const _0x4e273a=_0x28d2ab;return _0x5ab786['queryInterface'][_0x4e273a('0x1a')](_0x19a2c6,{'force':!![]})[_0x4e273a('0xb')](function(){const _0x45552a=_0x4e273a;logger[_0x45552a('0x24')](_0x45552a('0x9'),_0x19a2c6);})[_0x4e273a('0x11')](function(_0x30c280){const _0x2db4ab=_0x4e273a;logger[_0x2db4ab('0x24')](JSON[_0x2db4ab('0xd')](_0x30c280));});});},Migration[_0x40bebb('0x14')][_0x40bebb('0x6')]=function(_0x381ea7,_0x3bc5ea,_0x4cfc18){const _0xfb59d8=_0x40bebb,_0x2b3523=this;this[_0xfb59d8('0x1b')][_0xfb59d8('0x10')](function(){const _0xed57fe=_0xfb59d8;return _0x2b3523['queryInterface'][_0xed57fe('0x6')](_0x381ea7,_0x3bc5ea,{'indexName':_0x4cfc18[_0xed57fe('0x2')],'indicesType':_0x4cfc18['indicesType']})[_0xed57fe('0xb')](function(){const _0x214264=_0xed57fe;logger[_0x214264('0x24')](_0x214264('0x12'),_0x381ea7,_0x3bc5ea['join'](','),_0x4cfc18['indexName'],_0x4cfc18[_0x214264('0x8')]);})[_0xed57fe('0x11')](function(_0x49769c){const _0x2d8106=_0xed57fe;logger[_0x2d8106('0x24')](JSON[_0x2d8106('0xd')](_0x49769c));});});},Migration[_0x40bebb('0x14')]['removeIndex']=function(_0x119651,_0x323f18){const _0x58acad=_0x40bebb,_0x4a3b52=this;this[_0x58acad('0x1b')][_0x58acad('0x10')](function(){const _0x5c7f=_0x58acad;return _0x4a3b52['queryInterface'][_0x5c7f('0x1d')](_0x119651,_0x323f18)[_0x5c7f('0xb')](function(){const _0x15e5d8=_0x5c7f;logger[_0x15e5d8('0x24')](_0x15e5d8('0x7'),_0x119651,_0x323f18);})[_0x5c7f('0x11')](function(_0xeedb77){const _0x2fa4f1=_0x5c7f;logger[_0x2fa4f1('0x24')](JSON['stringify'](_0xeedb77));});});},Migration[_0x40bebb('0x14')]['query']=function(_0x38e608){const _0x126bab=_0x40bebb,_0x483d0a=this;this['sequence'][_0x126bab('0x10')](function(){const _0x528638=_0x126bab;return _0x483d0a[_0x528638('0x4')][_0x528638('0xc')][_0x528638('0x17')](_0x38e608)['then'](function(){const _0x50b242=_0x528638;logger['info'](_0x50b242('0x1c'),_0x38e608);})[_0x528638('0x11')](function(_0x54d607){const _0x45ebaf=_0x528638;logger[_0x45ebaf('0x24')](JSON[_0x45ebaf('0xd')](_0x54d607));});});},Migration[_0x40bebb('0x14')][_0x40bebb('0x0')]=function(_0x36b6da,_0x49af95){const _0x5df12b=_0x40bebb,_0x453079=this;this[_0x5df12b('0x1b')][_0x5df12b('0x10')](function(){const _0x1d9836=_0x5df12b;return _0x453079[_0x1d9836('0x4')][_0x1d9836('0x0')](_0x36b6da,_0x49af95)[_0x1d9836('0xb')](function(){const _0x32664b=_0x1d9836;logger[_0x32664b('0x24')](_0x32664b('0x1'),_0x49af95,_0x36b6da);})[_0x1d9836('0x11')](function(_0x24f849){const _0x32a3c1=_0x1d9836;logger[_0x32a3c1('0x24')](util['inspect'](_0x24f849,{'showHidden':![],'depth':null}));});});},Migration[_0x40bebb('0x14')][_0x40bebb('0x25')]=function(_0x1064dc,_0x375b66,_0x4dc042){const _0x2e0fb8=_0x40bebb,_0x118b28=this;this[_0x2e0fb8('0x1b')]['enqueue'](function(){const _0x180d90=_0x2e0fb8;return _0x118b28[_0x180d90('0x4')][_0x180d90('0x25')](_0x1064dc,_0x375b66,_0x4dc042)[_0x180d90('0xb')](function(){const _0x2ee582=_0x180d90;logger[_0x2ee582('0x24')](_0x2ee582('0x19'),_0x375b66,_0x4dc042,_0x1064dc);})[_0x180d90('0x11')](function(_0x5c4a28){const _0x11cc7f=_0x180d90;logger[_0x11cc7f('0x24')](util[_0x11cc7f('0x13')](_0x5c4a28,{'showHidden':![],'depth':null}));});});},Migration[_0x40bebb('0x14')][_0x40bebb('0x18')]=function(_0x101e45){const _0x17efda=_0x40bebb;this[_0x17efda('0x1b')][_0x17efda('0x10')](function(){return _0x101e45();});},module['exports']={'up':function(_0x5b3d0e,_0xd13347){return new Promise(function(_0x59db97){const _0x532dbf=a1016_0x35bc,_0x55f6bd=new Migration(_0x5b3d0e);_0x55f6bd['changeColumn'](_0x532dbf('0x21'),_0x532dbf('0xe'),{'type':_0xd13347[_0x532dbf('0x3')],'allowNull':![],'defaultValue':_0x532dbf('0x1f'),'validate':{'notEmpty':!![]}}),_0x55f6bd[_0x532dbf('0xf')]('chat_websites',_0x532dbf('0x22'),{'type':_0xd13347[_0x532dbf('0x3')],'allowNull':![],'defaultValue':'#011F6A','validate':{'notEmpty':!![]}}),_0x55f6bd[_0x532dbf('0x18')](_0x59db97);});},'down':function(){}};