Built motion from commit 4a18b36e645f5fa4a517d36f9783bde259878164. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.84.js
1 const a962_0x8c56=['Removed\x20column\x20%s\x20from\x20%s','then','info','dropTable','exports','finally','inspect','table\x20dropped\x20%s','enqueue','../config/logger','final','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','queryInterface','removeColumn','addColumn','Changed\x20column\x20%s\x20in\x20table\x20%s','removeIndex','prototype','addIndex','util','removeIndex\x20%s\x20%s','renameColumn','stringify','addIndex\x20%s\x20%s\x20%s','changeColumn','query','Added\x20column\x20%s\x20to\x20%s','tail','sequence','catch'];(function(_0x3d2f15,_0x8c563d){const _0x329125=function(_0x24715b){while(--_0x24715b){_0x3d2f15['push'](_0x3d2f15['shift']());}};_0x329125(++_0x8c563d);}(a962_0x8c56,0x1b9));const a962_0x3291=function(_0x3d2f15,_0x8c563d){_0x3d2f15=_0x3d2f15-0x0;let _0x329125=a962_0x8c56[_0x3d2f15];return _0x329125;};const _0x2a5794=a962_0x3291;'use strict';const util=require(_0x2a5794('0x1c')),logger=require(_0x2a5794('0x12'))('migration'),Sequence=function(){};Sequence['prototype'][_0x2a5794('0x11')]=function(_0x24715b){const _0x49d2f0=_0x2a5794;this[_0x49d2f0('0x6')]=this['tail']?this[_0x49d2f0('0x6')][_0x49d2f0('0xe')](_0x24715b):_0x24715b();};const Migration=function(_0xd741d0){const _0x5f10ee=_0x2a5794;this[_0x5f10ee('0x15')]=_0xd741d0,this['sequence']=new Sequence();};Migration[_0x2a5794('0x1a')]['changeColumn']=function(_0x17657f,_0x2e0977,_0x25384e){const _0x2a93ab=_0x2a5794,_0xcff2a3=this;this[_0x2a93ab('0x7')][_0x2a93ab('0x11')](function(){const _0x5286db=_0x2a93ab;return _0xcff2a3['queryInterface'][_0x5286db('0x3')](_0x17657f,_0x2e0977,_0x25384e)['then'](function(){const _0x4ead30=_0x5286db;logger[_0x4ead30('0xb')](_0x4ead30('0x18'),_0x2e0977,_0x17657f);})[_0x5286db('0x8')](function(_0x38419c){const _0x104ad1=_0x5286db;logger[_0x104ad1('0xb')](JSON['stringify'](_0x38419c));});});},Migration[_0x2a5794('0x1a')]['addColumn']=function(_0x33fc9d,_0x242b66,_0x45dfaa){const _0x517dc3=_0x2a5794,_0x58c8bb=this;this['sequence'][_0x517dc3('0x11')](function(){const _0x452e55=_0x517dc3;return _0x58c8bb[_0x452e55('0x15')][_0x452e55('0x17')](_0x33fc9d,_0x242b66,_0x45dfaa)[_0x452e55('0xa')](function(){const _0x544d4a=_0x452e55;logger['info'](_0x544d4a('0x5'),_0x242b66,_0x33fc9d);})[_0x452e55('0x8')](function(_0x3bd987){const _0x58d9a4=_0x452e55;logger[_0x58d9a4('0xb')](JSON[_0x58d9a4('0x1')](_0x3bd987));});});},Migration[_0x2a5794('0x1a')][_0x2a5794('0xc')]=function(_0x41e2b5){const _0x53c7bd=_0x2a5794,_0x1d0401=this;this[_0x53c7bd('0x7')][_0x53c7bd('0x11')](function(){const _0x2ae55f=_0x53c7bd;return _0x1d0401['queryInterface']['dropTable'](_0x41e2b5,{'force':!![]})['then'](function(){const _0x5239c3=a962_0x3291;logger[_0x5239c3('0xb')](_0x5239c3('0x10'),_0x41e2b5);})[_0x2ae55f('0x8')](function(_0x4ffc57){const _0x56fa78=_0x2ae55f;logger[_0x56fa78('0xb')](JSON[_0x56fa78('0x1')](_0x4ffc57));});});},Migration[_0x2a5794('0x1a')][_0x2a5794('0x1b')]=function(_0x399320,_0x52c340,_0x6f1ab1){const _0x2438b8=_0x2a5794,_0x1e5a58=this;this[_0x2438b8('0x7')][_0x2438b8('0x11')](function(){const _0x4b8920=_0x2438b8;return _0x1e5a58[_0x4b8920('0x15')][_0x4b8920('0x1b')](_0x399320,_0x52c340,{'indexName':_0x6f1ab1})[_0x4b8920('0xa')](function(){const _0x4bf368=_0x4b8920;logger['info'](_0x4bf368('0x2'),_0x399320,_0x52c340['join'](','),_0x6f1ab1);})[_0x4b8920('0x8')](function(_0x3a1d3d){const _0xcecf8b=_0x4b8920;logger[_0xcecf8b('0xb')](JSON[_0xcecf8b('0x1')](_0x3a1d3d));});});},Migration['prototype'][_0x2a5794('0x19')]=function(_0x52bae5,_0x5c3c7f){const _0x335c85=_0x2a5794,_0x43011a=this;this[_0x335c85('0x7')][_0x335c85('0x11')](function(){const _0x28e179=_0x335c85;return _0x43011a['queryInterface']['removeIndex'](_0x52bae5,_0x5c3c7f)[_0x28e179('0xa')](function(){const _0x34a1ac=_0x28e179;logger[_0x34a1ac('0xb')](_0x34a1ac('0x1d'),_0x52bae5,_0x5c3c7f);})[_0x28e179('0x8')](function(_0x525fdc){const _0x2b5b96=_0x28e179;logger[_0x2b5b96('0xb')](JSON[_0x2b5b96('0x1')](_0x525fdc));});});},Migration[_0x2a5794('0x1a')]['query']=function(_0x47816f){const _0x5139f3=_0x2a5794,_0x47197c=this;this[_0x5139f3('0x7')]['enqueue'](function(){const _0x130cbb=_0x5139f3;return _0x47197c['queryInterface']['sequelize'][_0x130cbb('0x4')](_0x47816f)[_0x130cbb('0xa')](function(){const _0x4c0221=_0x130cbb;logger[_0x4c0221('0xb')]('query\x20%s',_0x47816f);})[_0x130cbb('0x8')](function(_0x1008c8){const _0x1c5e3d=_0x130cbb;logger[_0x1c5e3d('0xb')](JSON[_0x1c5e3d('0x1')](_0x1008c8));});});},Migration['prototype'][_0x2a5794('0x16')]=function(_0x435295,_0x67adda){const _0x865e48=_0x2a5794,_0x3f9627=this;this['sequence'][_0x865e48('0x11')](function(){const _0x5c8e94=_0x865e48;return _0x3f9627[_0x5c8e94('0x15')][_0x5c8e94('0x16')](_0x435295,_0x67adda)[_0x5c8e94('0xa')](function(){const _0x3c0a7d=_0x5c8e94;logger['info'](_0x3c0a7d('0x9'),_0x67adda,_0x435295);})[_0x5c8e94('0x8')](function(_0x2ac52c){const _0x3a29e6=_0x5c8e94;logger[_0x3a29e6('0xb')](util[_0x3a29e6('0xf')](_0x2ac52c,{'showHidden':![],'depth':null}));});});},Migration[_0x2a5794('0x1a')][_0x2a5794('0x0')]=function(_0x875809,_0x52a27a,_0x8c7812){const _0x30fc1c=_0x2a5794,_0x2fdea8=this;this[_0x30fc1c('0x7')][_0x30fc1c('0x11')](function(){const _0x4c3b87=_0x30fc1c;return _0x2fdea8['queryInterface'][_0x4c3b87('0x0')](_0x875809,_0x52a27a,_0x8c7812)[_0x4c3b87('0xa')](function(){const _0x4c5eff=_0x4c3b87;logger[_0x4c5eff('0xb')](_0x4c5eff('0x14'),_0x52a27a,_0x8c7812,_0x875809);})[_0x4c3b87('0x8')](function(_0x2e6446){const _0x291ff3=_0x4c3b87;logger[_0x291ff3('0xb')](util['inspect'](_0x2e6446,{'showHidden':![],'depth':null}));});});},Migration[_0x2a5794('0x1a')][_0x2a5794('0x13')]=function(_0x1bf65f){const _0x6f8706=_0x2a5794;this[_0x6f8706('0x7')][_0x6f8706('0x11')](function(){return _0x1bf65f();});},module[_0x2a5794('0xd')]={'up':function(_0x3c48d5){return new Promise(function(_0x5ada70){const _0x43bc66=a962_0x3291,_0x3bd120=new Migration(_0x3c48d5);_0x3bd120[_0x43bc66('0x13')](_0x5ada70);});},'down':function(){}};