Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / migrations / 2.4.16.js
1 'use strict';const a1171_0x1cb1=['util','final','608796yDgGvb','738305puWKZM','renameColumn','9976BGSmci','1269527cBCvUG','tail','indicesType','576744bBLsiX','info','inspect','catch','sequence','40456zlgmXl','then','table\x20dropped\x20%s','migration','prototype','indexName','finally','addIndex\x20%s\x20%s\x20%s\x20[%s]','email','removeIndex','1HKwNwh','mobile','removeColumn','cm_contacts','lastName','stringify','fax','dropTable','phone','changeColumn','FULLTEXT','addColumn','query','firstName','enqueue','queryInterface','173904Xnsqgl','addIndex','Added\x20column\x20%s\x20to\x20%s','removeIndex\x20%s\x20%s','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s'];const a1171_0x386a=function(_0x55e372,_0x32b406){_0x55e372=_0x55e372-0x8c;let _0x1cb1bf=a1171_0x1cb1[_0x55e372];return _0x1cb1bf;};const a1171_0x185ecb=a1171_0x386a;(function(_0x262fcb,_0xfc908e){const _0x356c1a=a1171_0x386a;while(!![]){try{const _0x1fce41=parseInt(_0x356c1a(0x8f))+parseInt(_0x356c1a(0x92))+parseInt(_0x356c1a(0x96))+parseInt(_0x356c1a(0x90))+-parseInt(_0x356c1a(0x9b))+-parseInt(_0x356c1a(0xb5))+-parseInt(_0x356c1a(0x93))*parseInt(_0x356c1a(0xa5));if(_0x1fce41===_0xfc908e)break;else _0x262fcb['push'](_0x262fcb['shift']());}catch(_0x55e37c){_0x262fcb['push'](_0x262fcb['shift']());}}}(a1171_0x1cb1,0x6dd8e));const util=require(a1171_0x185ecb(0x8d)),logger=require('@config/logger')(a1171_0x185ecb(0x9e)),Sequence=function(){};Sequence[a1171_0x185ecb(0x9f)][a1171_0x185ecb(0xb3)]=function(_0x41f97b){const _0x29fe95=a1171_0x185ecb;this[_0x29fe95(0x94)]=this[_0x29fe95(0x94)]?this['tail'][_0x29fe95(0xa1)](_0x41f97b):_0x41f97b();};const Migration=function(_0x327cb0){const _0x3fbcd=a1171_0x185ecb;this[_0x3fbcd(0xb4)]=_0x327cb0,this[_0x3fbcd(0x9a)]=new Sequence();};Migration[a1171_0x185ecb(0x9f)][a1171_0x185ecb(0xae)]=function(_0x4e211d,_0x4f52f4,_0x3d1d56){const _0x18b4bb=a1171_0x185ecb,_0x5ed27b=this;this[_0x18b4bb(0x9a)][_0x18b4bb(0xb3)](function(){const _0x3246e0=_0x18b4bb;return _0x5ed27b['queryInterface']['changeColumn'](_0x4e211d,_0x4f52f4,_0x3d1d56)[_0x3246e0(0x9c)](function(){const _0x8308c2=_0x3246e0;logger[_0x8308c2(0x97)]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x4f52f4,_0x4e211d);})[_0x3246e0(0x99)](function(_0x5276f8){logger['info'](JSON['stringify'](_0x5276f8));});});},Migration[a1171_0x185ecb(0x9f)][a1171_0x185ecb(0xb0)]=function(_0x482f8e,_0x1f0afe,_0x38dcea){const _0x20dc28=this;this['sequence']['enqueue'](function(){const _0x376243=a1171_0x386a;return _0x20dc28[_0x376243(0xb4)][_0x376243(0xb0)](_0x482f8e,_0x1f0afe,_0x38dcea)[_0x376243(0x9c)](function(){const _0x3a8963=_0x376243;logger['info'](_0x3a8963(0xb7),_0x1f0afe,_0x482f8e);})[_0x376243(0x99)](function(_0x1e085f){const _0x44e4ad=_0x376243;logger[_0x44e4ad(0x97)](JSON[_0x44e4ad(0xaa)](_0x1e085f));});});},Migration[a1171_0x185ecb(0x9f)][a1171_0x185ecb(0xac)]=function(_0xb538c1){const _0x12f727=a1171_0x185ecb,_0x54588c=this;this[_0x12f727(0x9a)][_0x12f727(0xb3)](function(){const _0x2ec7bb=_0x12f727;return _0x54588c[_0x2ec7bb(0xb4)][_0x2ec7bb(0xac)](_0xb538c1,{'force':!![]})[_0x2ec7bb(0x9c)](function(){const _0x16fb4f=_0x2ec7bb;logger[_0x16fb4f(0x97)](_0x16fb4f(0x9d),_0xb538c1);})[_0x2ec7bb(0x99)](function(_0x162004){const _0x2290bf=_0x2ec7bb;logger[_0x2290bf(0x97)](JSON[_0x2290bf(0xaa)](_0x162004));});});},Migration['prototype'][a1171_0x185ecb(0xb6)]=function(_0x27ef49,_0x83a2e2,_0x33b30a){const _0x503078=a1171_0x185ecb,_0x223dd1=this;this[_0x503078(0x9a)]['enqueue'](function(){const _0xfee527=_0x503078;return _0x223dd1['queryInterface']['addIndex'](_0x27ef49,_0x83a2e2,{'indexName':_0x33b30a['indexName'],'indicesType':_0x33b30a[_0xfee527(0x95)]})[_0xfee527(0x9c)](function(){const _0x17d3f3=_0xfee527;logger[_0x17d3f3(0x97)](_0x17d3f3(0xa2),_0x27ef49,_0x83a2e2['join'](','),_0x33b30a[_0x17d3f3(0xa0)],_0x33b30a[_0x17d3f3(0x95)]);})[_0xfee527(0x99)](function(_0x49673b){const _0xef17fd=_0xfee527;logger[_0xef17fd(0x97)](JSON[_0xef17fd(0xaa)](_0x49673b));});});},Migration[a1171_0x185ecb(0x9f)][a1171_0x185ecb(0xa4)]=function(_0xa6442f,_0x1f7321){const _0x4ae789=a1171_0x185ecb,_0x33de71=this;this[_0x4ae789(0x9a)][_0x4ae789(0xb3)](function(){const _0x266b08=_0x4ae789;return _0x33de71[_0x266b08(0xb4)][_0x266b08(0xa4)](_0xa6442f,_0x1f7321)[_0x266b08(0x9c)](function(){const _0x368e66=_0x266b08;logger[_0x368e66(0x97)](_0x368e66(0xb8),_0xa6442f,_0x1f7321);})['catch'](function(_0xd1a1d6){const _0x153204=_0x266b08;logger[_0x153204(0x97)](JSON[_0x153204(0xaa)](_0xd1a1d6));});});},Migration[a1171_0x185ecb(0x9f)][a1171_0x185ecb(0xb1)]=function(_0x4d01e7){const _0x53a8c8=a1171_0x185ecb,_0x5b8a0b=this;this[_0x53a8c8(0x9a)]['enqueue'](function(){const _0x930d9d=_0x53a8c8;return _0x5b8a0b[_0x930d9d(0xb4)]['sequelize']['query'](_0x4d01e7)['then'](function(){const _0x5da4be=_0x930d9d;logger[_0x5da4be(0x97)]('query\x20%s',_0x4d01e7);})['catch'](function(_0x21b657){const _0x5e7eb4=_0x930d9d;logger[_0x5e7eb4(0x97)](JSON['stringify'](_0x21b657));});});},Migration[a1171_0x185ecb(0x9f)][a1171_0x185ecb(0xa7)]=function(_0x2437ee,_0x1369f6){const _0x4bcc18=a1171_0x185ecb,_0x1cbcd2=this;this[_0x4bcc18(0x9a)][_0x4bcc18(0xb3)](function(){const _0x42b3c3=_0x4bcc18;return _0x1cbcd2['queryInterface'][_0x42b3c3(0xa7)](_0x2437ee,_0x1369f6)[_0x42b3c3(0x9c)](function(){const _0x53d797=_0x42b3c3;logger[_0x53d797(0x97)]('Removed\x20column\x20%s\x20from\x20%s',_0x1369f6,_0x2437ee);})[_0x42b3c3(0x99)](function(_0xa53849){const _0x437eba=_0x42b3c3;logger[_0x437eba(0x97)](util['inspect'](_0xa53849,{'showHidden':![],'depth':null}));});});},Migration['prototype'][a1171_0x185ecb(0x91)]=function(_0x1dc421,_0x28890c,_0x55bd7b){const _0x133e0a=a1171_0x185ecb,_0x1af370=this;this[_0x133e0a(0x9a)][_0x133e0a(0xb3)](function(){const _0x5c55e9=_0x133e0a;return _0x1af370['queryInterface'][_0x5c55e9(0x91)](_0x1dc421,_0x28890c,_0x55bd7b)['then'](function(){const _0x3228d7=_0x5c55e9;logger[_0x3228d7(0x97)](_0x3228d7(0x8c),_0x28890c,_0x55bd7b,_0x1dc421);})[_0x5c55e9(0x99)](function(_0x39d8dd){const _0x6fdcfd=_0x5c55e9;logger['info'](util[_0x6fdcfd(0x98)](_0x39d8dd,{'showHidden':![],'depth':null}));});});},Migration['prototype'][a1171_0x185ecb(0x8e)]=function(_0x4590ea){const _0x193d4d=a1171_0x185ecb;this[_0x193d4d(0x9a)]['enqueue'](function(){return _0x4590ea();});},module['exports']={'up':function(_0xd72c48){return new Promise(function(_0x3818ab){const _0x68ccff=a1171_0x386a,_0xdb7847=new Migration(_0xd72c48);_0xdb7847[_0x68ccff(0xb6)](_0x68ccff(0xa8),[_0x68ccff(0xb2),_0x68ccff(0xa9),_0x68ccff(0xad),_0x68ccff(0xa6),_0x68ccff(0xab),_0x68ccff(0xa3)],{'indexName':'fti_cm_contacts','indicesType':_0x68ccff(0xaf)}),_0xdb7847[_0x68ccff(0x8e)](_0x3818ab);});},'down':function(){return Promise['resolve']();}};