Built motion from commit be44e1e4d16f8b29d243415b03d27262d8601e0e. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.84.js
1 const a963_0x321a=['addIndex','prototype','sequence','removeColumn','final','removeIndex','sequelize','tail','../config/logger','addColumn','stringify','finally','then','inspect','queryInterface','util','query\x20%s','changeColumn','info','catch','Added\x20column\x20%s\x20to\x20%s','renameColumn','migration','table\x20dropped\x20%s','join','enqueue','Removed\x20column\x20%s\x20from\x20%s','exports','query','Changed\x20column\x20%s\x20in\x20table\x20%s'];(function(_0x581a92,_0x321a59){const _0x3dbdb3=function(_0x33f8f8){while(--_0x33f8f8){_0x581a92['push'](_0x581a92['shift']());}};_0x3dbdb3(++_0x321a59);}(a963_0x321a,0x175));const a963_0x3dbd=function(_0x581a92,_0x321a59){_0x581a92=_0x581a92-0x0;let _0x3dbdb3=a963_0x321a[_0x581a92];return _0x3dbdb3;};const _0x406867=a963_0x3dbd;'use strict';const util=require(_0x406867('0x2')),logger=require(_0x406867('0x19'))(_0x406867('0x9')),Sequence=function(){};Sequence[_0x406867('0x12')][_0x406867('0xc')]=function(_0x33f8f8){const _0xc855ce=_0x406867;this[_0xc855ce('0x18')]=this[_0xc855ce('0x18')]?this[_0xc855ce('0x18')][_0xc855ce('0x1c')](_0x33f8f8):_0x33f8f8();};const Migration=function(_0x141b3c){const _0x26d1c9=_0x406867;this[_0x26d1c9('0x1')]=_0x141b3c,this[_0x26d1c9('0x13')]=new Sequence();};Migration[_0x406867('0x12')][_0x406867('0x4')]=function(_0x4b15b9,_0x4d32fd,_0x3091c9){const _0x4539e8=_0x406867,_0x2679c7=this;this[_0x4539e8('0x13')][_0x4539e8('0xc')](function(){const _0x3e64b4=_0x4539e8;return _0x2679c7[_0x3e64b4('0x1')]['changeColumn'](_0x4b15b9,_0x4d32fd,_0x3091c9)[_0x3e64b4('0x1d')](function(){const _0x23aadd=_0x3e64b4;logger[_0x23aadd('0x5')](_0x23aadd('0x10'),_0x4d32fd,_0x4b15b9);})[_0x3e64b4('0x6')](function(_0x16e693){const _0x55e96a=_0x3e64b4;logger[_0x55e96a('0x5')](JSON[_0x55e96a('0x1b')](_0x16e693));});});},Migration[_0x406867('0x12')][_0x406867('0x1a')]=function(_0x44e44a,_0x57d819,_0x46d284){const _0x545867=_0x406867,_0x41a62c=this;this['sequence'][_0x545867('0xc')](function(){const _0x2c42cb=_0x545867;return _0x41a62c[_0x2c42cb('0x1')]['addColumn'](_0x44e44a,_0x57d819,_0x46d284)[_0x2c42cb('0x1d')](function(){const _0x41a60c=_0x2c42cb;logger['info'](_0x41a60c('0x7'),_0x57d819,_0x44e44a);})['catch'](function(_0x5c83fa){const _0x8e3520=_0x2c42cb;logger[_0x8e3520('0x5')](JSON[_0x8e3520('0x1b')](_0x5c83fa));});});},Migration[_0x406867('0x12')]['dropTable']=function(_0x1ca937){const _0x264888=_0x406867,_0x55164b=this;this['sequence'][_0x264888('0xc')](function(){const _0x235da0=_0x264888;return _0x55164b[_0x235da0('0x1')]['dropTable'](_0x1ca937,{'force':!![]})[_0x235da0('0x1d')](function(){const _0x47bb33=_0x235da0;logger['info'](_0x47bb33('0xa'),_0x1ca937);})[_0x235da0('0x6')](function(_0x29a1d3){const _0x3b316a=_0x235da0;logger[_0x3b316a('0x5')](JSON[_0x3b316a('0x1b')](_0x29a1d3));});});},Migration[_0x406867('0x12')][_0x406867('0x11')]=function(_0x3b5f22,_0x4c9af8,_0x38d923){const _0x245881=_0x406867,_0x1344d3=this;this[_0x245881('0x13')][_0x245881('0xc')](function(){const _0x2a5d8f=_0x245881;return _0x1344d3[_0x2a5d8f('0x1')][_0x2a5d8f('0x11')](_0x3b5f22,_0x4c9af8,{'indexName':_0x38d923})['then'](function(){const _0x83d81f=_0x2a5d8f;logger[_0x83d81f('0x5')]('addIndex\x20%s\x20%s\x20%s',_0x3b5f22,_0x4c9af8[_0x83d81f('0xb')](','),_0x38d923);})[_0x2a5d8f('0x6')](function(_0x8f7f31){const _0x116d81=_0x2a5d8f;logger[_0x116d81('0x5')](JSON[_0x116d81('0x1b')](_0x8f7f31));});});},Migration[_0x406867('0x12')][_0x406867('0x16')]=function(_0x4a38ef,_0x243f1e){const _0x50d305=_0x406867,_0x385c1c=this;this[_0x50d305('0x13')]['enqueue'](function(){const _0x58b2a7=_0x50d305;return _0x385c1c[_0x58b2a7('0x1')]['removeIndex'](_0x4a38ef,_0x243f1e)[_0x58b2a7('0x1d')](function(){const _0xe18789=_0x58b2a7;logger[_0xe18789('0x5')]('removeIndex\x20%s\x20%s',_0x4a38ef,_0x243f1e);})[_0x58b2a7('0x6')](function(_0x2d1e71){const _0x1d73d7=_0x58b2a7;logger[_0x1d73d7('0x5')](JSON[_0x1d73d7('0x1b')](_0x2d1e71));});});},Migration[_0x406867('0x12')]['query']=function(_0x4dfbcf){const _0x3d8b23=_0x406867,_0x38dd5a=this;this[_0x3d8b23('0x13')]['enqueue'](function(){const _0x218387=_0x3d8b23;return _0x38dd5a[_0x218387('0x1')][_0x218387('0x17')][_0x218387('0xf')](_0x4dfbcf)[_0x218387('0x1d')](function(){const _0x5eadb3=_0x218387;logger[_0x5eadb3('0x5')](_0x5eadb3('0x3'),_0x4dfbcf);})[_0x218387('0x6')](function(_0x218bf4){const _0x5a0228=_0x218387;logger[_0x5a0228('0x5')](JSON['stringify'](_0x218bf4));});});},Migration[_0x406867('0x12')]['removeColumn']=function(_0x3c59ac,_0x777216){const _0x2cf8ec=_0x406867,_0x17f153=this;this[_0x2cf8ec('0x13')][_0x2cf8ec('0xc')](function(){const _0x580a1a=_0x2cf8ec;return _0x17f153['queryInterface'][_0x580a1a('0x14')](_0x3c59ac,_0x777216)[_0x580a1a('0x1d')](function(){const _0x555722=_0x580a1a;logger[_0x555722('0x5')](_0x555722('0xd'),_0x777216,_0x3c59ac);})[_0x580a1a('0x6')](function(_0x391985){const _0x2d3a27=_0x580a1a;logger[_0x2d3a27('0x5')](util['inspect'](_0x391985,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x406867('0x8')]=function(_0x5f30fe,_0x30c543,_0x12feea){const _0x98e814=this;this['sequence']['enqueue'](function(){return _0x98e814['queryInterface']['renameColumn'](_0x5f30fe,_0x30c543,_0x12feea)['then'](function(){const _0x24d989=a963_0x3dbd;logger[_0x24d989('0x5')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x30c543,_0x12feea,_0x5f30fe);})['catch'](function(_0x41b90e){const _0xcef8ee=a963_0x3dbd;logger[_0xcef8ee('0x5')](util[_0xcef8ee('0x0')](_0x41b90e,{'showHidden':![],'depth':null}));});});},Migration[_0x406867('0x12')]['final']=function(_0x583bc3){this['sequence']['enqueue'](function(){return _0x583bc3();});},module[_0x406867('0xe')]={'up':function(_0xa61815){return new Promise(function(_0x40411c){const _0x404638=a963_0x3dbd,_0x5a4438=new Migration(_0xa61815);_0x5a4438[_0x404638('0x15')](_0x40411c);});},'down':function(){}};