62604e072cf146872ad6818e8be9aa917de6b87f
[motion-next.git] / server / migrations / 2.0.13.js
1 const a892_0x19f3=['renameColumn','migration','rescheduled','reschedule','removeColumn','info','../config/logger','stringify','catch','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','addColumn','cm_hopper_final','DATE','deleted','exports','prototype','users','Added\x20column\x20%s\x20to\x20%s','phoneBarRingInUse','then','queryInterface','deletedat'];(function(_0x385a97,_0x19f31f){const _0x4dd8ce=function(_0xd86065){while(--_0xd86065){_0x385a97['push'](_0x385a97['shift']());}};_0x4dd8ce(++_0x19f31f);}(a892_0x19f3,0x92));const a892_0x4dd8=function(_0x385a97,_0x19f31f){_0x385a97=_0x385a97-0x0;let _0x4dd8ce=a892_0x19f3[_0x385a97];return _0x4dd8ce;};const _0x4832b0=a892_0x4dd8;'use strict';const logger=require(_0x4832b0('0xe'))(_0x4832b0('0x9')),Migration=function(_0xd86065){this['queryInterface']=_0xd86065;};Migration[_0x4832b0('0x1')][_0x4832b0('0x12')]=function(_0x156ffb,_0x4b0b6f,_0x447772){const _0x438622=_0x4832b0;return this[_0x438622('0x6')][_0x438622('0x12')](_0x156ffb,_0x4b0b6f,_0x447772)[_0x438622('0x5')](function(){const _0x7048=_0x438622;logger['info'](_0x7048('0x3'),_0x4b0b6f,_0x156ffb);})['catch'](function(_0x301c26){const _0x2caebe=_0x438622;logger[_0x2caebe('0xd')](JSON[_0x2caebe('0xf')](_0x301c26));});},Migration[_0x4832b0('0x1')][_0x4832b0('0xc')]=function(_0x2c5325,_0x318369){const _0x5b399d=_0x4832b0;return this[_0x5b399d('0x6')]['removeColumn'](_0x2c5325,_0x318369)[_0x5b399d('0x5')](function(){logger['info']('Removed\x20column\x20%s\x20from\x20%s',_0x318369,_0x2c5325);})[_0x5b399d('0x10')](function(_0x1d912c){const _0x51d808=_0x5b399d;logger[_0x51d808('0xd')](JSON[_0x51d808('0xf')](_0x1d912c));});},Migration[_0x4832b0('0x1')]['renameColumn']=function(_0x10b35d,_0x5e5b13,_0x217867){const _0x54cf93=_0x4832b0;return this['queryInterface']['renameColumn'](_0x10b35d,_0x5e5b13,_0x217867)['then'](function(){const _0x590dba=a892_0x4dd8;logger[_0x590dba('0xd')](_0x590dba('0x11'),_0x5e5b13,_0x217867,_0x10b35d);})[_0x54cf93('0x10')](function(_0x3c75f0){const _0x554885=_0x54cf93;logger[_0x554885('0xd')](JSON[_0x554885('0xf')](_0x3c75f0));});},module[_0x4832b0('0x0')]={'up':function(_0x2bf93d,_0x527476){const _0xebd233=_0x4832b0,_0x2d0c3e=new Migration(_0x2bf93d);_0x2d0c3e[_0xebd233('0x12')](_0xebd233('0x13'),_0xebd233('0x7'),{'type':_0x527476[_0xebd233('0x14')]}),_0x2d0c3e[_0xebd233('0x12')](_0xebd233('0x2'),_0xebd233('0x4'),{'type':_0x527476['BOOLEAN'],'defaultValue':![]}),_0x2d0c3e[_0xebd233('0x12')](_0xebd233('0x13'),'deleted',{'type':_0x527476['STRING'],'defaultValue':null}),_0x2d0c3e[_0xebd233('0x8')](_0xebd233('0x13'),'reschedule',_0xebd233('0xa'));},'down':function(_0x494c8a,_0x4fbf20){const _0x1a2bbb=_0x4832b0,_0x4f983a=new Migration(_0x494c8a,_0x4fbf20);_0x4f983a[_0x1a2bbb('0xc')](_0x1a2bbb('0x2'),_0x1a2bbb('0x4')),_0x4f983a[_0x1a2bbb('0xc')](_0x1a2bbb('0x13'),'deletedat'),_0x4f983a['removeColumn'](_0x1a2bbb('0x13'),_0x1a2bbb('0x15')),_0x4f983a[_0x1a2bbb('0x8')](_0x1a2bbb('0x13'),'rescheduled',_0x1a2bbb('0xb'));}};