4d1e56aa0a5b294f3deaa8829a1a90a775bb3349
[motion-next.git] / server / migrations / 2.4.13.js
1 const a996_0x53df=['query','prototype','jscripty_projects','tail','BOOLEAN','inspect','queryInterface','../config/logger','sequelize','info','dropTable','enqueue','catch','indexName','addIndex\x20%s\x20%s\x20%s\x20[%s]','stringify','final','query\x20%s','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','sequence','table\x20dropped\x20%s','removeIndex','indicesType','sendUnpauseOnSubmit','addIndex','then','changeColumn','addColumn','removeColumn','renameColumn','join'];(function(_0x370815,_0x53df91){const _0x49efd0=function(_0x4b7acc){while(--_0x4b7acc){_0x370815['push'](_0x370815['shift']());}};_0x49efd0(++_0x53df91);}(a996_0x53df,0x18e));const a996_0x49ef=function(_0x370815,_0x53df91){_0x370815=_0x370815-0x0;let _0x49efd0=a996_0x53df[_0x370815];return _0x49efd0;};const _0x2ed84d=a996_0x49ef;'use strict';const util=require('util'),logger=require(_0x2ed84d('0xc'))('migration'),Sequence=function(){};Sequence[_0x2ed84d('0x6')][_0x2ed84d('0x10')]=function(_0x4b7acc){const _0xf57814=_0x2ed84d;this[_0xf57814('0x8')]=this[_0xf57814('0x8')]?this[_0xf57814('0x8')]['finally'](_0x4b7acc):_0x4b7acc();};const Migration=function(_0x4c85b8){const _0x3a654e=_0x2ed84d;this[_0x3a654e('0xb')]=_0x4c85b8,this[_0x3a654e('0x18')]=new Sequence();};Migration[_0x2ed84d('0x6')]['changeColumn']=function(_0x474334,_0x5f49c0,_0x1cab08){const _0x337dcb=_0x2ed84d,_0x48034a=this;this[_0x337dcb('0x18')][_0x337dcb('0x10')](function(){const _0x72afc8=_0x337dcb;return _0x48034a['queryInterface'][_0x72afc8('0x0')](_0x474334,_0x5f49c0,_0x1cab08)[_0x72afc8('0x1e')](function(){const _0x50673d=_0x72afc8;logger[_0x50673d('0xe')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x5f49c0,_0x474334);})[_0x72afc8('0x11')](function(_0xde239){const _0x4a2e2d=_0x72afc8;logger[_0x4a2e2d('0xe')](JSON[_0x4a2e2d('0x14')](_0xde239));});});},Migration[_0x2ed84d('0x6')]['addColumn']=function(_0xd37072,_0x113689,_0x2235dd){const _0x5d94dd=_0x2ed84d,_0x4d8d00=this;this[_0x5d94dd('0x18')][_0x5d94dd('0x10')](function(){const _0x363ab6=_0x5d94dd;return _0x4d8d00[_0x363ab6('0xb')][_0x363ab6('0x1')](_0xd37072,_0x113689,_0x2235dd)[_0x363ab6('0x1e')](function(){const _0x5774ac=_0x363ab6;logger[_0x5774ac('0xe')]('Added\x20column\x20%s\x20to\x20%s',_0x113689,_0xd37072);})[_0x363ab6('0x11')](function(_0xc7baa1){const _0x45a298=_0x363ab6;logger[_0x45a298('0xe')](JSON[_0x45a298('0x14')](_0xc7baa1));});});},Migration['prototype'][_0x2ed84d('0xf')]=function(_0x4a5df4){const _0x2a8866=_0x2ed84d,_0x44023e=this;this[_0x2a8866('0x18')]['enqueue'](function(){const _0x2038cd=_0x2a8866;return _0x44023e['queryInterface'][_0x2038cd('0xf')](_0x4a5df4,{'force':!![]})['then'](function(){const _0x27b2bd=_0x2038cd;logger[_0x27b2bd('0xe')](_0x27b2bd('0x19'),_0x4a5df4);})[_0x2038cd('0x11')](function(_0x2e5b77){const _0x48fbf8=_0x2038cd;logger[_0x48fbf8('0xe')](JSON[_0x48fbf8('0x14')](_0x2e5b77));});});},Migration['prototype'][_0x2ed84d('0x1d')]=function(_0x2bb285,_0x20375c,_0x5b6731){const _0x36ded1=_0x2ed84d,_0x4b4649=this;this[_0x36ded1('0x18')][_0x36ded1('0x10')](function(){const _0x3285d5=_0x36ded1;return _0x4b4649[_0x3285d5('0xb')][_0x3285d5('0x1d')](_0x2bb285,_0x20375c,{'indexName':_0x5b6731['indexName'],'indicesType':_0x5b6731[_0x3285d5('0x1b')]})[_0x3285d5('0x1e')](function(){const _0x431c31=_0x3285d5;logger[_0x431c31('0xe')](_0x431c31('0x13'),_0x2bb285,_0x20375c[_0x431c31('0x4')](','),_0x5b6731[_0x431c31('0x12')],_0x5b6731[_0x431c31('0x1b')]);})[_0x3285d5('0x11')](function(_0x5c2b34){const _0x13d6d4=_0x3285d5;logger[_0x13d6d4('0xe')](JSON['stringify'](_0x5c2b34));});});},Migration[_0x2ed84d('0x6')][_0x2ed84d('0x1a')]=function(_0x49e8f4,_0x15a39b){const _0x54a2d=_0x2ed84d,_0x2c889c=this;this[_0x54a2d('0x18')][_0x54a2d('0x10')](function(){const _0x596adf=_0x54a2d;return _0x2c889c[_0x596adf('0xb')][_0x596adf('0x1a')](_0x49e8f4,_0x15a39b)[_0x596adf('0x1e')](function(){const _0x43380b=_0x596adf;logger[_0x43380b('0xe')]('removeIndex\x20%s\x20%s',_0x49e8f4,_0x15a39b);})[_0x596adf('0x11')](function(_0x1056a4){const _0x481033=_0x596adf;logger[_0x481033('0xe')](JSON[_0x481033('0x14')](_0x1056a4));});});},Migration['prototype'][_0x2ed84d('0x5')]=function(_0x28cca6){const _0x175ad9=_0x2ed84d,_0x1f267b=this;this[_0x175ad9('0x18')][_0x175ad9('0x10')](function(){const _0x581414=_0x175ad9;return _0x1f267b[_0x581414('0xb')][_0x581414('0xd')][_0x581414('0x5')](_0x28cca6)['then'](function(){const _0x51b2eb=_0x581414;logger[_0x51b2eb('0xe')](_0x51b2eb('0x16'),_0x28cca6);})[_0x581414('0x11')](function(_0x42d725){const _0x42145a=_0x581414;logger[_0x42145a('0xe')](JSON[_0x42145a('0x14')](_0x42d725));});});},Migration['prototype'][_0x2ed84d('0x2')]=function(_0x4766db,_0x4e5224){const _0x39a189=_0x2ed84d,_0xccf32e=this;this[_0x39a189('0x18')]['enqueue'](function(){const _0x2701c1=_0x39a189;return _0xccf32e[_0x2701c1('0xb')][_0x2701c1('0x2')](_0x4766db,_0x4e5224)[_0x2701c1('0x1e')](function(){const _0x7c0f6d=_0x2701c1;logger[_0x7c0f6d('0xe')]('Removed\x20column\x20%s\x20from\x20%s',_0x4e5224,_0x4766db);})['catch'](function(_0x2dad96){const _0x11bc7b=_0x2701c1;logger[_0x11bc7b('0xe')](util[_0x11bc7b('0xa')](_0x2dad96,{'showHidden':![],'depth':null}));});});},Migration[_0x2ed84d('0x6')][_0x2ed84d('0x3')]=function(_0x5e2978,_0x218f3b,_0x20cd90){const _0x4df2a9=_0x2ed84d,_0x2160fb=this;this['sequence'][_0x4df2a9('0x10')](function(){const _0xe25585=_0x4df2a9;return _0x2160fb['queryInterface'][_0xe25585('0x3')](_0x5e2978,_0x218f3b,_0x20cd90)[_0xe25585('0x1e')](function(){const _0x5063bc=_0xe25585;logger[_0x5063bc('0xe')](_0x5063bc('0x17'),_0x218f3b,_0x20cd90,_0x5e2978);})[_0xe25585('0x11')](function(_0x1b05fd){const _0xd81204=_0xe25585;logger[_0xd81204('0xe')](util[_0xd81204('0xa')](_0x1b05fd,{'showHidden':![],'depth':null}));});});},Migration[_0x2ed84d('0x6')]['final']=function(_0x58b035){const _0x36c5d8=_0x2ed84d;this[_0x36c5d8('0x18')][_0x36c5d8('0x10')](function(){return _0x58b035();});},module['exports']={'up':function(_0x5cb3b8,_0xb6a1b6){return new Promise(function(_0x11de2a){const _0x38259e=a996_0x49ef,_0x41ba9d=new Migration(_0x5cb3b8);_0x41ba9d['addColumn'](_0x38259e('0x7'),_0x38259e('0x1c'),{'type':_0xb6a1b6[_0x38259e('0x9')],'defaultValue':![]}),_0x41ba9d[_0x38259e('0x15')](_0x11de2a);});},'down':function(){}};