cc6d148c2cbcf0e21be6fc5b93fba296396688da
[motion-next.git] / server / migrations / 2.0.61.js
1 const a940_0x3c53=['catch','migration','finally','changeColumn','addIndex','Changed\x20column\x20%s\x20in\x20table\x20%s','prototype','query\x20%s','renameColumn','Removed\x20column\x20%s\x20from\x20%s','info','dropTable','inspect','addIndex\x20%s\x20%s\x20%s','tail','sequence','then','removeColumn','enqueue','Added\x20column\x20%s\x20to\x20%s','stringify','addColumn','queryInterface','sequelize','join'];(function(_0x3d8be4,_0x3c53fc){const _0x2375ee=function(_0x1277b5){while(--_0x1277b5){_0x3d8be4['push'](_0x3d8be4['shift']());}};_0x2375ee(++_0x3c53fc);}(a940_0x3c53,0x17d));const a940_0x2375=function(_0x3d8be4,_0x3c53fc){_0x3d8be4=_0x3d8be4-0x0;let _0x2375ee=a940_0x3c53[_0x3d8be4];return _0x2375ee;};const _0x50c9ac=a940_0x2375;'use strict';const util=require('util'),logger=require('../config/logger')(_0x50c9ac('0x14')),Sequence=function(){};Sequence[_0x50c9ac('0x0')][_0x50c9ac('0xc')]=function(_0x1277b5){const _0x10aa54=_0x50c9ac;this[_0x10aa54('0x8')]=this[_0x10aa54('0x8')]?this[_0x10aa54('0x8')][_0x10aa54('0x15')](_0x1277b5):_0x1277b5();};const Migration=function(_0x69a129){const _0x327e45=_0x50c9ac;this['queryInterface']=_0x69a129,this[_0x327e45('0x9')]=new Sequence();};Migration[_0x50c9ac('0x0')][_0x50c9ac('0x16')]=function(_0x3217f4,_0x19b15e,_0x3ae95e){const _0x5a55cf=_0x50c9ac,_0xf6cf1d=this;this[_0x5a55cf('0x9')][_0x5a55cf('0xc')](function(){const _0x36c3ee=_0x5a55cf;return _0xf6cf1d[_0x36c3ee('0x10')][_0x36c3ee('0x16')](_0x3217f4,_0x19b15e,_0x3ae95e)[_0x36c3ee('0xa')](function(){const _0x353495=_0x36c3ee;logger[_0x353495('0x4')](_0x353495('0x18'),_0x19b15e,_0x3217f4);})[_0x36c3ee('0x13')](function(_0x462bcc){const _0x2b98d1=_0x36c3ee;logger[_0x2b98d1('0x4')](JSON[_0x2b98d1('0xe')](_0x462bcc));});});},Migration['prototype'][_0x50c9ac('0xf')]=function(_0x4cbf84,_0x3bef93,_0x3b93c2){const _0x5f0107=_0x50c9ac,_0x327c63=this;this[_0x5f0107('0x9')][_0x5f0107('0xc')](function(){const _0x1c12f2=_0x5f0107;return _0x327c63[_0x1c12f2('0x10')][_0x1c12f2('0xf')](_0x4cbf84,_0x3bef93,_0x3b93c2)[_0x1c12f2('0xa')](function(){const _0x207088=_0x1c12f2;logger[_0x207088('0x4')](_0x207088('0xd'),_0x3bef93,_0x4cbf84);})[_0x1c12f2('0x13')](function(_0x4c143c){const _0x27bf1a=_0x1c12f2;logger[_0x27bf1a('0x4')](JSON['stringify'](_0x4c143c));});});},Migration['prototype'][_0x50c9ac('0x5')]=function(_0x4247d8){const _0x3df4a5=_0x50c9ac,_0x32e303=this;this[_0x3df4a5('0x9')][_0x3df4a5('0xc')](function(){const _0x59dfa4=_0x3df4a5;return _0x32e303[_0x59dfa4('0x10')][_0x59dfa4('0x5')](_0x4247d8,{'force':!![]})[_0x59dfa4('0xa')](function(){logger['info']('table\x20dropped\x20%s',_0x4247d8);})[_0x59dfa4('0x13')](function(_0x5afa01){const _0xe7ccdf=_0x59dfa4;logger['info'](JSON[_0xe7ccdf('0xe')](_0x5afa01));});});},Migration[_0x50c9ac('0x0')][_0x50c9ac('0x17')]=function(_0xbd2c8,_0x45f1e0,_0x226699){const _0x1797b1=_0x50c9ac,_0x924201=this;this[_0x1797b1('0x9')][_0x1797b1('0xc')](function(){const _0x5b272d=_0x1797b1;return _0x924201['queryInterface'][_0x5b272d('0x17')](_0xbd2c8,_0x45f1e0,{'indexName':_0x226699})['then'](function(){const _0x503de1=_0x5b272d;logger['info'](_0x503de1('0x7'),_0xbd2c8,_0x45f1e0[_0x503de1('0x12')](','),_0x226699);})[_0x5b272d('0x13')](function(_0x5bcabf){const _0x1474dd=_0x5b272d;logger['info'](JSON[_0x1474dd('0xe')](_0x5bcabf));});});},Migration[_0x50c9ac('0x0')]['query']=function(_0x2c1404){const _0x4721e2=_0x50c9ac,_0x598fc2=this;this[_0x4721e2('0x9')]['enqueue'](function(){const _0x12dc51=_0x4721e2;return _0x598fc2[_0x12dc51('0x10')][_0x12dc51('0x11')]['query'](_0x2c1404)[_0x12dc51('0xa')](function(){const _0x5712f9=_0x12dc51;logger[_0x5712f9('0x4')](_0x5712f9('0x1'),_0x2c1404);})[_0x12dc51('0x13')](function(_0x116e79){const _0x34f6df=_0x12dc51;logger[_0x34f6df('0x4')](JSON[_0x34f6df('0xe')](_0x116e79));});});},Migration[_0x50c9ac('0x0')][_0x50c9ac('0xb')]=function(_0x4855c1,_0x3d1c9a){const _0x567587=_0x50c9ac,_0x161cf7=this;this[_0x567587('0x9')][_0x567587('0xc')](function(){const _0x233c89=_0x567587;return _0x161cf7[_0x233c89('0x10')][_0x233c89('0xb')](_0x4855c1,_0x3d1c9a)[_0x233c89('0xa')](function(){const _0xad76f8=_0x233c89;logger[_0xad76f8('0x4')](_0xad76f8('0x3'),_0x3d1c9a,_0x4855c1);})[_0x233c89('0x13')](function(_0x5ba09b){const _0x89b174=_0x233c89;logger[_0x89b174('0x4')](util[_0x89b174('0x6')](_0x5ba09b,{'showHidden':![],'depth':null}));});});},Migration[_0x50c9ac('0x0')][_0x50c9ac('0x2')]=function(_0x4040be,_0x3a11df,_0x27bc10){const _0x1e42e2=_0x50c9ac,_0x17355e=this;this[_0x1e42e2('0x9')][_0x1e42e2('0xc')](function(){const _0x30d165=_0x1e42e2;return _0x17355e[_0x30d165('0x10')][_0x30d165('0x2')](_0x4040be,_0x3a11df,_0x27bc10)[_0x30d165('0xa')](function(){const _0x30ecac=_0x30d165;logger[_0x30ecac('0x4')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x3a11df,_0x27bc10,_0x4040be);})[_0x30d165('0x13')](function(_0x28fd9e){const _0x41efea=_0x30d165;logger['info'](util[_0x41efea('0x6')](_0x28fd9e,{'showHidden':![],'depth':null}));});});},Migration[_0x50c9ac('0x0')]['final']=function(_0x1517ec){const _0xe380b3=_0x50c9ac;this[_0xe380b3('0x9')][_0xe380b3('0xc')](function(){return _0x1517ec();});},module['exports']={'up':function(_0x491354){return new Promise(function(_0x27098f){const _0x53b26e=new Migration(_0x491354);_0x53b26e['final'](_0x27098f);});},'down':function(){}};