d7813745bd7138cbad2a73a744452e04ec83037b
[motion-next.git] / server / migrations / 2.0.37.js
1 const a1077_0x2468=['table\x20dropped\x20%s','sequelize','enqueue','addColumn','sequence','removeColumn','join','stringify','finally','exports','info','prototype','jscripty_projects','then','phone','../config/logger','STRING','Added\x20column\x20%s\x20to\x20%s','sms_messages','Changed\x20column\x20%s\x20in\x20table\x20%s','query\x20%s','query','addIndex','catch','queryInterface','enableUncompleteSave','final','tail','completed','sms_interactions','addIndex\x20%s\x20%s\x20%s','migration','changeColumn'];(function(_0x4eb53a,_0x33d7e6){const _0x2468c5=function(_0x3f658f){while(--_0x3f658f){_0x4eb53a['push'](_0x4eb53a['shift']());}};_0x2468c5(++_0x33d7e6);}(a1077_0x2468,0x7a));const a1077_0x3f65=function(_0x4eb53a,_0x33d7e6){_0x4eb53a=_0x4eb53a-0x90;let _0x2468c5=a1077_0x2468[_0x4eb53a];return _0x2468c5;};const a1077_0x5e35ef=a1077_0x3f65;'use strict';const logger=require(a1077_0x5e35ef(0xa9))(a1077_0x5e35ef(0x98)),util=require('util'),Sequence=function(){};Sequence['prototype'][a1077_0x5e35ef(0x9c)]=function(_0x100832){const _0x364f04=a1077_0x5e35ef;this['tail']=this[_0x364f04(0x94)]?this[_0x364f04(0x94)][_0x364f04(0xa2)](_0x100832):_0x100832();};const Migration=function(_0xddecfc){this['queryInterface']=_0xddecfc,this['sequence']=new Sequence();};Migration[a1077_0x5e35ef(0xa5)]['changeColumn']=function(_0x3b5444,_0xd0a7ec,_0x51f79e){const _0x456f4c=a1077_0x5e35ef,_0x5b5535=this;this[_0x456f4c(0x9e)][_0x456f4c(0x9c)](function(){const _0x190b11=_0x456f4c;return _0x5b5535['queryInterface'][_0x190b11(0x99)](_0x3b5444,_0xd0a7ec,_0x51f79e)[_0x190b11(0xa7)](function(){const _0x1ee075=_0x190b11;logger['info'](_0x1ee075(0xad),_0xd0a7ec,_0x3b5444);})[_0x190b11(0x90)](function(_0xc67b9a){const _0x31c91b=_0x190b11;logger[_0x31c91b(0xa4)](JSON[_0x31c91b(0xa1)](_0xc67b9a));});});},Migration['prototype'][a1077_0x5e35ef(0x9d)]=function(_0x5a7d99,_0x359ff9,_0x2cf93d){const _0x4c1de5=a1077_0x5e35ef,_0x139724=this;this[_0x4c1de5(0x9e)][_0x4c1de5(0x9c)](function(){const _0x21ad84=_0x4c1de5;return _0x139724[_0x21ad84(0x91)][_0x21ad84(0x9d)](_0x5a7d99,_0x359ff9,_0x2cf93d)[_0x21ad84(0xa7)](function(){const _0x361ac8=_0x21ad84;logger['info'](_0x361ac8(0xab),_0x359ff9,_0x5a7d99);})['catch'](function(_0x26373d){const _0x14662a=_0x21ad84;logger[_0x14662a(0xa4)](JSON[_0x14662a(0xa1)](_0x26373d));});});},Migration[a1077_0x5e35ef(0xa5)]['dropTable']=function(_0x47130a){const _0x3ee311=a1077_0x5e35ef,_0x4f9498=this;this[_0x3ee311(0x9e)]['enqueue'](function(){const _0x5f49ee=_0x3ee311;return _0x4f9498[_0x5f49ee(0x91)]['dropTable'](_0x47130a,{'force':!![]})[_0x5f49ee(0xa7)](function(){const _0x43dfce=_0x5f49ee;logger['info'](_0x43dfce(0x9a),_0x47130a);})[_0x5f49ee(0x90)](function(_0x3f1a5e){const _0x1745c9=_0x5f49ee;logger[_0x1745c9(0xa4)](JSON[_0x1745c9(0xa1)](_0x3f1a5e));});});},Migration[a1077_0x5e35ef(0xa5)][a1077_0x5e35ef(0xb0)]=function(_0x524d86,_0x562b03,_0x586047){const _0x53377b=a1077_0x5e35ef,_0x1c881e=this;this[_0x53377b(0x9e)][_0x53377b(0x9c)](function(){const _0x1cb3b0=_0x53377b;return _0x1c881e[_0x1cb3b0(0x91)][_0x1cb3b0(0xb0)](_0x524d86,_0x562b03,{'indexName':_0x586047})[_0x1cb3b0(0xa7)](function(){const _0x11bba5=_0x1cb3b0;logger[_0x11bba5(0xa4)](_0x11bba5(0x97),_0x524d86,_0x562b03[_0x11bba5(0xa0)](','),_0x586047);})[_0x1cb3b0(0x90)](function(_0x39d302){const _0x5735d3=_0x1cb3b0;logger[_0x5735d3(0xa4)](JSON['stringify'](_0x39d302));});});},Migration['prototype'][a1077_0x5e35ef(0xaf)]=function(_0x3caf20){const _0x4743b0=a1077_0x5e35ef,_0x38706c=this;this[_0x4743b0(0x9e)][_0x4743b0(0x9c)](function(){const _0x865aa9=_0x4743b0;return _0x38706c[_0x865aa9(0x91)][_0x865aa9(0x9b)][_0x865aa9(0xaf)](_0x3caf20)[_0x865aa9(0xa7)](function(){const _0x8e8adb=_0x865aa9;logger[_0x8e8adb(0xa4)](_0x8e8adb(0xae),_0x3caf20);})[_0x865aa9(0x90)](function(_0x3499ea){const _0x4b660a=_0x865aa9;logger[_0x4b660a(0xa4)](JSON[_0x4b660a(0xa1)](_0x3499ea));});});},Migration[a1077_0x5e35ef(0xa5)][a1077_0x5e35ef(0x9f)]=function(_0x5e6d87,_0x470567){const _0x5d171f=a1077_0x5e35ef,_0x47884c=this;this[_0x5d171f(0x9e)]['enqueue'](function(){const _0x69a59b=_0x5d171f;return _0x47884c['queryInterface'][_0x69a59b(0x9f)](_0x5e6d87,_0x470567)[_0x69a59b(0xa7)](function(){const _0x46b6d0=_0x69a59b;logger[_0x46b6d0(0xa4)]('Removed\x20column\x20%s\x20from\x20%s',_0x470567,_0x5e6d87);})['catch'](function(_0x499a88){logger['info'](util['inspect'](_0x499a88,{'showHidden':![],'depth':null}));});});},Migration[a1077_0x5e35ef(0xa5)][a1077_0x5e35ef(0x93)]=function(_0x28c467){const _0x2ec858=a1077_0x5e35ef;this[_0x2ec858(0x9e)][_0x2ec858(0x9c)](function(){return _0x28c467();});},module[a1077_0x5e35ef(0xa3)]={'up':function(_0xcdcb5b,_0x3aaf22){return new Promise(function(_0x263b11){const _0x14c6d4=a1077_0x3f65,_0x3b79e5=new Migration(_0xcdcb5b);_0x3b79e5[_0x14c6d4(0x9d)](_0x14c6d4(0xa6),_0x14c6d4(0x92),{'type':_0x3aaf22['BOOLEAN'],'defaultValue':!![]}),_0x3b79e5[_0x14c6d4(0x9d)]('report_jscripty_sessions',_0x14c6d4(0x95),{'type':_0x3aaf22['BOOLEAN'],'defaultValue':![]}),_0x3b79e5[_0x14c6d4(0xaf)]('UPDATE\x20report_jscripty_sessions\x20SET\x20completed\x20=\x20true'),_0x3b79e5[_0x14c6d4(0x9d)](_0x14c6d4(0x96),_0x14c6d4(0xa8),{'type':_0x3aaf22[_0x14c6d4(0xaa)]}),_0x3b79e5[_0x14c6d4(0x9d)](_0x14c6d4(0xac),_0x14c6d4(0xa8),{'type':_0x3aaf22[_0x14c6d4(0xaa)]}),_0x3b79e5[_0x14c6d4(0x93)](_0x263b11);});},'down':function(){}};