3ea3ba934cdc36b9022035e02adfb610e3dd9091
[motion-next.git] / server / migrations / 2.0.37.js
1 const a916_0x3b2a=['catch','exports','util','addColumn','info','Added\x20column\x20%s\x20to\x20%s','../config/logger','queryInterface','STRING','tail','removeColumn','final','table\x20dropped\x20%s','addIndex','enableUncompleteSave','inspect','sequelize','dropTable','query','then','sms_interactions','report_jscripty_sessions','migration','stringify','query\x20%s','finally','sms_messages','prototype','BOOLEAN','jscripty_projects','sequence','enqueue','changeColumn','Removed\x20column\x20%s\x20from\x20%s','completed'];(function(_0x527deb,_0x3b2a87){const _0x18f44e=function(_0x548d76){while(--_0x548d76){_0x527deb['push'](_0x527deb['shift']());}};_0x18f44e(++_0x3b2a87);}(a916_0x3b2a,0xf1));const a916_0x18f4=function(_0x527deb,_0x3b2a87){_0x527deb=_0x527deb-0x0;let _0x18f44e=a916_0x3b2a[_0x527deb];return _0x18f44e;};const _0xea26db=a916_0x18f4;'use strict';const logger=require(_0xea26db('0xa'))(_0xea26db('0x1a')),util=require(_0xea26db('0x6')),Sequence=function(){};Sequence['prototype'][_0xea26db('0x0')]=function(_0x548d76){const _0x5b86ca=_0xea26db;this[_0x5b86ca('0xd')]=this[_0x5b86ca('0xd')]?this[_0x5b86ca('0xd')][_0x5b86ca('0x1d')](_0x548d76):_0x548d76();};const Migration=function(_0x454b62){const _0x5d26c0=_0xea26db;this['queryInterface']=_0x454b62,this[_0x5d26c0('0x22')]=new Sequence();};Migration[_0xea26db('0x1f')][_0xea26db('0x1')]=function(_0x304a1f,_0x32a91e,_0x195d53){const _0x3878a6=_0xea26db,_0x1a311b=this;this[_0x3878a6('0x22')]['enqueue'](function(){const _0x5ab7d6=_0x3878a6;return _0x1a311b[_0x5ab7d6('0xb')][_0x5ab7d6('0x1')](_0x304a1f,_0x32a91e,_0x195d53)[_0x5ab7d6('0x17')](function(){const _0x552d3d=_0x5ab7d6;logger[_0x552d3d('0x8')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x32a91e,_0x304a1f);})[_0x5ab7d6('0x4')](function(_0xf9e25c){const _0x5c6ff9=_0x5ab7d6;logger[_0x5c6ff9('0x8')](JSON[_0x5c6ff9('0x1b')](_0xf9e25c));});});},Migration[_0xea26db('0x1f')]['addColumn']=function(_0xda67d8,_0x1136c7,_0x53d732){const _0xbfa0ef=_0xea26db,_0x581b39=this;this[_0xbfa0ef('0x22')][_0xbfa0ef('0x0')](function(){const _0x803163=_0xbfa0ef;return _0x581b39[_0x803163('0xb')]['addColumn'](_0xda67d8,_0x1136c7,_0x53d732)[_0x803163('0x17')](function(){const _0x1bb49e=_0x803163;logger[_0x1bb49e('0x8')](_0x1bb49e('0x9'),_0x1136c7,_0xda67d8);})[_0x803163('0x4')](function(_0x44c602){const _0x2b592e=_0x803163;logger[_0x2b592e('0x8')](JSON[_0x2b592e('0x1b')](_0x44c602));});});},Migration[_0xea26db('0x1f')][_0xea26db('0x15')]=function(_0x5552df){const _0x337809=_0xea26db,_0x3fdba1=this;this[_0x337809('0x22')][_0x337809('0x0')](function(){const _0x1b85b6=_0x337809;return _0x3fdba1[_0x1b85b6('0xb')][_0x1b85b6('0x15')](_0x5552df,{'force':!![]})['then'](function(){const _0x2f5114=_0x1b85b6;logger[_0x2f5114('0x8')](_0x2f5114('0x10'),_0x5552df);})['catch'](function(_0x550149){const _0x4c623f=_0x1b85b6;logger[_0x4c623f('0x8')](JSON[_0x4c623f('0x1b')](_0x550149));});});},Migration[_0xea26db('0x1f')][_0xea26db('0x11')]=function(_0x4c5e10,_0x389abf,_0x3d9619){const _0x34698e=_0xea26db,_0x3ce3f4=this;this[_0x34698e('0x22')][_0x34698e('0x0')](function(){const _0x302f90=_0x34698e;return _0x3ce3f4['queryInterface'][_0x302f90('0x11')](_0x4c5e10,_0x389abf,{'indexName':_0x3d9619})['then'](function(){const _0x52a8a4=_0x302f90;logger[_0x52a8a4('0x8')]('addIndex\x20%s\x20%s\x20%s',_0x4c5e10,_0x389abf['join'](','),_0x3d9619);})[_0x302f90('0x4')](function(_0x4095a0){const _0x327b8f=_0x302f90;logger[_0x327b8f('0x8')](JSON[_0x327b8f('0x1b')](_0x4095a0));});});},Migration[_0xea26db('0x1f')][_0xea26db('0x16')]=function(_0x3c3829){const _0x5eb3cc=_0xea26db,_0x52785f=this;this[_0x5eb3cc('0x22')]['enqueue'](function(){const _0x33d209=_0x5eb3cc;return _0x52785f[_0x33d209('0xb')][_0x33d209('0x14')][_0x33d209('0x16')](_0x3c3829)[_0x33d209('0x17')](function(){const _0x1b8af0=_0x33d209;logger[_0x1b8af0('0x8')](_0x1b8af0('0x1c'),_0x3c3829);})[_0x33d209('0x4')](function(_0x48a9e7){const _0x4cd626=_0x33d209;logger[_0x4cd626('0x8')](JSON[_0x4cd626('0x1b')](_0x48a9e7));});});},Migration['prototype'][_0xea26db('0xe')]=function(_0x5edf80,_0x5ba326){const _0xe34204=_0xea26db,_0x495303=this;this[_0xe34204('0x22')][_0xe34204('0x0')](function(){const _0x27d79a=_0xe34204;return _0x495303[_0x27d79a('0xb')]['removeColumn'](_0x5edf80,_0x5ba326)[_0x27d79a('0x17')](function(){const _0x16d0fd=_0x27d79a;logger['info'](_0x16d0fd('0x2'),_0x5ba326,_0x5edf80);})[_0x27d79a('0x4')](function(_0x41b38b){const _0x57c512=_0x27d79a;logger[_0x57c512('0x8')](util[_0x57c512('0x13')](_0x41b38b,{'showHidden':![],'depth':null}));});});},Migration['prototype']['final']=function(_0x5c0593){const _0x5902e4=_0xea26db;this[_0x5902e4('0x22')]['enqueue'](function(){return _0x5c0593();});},module[_0xea26db('0x5')]={'up':function(_0x38704d,_0x44bb42){return new Promise(function(_0x3e13cd){const _0x537460=a916_0x18f4,_0x11661d=new Migration(_0x38704d);_0x11661d['addColumn'](_0x537460('0x21'),_0x537460('0x12'),{'type':_0x44bb42[_0x537460('0x20')],'defaultValue':!![]}),_0x11661d[_0x537460('0x7')](_0x537460('0x19'),_0x537460('0x3'),{'type':_0x44bb42['BOOLEAN'],'defaultValue':![]}),_0x11661d[_0x537460('0x16')]('UPDATE\x20report_jscripty_sessions\x20SET\x20completed\x20=\x20true'),_0x11661d[_0x537460('0x7')](_0x537460('0x18'),'phone',{'type':_0x44bb42[_0x537460('0xc')]}),_0x11661d[_0x537460('0x7')](_0x537460('0x1e'),'phone',{'type':_0x44bb42[_0x537460('0xc')]}),_0x11661d[_0x537460('0xf')](_0x3e13cd);});},'down':function(){}};