Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.53.js
index ff41c4b..b0fb84d 100644 (file)
@@ -1 +1 @@
-const a1093_0xf536=['prototype','STRING','xls','query','join','skebby','type','TEXT','Added\x20column\x20%s\x20to\x20%s','xlsx','tail','sequence','description','ENUM','queryInterface','addIndex\x20%s\x20%s\x20%s','migration','catch','table\x20dropped\x20%s','Removed\x20column\x20%s\x20from\x20%s','addIndex','enqueue','output','changeColumn','query\x20%s','plivo','users','util','../config/logger','insecure','analytics_extracted_reports','csv','then','info','stringify','Changed\x20column\x20%s\x20in\x20table\x20%s','clicksend','twilio','exports','cm_contacts','connectel','final','removeColumn','addColumn','finally'];(function(_0x5b4bad,_0x5f5bbe){const _0xf53652=function(_0x2ec398){while(--_0x2ec398){_0x5b4bad['push'](_0x5b4bad['shift']());}};_0xf53652(++_0x5f5bbe);}(a1093_0xf536,0x77));const a1093_0x2ec3=function(_0x5b4bad,_0x5f5bbe){_0x5b4bad=_0x5b4bad-0x1ba;let _0xf53652=a1093_0xf536[_0x5b4bad];return _0xf53652;};const a1093_0x2fce2c=a1093_0x2ec3;'use strict';const util=require(a1093_0x2fce2c(0x1e5)),logger=require(a1093_0x2fce2c(0x1e6))(a1093_0x2fce2c(0x1da)),Sequence=function(){};Sequence[a1093_0x2fce2c(0x1ca)][a1093_0x2fce2c(0x1df)]=function(_0x202b5d){const _0x3957d6=a1093_0x2fce2c;this['tail']=this[_0x3957d6(0x1d4)]?this[_0x3957d6(0x1d4)][_0x3957d6(0x1c9)](_0x202b5d):_0x202b5d();};const Migration=function(_0x4cb14d){const _0x37d2f0=a1093_0x2fce2c;this[_0x37d2f0(0x1d8)]=_0x4cb14d,this[_0x37d2f0(0x1d5)]=new Sequence();};Migration[a1093_0x2fce2c(0x1ca)][a1093_0x2fce2c(0x1e1)]=function(_0x1415b8,_0x28ff48,_0x5d4ae9){const _0x14b0e3=a1093_0x2fce2c,_0x17c950=this;this[_0x14b0e3(0x1d5)]['enqueue'](function(){const _0x17b40c=_0x14b0e3;return _0x17c950['queryInterface'][_0x17b40c(0x1e1)](_0x1415b8,_0x28ff48,_0x5d4ae9)[_0x17b40c(0x1bd)](function(){const _0x57a7e3=_0x17b40c;logger[_0x57a7e3(0x1be)](_0x57a7e3(0x1c0),_0x28ff48,_0x1415b8);})[_0x17b40c(0x1db)](function(_0x4b8290){const _0xec4b53=_0x17b40c;logger[_0xec4b53(0x1be)](JSON['stringify'](_0x4b8290));});});},Migration[a1093_0x2fce2c(0x1ca)]['addColumn']=function(_0x429d30,_0x4ae3e2,_0x195b3e){const _0x4d7287=a1093_0x2fce2c,_0x320228=this;this['sequence'][_0x4d7287(0x1df)](function(){const _0x41e63a=_0x4d7287;return _0x320228[_0x41e63a(0x1d8)][_0x41e63a(0x1c8)](_0x429d30,_0x4ae3e2,_0x195b3e)['then'](function(){const _0xffd903=_0x41e63a;logger[_0xffd903(0x1be)](_0xffd903(0x1d2),_0x4ae3e2,_0x429d30);})[_0x41e63a(0x1db)](function(_0x4ad115){const _0x87cff=_0x41e63a;logger[_0x87cff(0x1be)](JSON[_0x87cff(0x1bf)](_0x4ad115));});});},Migration[a1093_0x2fce2c(0x1ca)]['dropTable']=function(_0x3da4c1){const _0x15d7bd=a1093_0x2fce2c,_0x187e6c=this;this[_0x15d7bd(0x1d5)][_0x15d7bd(0x1df)](function(){const _0x199787=_0x15d7bd;return _0x187e6c[_0x199787(0x1d8)]['dropTable'](_0x3da4c1,{'force':!![]})[_0x199787(0x1bd)](function(){const _0x476dcf=_0x199787;logger[_0x476dcf(0x1be)](_0x476dcf(0x1dc),_0x3da4c1);})[_0x199787(0x1db)](function(_0x46d17a){const _0x87df15=_0x199787;logger[_0x87df15(0x1be)](JSON[_0x87df15(0x1bf)](_0x46d17a));});});},Migration['prototype'][a1093_0x2fce2c(0x1de)]=function(_0x539368,_0x5675a1,_0x5af6ab){const _0x555e39=a1093_0x2fce2c,_0x48009b=this;this[_0x555e39(0x1d5)][_0x555e39(0x1df)](function(){const _0x1714f7=_0x555e39;return _0x48009b['queryInterface']['addIndex'](_0x539368,_0x5675a1,{'indexName':_0x5af6ab})[_0x1714f7(0x1bd)](function(){const _0x902e4a=_0x1714f7;logger['info'](_0x902e4a(0x1d9),_0x539368,_0x5675a1[_0x902e4a(0x1ce)](','),_0x5af6ab);})[_0x1714f7(0x1db)](function(_0x4b510d){const _0x4e6369=_0x1714f7;logger[_0x4e6369(0x1be)](JSON[_0x4e6369(0x1bf)](_0x4b510d));});});},Migration[a1093_0x2fce2c(0x1ca)][a1093_0x2fce2c(0x1cd)]=function(_0x235f12){const _0x4addd6=a1093_0x2fce2c,_0x2df60b=this;this[_0x4addd6(0x1d5)]['enqueue'](function(){const _0x59aed5=_0x4addd6;return _0x2df60b[_0x59aed5(0x1d8)]['sequelize'][_0x59aed5(0x1cd)](_0x235f12)[_0x59aed5(0x1bd)](function(){const _0x5a62b0=_0x59aed5;logger[_0x5a62b0(0x1be)](_0x5a62b0(0x1e2),_0x235f12);})[_0x59aed5(0x1db)](function(_0x14ab84){const _0x9d563b=_0x59aed5;logger[_0x9d563b(0x1be)](JSON['stringify'](_0x14ab84));});});},Migration[a1093_0x2fce2c(0x1ca)]['removeColumn']=function(_0x5cff7e,_0x3da45e){const _0x4aa072=a1093_0x2fce2c,_0x409eb8=this;this['sequence'][_0x4aa072(0x1df)](function(){const _0x44c49b=_0x4aa072;return _0x409eb8['queryInterface'][_0x44c49b(0x1c7)](_0x5cff7e,_0x3da45e)[_0x44c49b(0x1bd)](function(){const _0x3b8878=_0x44c49b;logger[_0x3b8878(0x1be)](_0x3b8878(0x1dd),_0x3da45e,_0x5cff7e);})['catch'](function(_0x59e542){logger['info'](util['inspect'](_0x59e542,{'showHidden':![],'depth':null}));});});},Migration['prototype'][a1093_0x2fce2c(0x1c6)]=function(_0x3b2329){const _0x3ec3ed=a1093_0x2fce2c;this[_0x3ec3ed(0x1d5)][_0x3ec3ed(0x1df)](function(){return _0x3b2329();});},module[a1093_0x2fce2c(0x1c3)]={'up':function(_0x39a0f2,_0x384dcb){return new Promise(function(_0x55c020){const _0x3dba62=a1093_0x2ec3,_0x25c813=new Migration(_0x39a0f2);_0x25c813['changeColumn'](_0x3dba62(0x1c4),_0x3dba62(0x1d6),{'type':_0x384dcb[_0x3dba62(0x1d1)]}),_0x25c813[_0x3dba62(0x1e1)]('sms_accounts',_0x3dba62(0x1d0),{'type':_0x384dcb['ENUM'](_0x3dba62(0x1c2),_0x3dba62(0x1cf),_0x3dba62(0x1c5),_0x3dba62(0x1c1),_0x3dba62(0x1e3))}),_0x25c813[_0x3dba62(0x1e1)]('analytics_extracted_reports','output',{'type':_0x384dcb[_0x3dba62(0x1d7)]('csv','pdf',_0x3dba62(0x1cc),_0x3dba62(0x1d3)),'allowNull':![],'defaultValue':_0x3dba62(0x1bc)}),_0x25c813['query']('UPDATE\x20analytics_extracted_reports\x20SET\x20output=\x27xlsx\x27\x20WHERE\x20output=\x27xls\x27'),_0x25c813['changeColumn'](_0x3dba62(0x1bb),_0x3dba62(0x1e0),{'type':_0x384dcb[_0x3dba62(0x1d7)](_0x3dba62(0x1bc),'pdf','xlsx'),'allowNull':![],'defaultValue':'csv'}),_0x25c813[_0x3dba62(0x1cd)]('UPDATE\x20users\x20SET\x20insecure=NULL\x20WHERE\x20insecure=\x27port,invite\x27'),_0x25c813[_0x3dba62(0x1e1)](_0x3dba62(0x1e4),_0x3dba62(0x1ba),{'type':_0x384dcb[_0x3dba62(0x1cb)],'allowNull':!![]}),_0x25c813[_0x3dba62(0x1c6)](_0x55c020);});},'down':function(){}};
\ No newline at end of file
+const a1096_0x83b9=['ENUM','dropTable','migration','STRING','table\x20dropped\x20%s','../config/logger','UPDATE\x20users\x20SET\x20insecure=NULL\x20WHERE\x20insecure=\x27port,invite\x27','info','queryInterface','stringify','csv','removeColumn','skebby','inspect','query','tail','then','final','plivo','Changed\x20column\x20%s\x20in\x20table\x20%s','UPDATE\x20analytics_extracted_reports\x20SET\x20output=\x27xlsx\x27\x20WHERE\x20output=\x27xls\x27','cm_contacts','TEXT','join','xls','output','connectel','analytics_extracted_reports','twilio','prototype','sequelize','exports','type','users','enqueue','insecure','changeColumn','sms_accounts','pdf','catch','addIndex','xlsx','sequence','query\x20%s'];(function(_0x17940f,_0x5330b1){const _0x83b978=function(_0x413ca6){while(--_0x413ca6){_0x17940f['push'](_0x17940f['shift']());}};_0x83b978(++_0x5330b1);}(a1096_0x83b9,0x9b));const a1096_0x413c=function(_0x17940f,_0x5330b1){_0x17940f=_0x17940f-0x130;let _0x83b978=a1096_0x83b9[_0x17940f];return _0x83b978;};const a1096_0x4427a8=a1096_0x413c;'use strict';const util=require('util'),logger=require(a1096_0x4427a8(0x14a))(a1096_0x4427a8(0x147)),Sequence=function(){};Sequence['prototype'][a1096_0x4427a8(0x13b)]=function(_0x48dab5){const _0x2a1627=a1096_0x4427a8;this[_0x2a1627(0x154)]=this[_0x2a1627(0x154)]?this[_0x2a1627(0x154)]['finally'](_0x48dab5):_0x48dab5();};const Migration=function(_0x196f07){const _0x21691c=a1096_0x4427a8;this[_0x21691c(0x14d)]=_0x196f07,this[_0x21691c(0x143)]=new Sequence();};Migration[a1096_0x4427a8(0x136)][a1096_0x4427a8(0x13d)]=function(_0x673214,_0x547179,_0x3044c2){const _0x531c32=a1096_0x4427a8,_0x1a66f1=this;this[_0x531c32(0x143)][_0x531c32(0x13b)](function(){const _0x3793e3=_0x531c32;return _0x1a66f1[_0x3793e3(0x14d)][_0x3793e3(0x13d)](_0x673214,_0x547179,_0x3044c2)[_0x3793e3(0x155)](function(){const _0x7a3adf=_0x3793e3;logger[_0x7a3adf(0x14c)](_0x7a3adf(0x158),_0x547179,_0x673214);})['catch'](function(_0x33fac7){const _0x30a1ee=_0x3793e3;logger['info'](JSON[_0x30a1ee(0x14e)](_0x33fac7));});});},Migration[a1096_0x4427a8(0x136)]['addColumn']=function(_0x128669,_0x4956c5,_0x214a8b){const _0x4fd205=a1096_0x4427a8,_0x56e413=this;this['sequence'][_0x4fd205(0x13b)](function(){const _0x3b81b0=_0x4fd205;return _0x56e413['queryInterface']['addColumn'](_0x128669,_0x4956c5,_0x214a8b)[_0x3b81b0(0x155)](function(){logger['info']('Added\x20column\x20%s\x20to\x20%s',_0x4956c5,_0x128669);})[_0x3b81b0(0x140)](function(_0x5190d2){const _0x15d785=_0x3b81b0;logger[_0x15d785(0x14c)](JSON[_0x15d785(0x14e)](_0x5190d2));});});},Migration[a1096_0x4427a8(0x136)][a1096_0x4427a8(0x146)]=function(_0x4b8d73){const _0x577d18=a1096_0x4427a8,_0x34d63b=this;this[_0x577d18(0x143)]['enqueue'](function(){const _0xb983f3=_0x577d18;return _0x34d63b[_0xb983f3(0x14d)][_0xb983f3(0x146)](_0x4b8d73,{'force':!![]})[_0xb983f3(0x155)](function(){const _0x275f6c=_0xb983f3;logger[_0x275f6c(0x14c)](_0x275f6c(0x149),_0x4b8d73);})['catch'](function(_0x1d1f7d){logger['info'](JSON['stringify'](_0x1d1f7d));});});},Migration['prototype']['addIndex']=function(_0xdfbe7b,_0xee4899,_0x551c46){const _0x3464fb=a1096_0x4427a8,_0x23dd0e=this;this[_0x3464fb(0x143)]['enqueue'](function(){const _0x6d339b=_0x3464fb;return _0x23dd0e[_0x6d339b(0x14d)][_0x6d339b(0x141)](_0xdfbe7b,_0xee4899,{'indexName':_0x551c46})[_0x6d339b(0x155)](function(){const _0x3a3867=_0x6d339b;logger[_0x3a3867(0x14c)]('addIndex\x20%s\x20%s\x20%s',_0xdfbe7b,_0xee4899[_0x3a3867(0x130)](','),_0x551c46);})['catch'](function(_0x251878){const _0x558db9=_0x6d339b;logger[_0x558db9(0x14c)](JSON[_0x558db9(0x14e)](_0x251878));});});},Migration[a1096_0x4427a8(0x136)][a1096_0x4427a8(0x153)]=function(_0x21486a){const _0x2f47ff=a1096_0x4427a8,_0x4b8990=this;this[_0x2f47ff(0x143)][_0x2f47ff(0x13b)](function(){const _0x3285cf=_0x2f47ff;return _0x4b8990[_0x3285cf(0x14d)][_0x3285cf(0x137)]['query'](_0x21486a)[_0x3285cf(0x155)](function(){const _0x432f2b=_0x3285cf;logger['info'](_0x432f2b(0x144),_0x21486a);})[_0x3285cf(0x140)](function(_0xa5add4){logger['info'](JSON['stringify'](_0xa5add4));});});},Migration[a1096_0x4427a8(0x136)][a1096_0x4427a8(0x150)]=function(_0x3a3ec4,_0x5e35fa){const _0x3005f0=this;this['sequence']['enqueue'](function(){const _0x553bc5=a1096_0x413c;return _0x3005f0[_0x553bc5(0x14d)][_0x553bc5(0x150)](_0x3a3ec4,_0x5e35fa)[_0x553bc5(0x155)](function(){const _0x53238e=_0x553bc5;logger[_0x53238e(0x14c)]('Removed\x20column\x20%s\x20from\x20%s',_0x5e35fa,_0x3a3ec4);})[_0x553bc5(0x140)](function(_0x59e02e){const _0x17bd62=_0x553bc5;logger['info'](util[_0x17bd62(0x152)](_0x59e02e,{'showHidden':![],'depth':null}));});});},Migration['prototype'][a1096_0x4427a8(0x156)]=function(_0x1f65a1){const _0x3032d1=a1096_0x4427a8;this[_0x3032d1(0x143)][_0x3032d1(0x13b)](function(){return _0x1f65a1();});},module[a1096_0x4427a8(0x138)]={'up':function(_0x43eeb5,_0x2d4af2){return new Promise(function(_0x49285d){const _0x442cbc=a1096_0x413c,_0xa3e28f=new Migration(_0x43eeb5);_0xa3e28f[_0x442cbc(0x13d)](_0x442cbc(0x15a),'description',{'type':_0x2d4af2[_0x442cbc(0x15b)]}),_0xa3e28f[_0x442cbc(0x13d)](_0x442cbc(0x13e),_0x442cbc(0x139),{'type':_0x2d4af2['ENUM'](_0x442cbc(0x135),_0x442cbc(0x151),_0x442cbc(0x133),'clicksend',_0x442cbc(0x157))}),_0xa3e28f['changeColumn'](_0x442cbc(0x134),_0x442cbc(0x132),{'type':_0x2d4af2['ENUM']('csv',_0x442cbc(0x13f),_0x442cbc(0x131),_0x442cbc(0x142)),'allowNull':![],'defaultValue':_0x442cbc(0x14f)}),_0xa3e28f[_0x442cbc(0x153)](_0x442cbc(0x159)),_0xa3e28f[_0x442cbc(0x13d)](_0x442cbc(0x134),_0x442cbc(0x132),{'type':_0x2d4af2[_0x442cbc(0x145)](_0x442cbc(0x14f),_0x442cbc(0x13f),_0x442cbc(0x142)),'allowNull':![],'defaultValue':_0x442cbc(0x14f)}),_0xa3e28f[_0x442cbc(0x153)](_0x442cbc(0x14b)),_0xa3e28f[_0x442cbc(0x13d)](_0x442cbc(0x13a),_0x442cbc(0x13c),{'type':_0x2d4af2[_0x442cbc(0x148)],'allowNull':!![]}),_0xa3e28f[_0x442cbc(0x156)](_0x49285d);});},'down':function(){}};
\ No newline at end of file