Built motion from commit 459747fdfe53bbf13fbede61eeaffea1f1438f86. Version 3.0.0...
[motion-next.git] / server / migrations / 2.4.19.js
index f01ccbc..26df72e 100644 (file)
@@ -1 +1 @@
-const a1002_0x1b37=['addIndex','removeColumn','renameColumn','then','Removed\x20column\x20%s\x20from\x20%s','addColumn','dropTable','type','localnet','enqueue','INSERT\x20INTO\x20network\x20(type,value,username,password,\x20createdAt,\x20updatedAt)\x20SELECT\x20\x27turn\x27,\x20turnaddr,\x20turnusername,\x20turnpassword,\x20current_timestamp(),\x20current_timestamp()\x20from\x20settings\x20WHERE\x20turnaddr<>\x27\x27','queryInterface','inspect','util','query\x20%s','INSERT\x20INTO\x20network\x20(type,value,\x20createdAt,\x20updatedAt)\x20SELECT\x20\x27stun\x27,\x20stunaddr,\x20current_timestamp(),\x20current_timestamp()\x20from\x20settings\x20WHERE\x20stunaddr<>\x27\x27','nothing','moduleSearch','changeColumn','../config/logger','STRING','addIndex\x20%s\x20%s\x20%s\x20[%s]','moduleCreate','removeIndex','tail','password','prototype','migration','sequence','ENUM','Contacts','UPDATE\x20int_zoho_configurations\x20SET\x20moduleCreate\x20=\x20\x27lead\x27\x20WHERE\x20moduleCreate\x20=\x20\x27Leads\x27','query','UPDATE\x20int_zoho_configurations\x20SET\x20moduleCreate\x20=\x20\x27contact\x27\x20WHERE\x20moduleCreate\x20=\x20\x27Contacts\x27','contact_lead','join','final','removeIndex\x20%s\x20%s','info','catch','indicesType','table\x20dropped\x20%s','network','contact','stringify','username','lead','int_zoho_configurations','externip'];(function(_0x28e53a,_0x1b37ec){const _0x124078=function(_0x14d164){while(--_0x14d164){_0x28e53a['push'](_0x28e53a['shift']());}};_0x124078(++_0x1b37ec);}(a1002_0x1b37,0xf2));const a1002_0x1240=function(_0x28e53a,_0x1b37ec){_0x28e53a=_0x28e53a-0x0;let _0x124078=a1002_0x1b37[_0x28e53a];return _0x124078;};const _0x2189fc=a1002_0x1240;'use strict';const util=require(_0x2189fc('0x10')),logger=require(_0x2189fc('0x16'))(_0x2189fc('0x1e')),Sequence=function(){};Sequence['prototype'][_0x2189fc('0xc')]=function(_0x14d164){const _0x583387=_0x2189fc;this['tail']=this[_0x583387('0x1b')]?this['tail']['finally'](_0x14d164):_0x14d164();};const Migration=function(_0x239ef2){const _0x2131fc=_0x2189fc;this[_0x2131fc('0xe')]=_0x239ef2,this[_0x2131fc('0x1f')]=new Sequence();};Migration['prototype'][_0x2189fc('0x15')]=function(_0x342b2d,_0x472506,_0x412376){const _0x536344=_0x2189fc,_0x5b63b3=this;this[_0x536344('0x1f')][_0x536344('0xc')](function(){const _0x478345=_0x536344;return _0x5b63b3[_0x478345('0xe')][_0x478345('0x15')](_0x342b2d,_0x472506,_0x412376)[_0x478345('0x6')](function(){const _0x755972=_0x478345;logger[_0x755972('0x29')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x472506,_0x342b2d);})[_0x478345('0x2a')](function(_0x5b9a84){const _0x2a6628=_0x478345;logger[_0x2a6628('0x29')](JSON[_0x2a6628('0x2f')](_0x5b9a84));});});},Migration[_0x2189fc('0x1d')]['addColumn']=function(_0x4bec21,_0x55fffd,_0x1a397a){const _0x2c0d1e=_0x2189fc,_0x35e219=this;this[_0x2c0d1e('0x1f')][_0x2c0d1e('0xc')](function(){const _0xb74a3e=_0x2c0d1e;return _0x35e219[_0xb74a3e('0xe')][_0xb74a3e('0x8')](_0x4bec21,_0x55fffd,_0x1a397a)['then'](function(){logger['info']('Added\x20column\x20%s\x20to\x20%s',_0x55fffd,_0x4bec21);})[_0xb74a3e('0x2a')](function(_0x6f19b7){const _0x478442=_0xb74a3e;logger[_0x478442('0x29')](JSON[_0x478442('0x2f')](_0x6f19b7));});});},Migration['prototype'][_0x2189fc('0x9')]=function(_0x55b41e){const _0x2204e3=_0x2189fc,_0x30e2a2=this;this[_0x2204e3('0x1f')]['enqueue'](function(){const _0x54b4cf=_0x2204e3;return _0x30e2a2[_0x54b4cf('0xe')][_0x54b4cf('0x9')](_0x55b41e,{'force':!![]})[_0x54b4cf('0x6')](function(){const _0x439151=_0x54b4cf;logger[_0x439151('0x29')](_0x439151('0x2c'),_0x55b41e);})[_0x54b4cf('0x2a')](function(_0x1b3a94){const _0x152aab=_0x54b4cf;logger['info'](JSON[_0x152aab('0x2f')](_0x1b3a94));});});},Migration[_0x2189fc('0x1d')][_0x2189fc('0x3')]=function(_0x27bcef,_0x337ba5,_0x4e8806){const _0x134c1d=_0x2189fc,_0x46152f=this;this['sequence'][_0x134c1d('0xc')](function(){const _0x40b246=_0x134c1d;return _0x46152f['queryInterface'][_0x40b246('0x3')](_0x27bcef,_0x337ba5,{'indexName':_0x4e8806['indexName'],'indicesType':_0x4e8806[_0x40b246('0x2b')]})[_0x40b246('0x6')](function(){const _0x12fe4c=_0x40b246;logger[_0x12fe4c('0x29')](_0x12fe4c('0x18'),_0x27bcef,_0x337ba5[_0x12fe4c('0x26')](','),_0x4e8806['indexName'],_0x4e8806[_0x12fe4c('0x2b')]);})[_0x40b246('0x2a')](function(_0x59d9cc){const _0x2b8b91=_0x40b246;logger[_0x2b8b91('0x29')](JSON[_0x2b8b91('0x2f')](_0x59d9cc));});});},Migration[_0x2189fc('0x1d')][_0x2189fc('0x1a')]=function(_0xe6836f,_0x1aea5b){const _0x466ed7=_0x2189fc,_0x4bee7c=this;this[_0x466ed7('0x1f')][_0x466ed7('0xc')](function(){const _0xe2df76=_0x466ed7;return _0x4bee7c[_0xe2df76('0xe')][_0xe2df76('0x1a')](_0xe6836f,_0x1aea5b)[_0xe2df76('0x6')](function(){const _0x2c8a15=_0xe2df76;logger[_0x2c8a15('0x29')](_0x2c8a15('0x28'),_0xe6836f,_0x1aea5b);})['catch'](function(_0x3b1c06){const _0x301675=_0xe2df76;logger['info'](JSON[_0x301675('0x2f')](_0x3b1c06));});});},Migration[_0x2189fc('0x1d')][_0x2189fc('0x23')]=function(_0x3b2b44){const _0x19c8b6=_0x2189fc,_0x395cc0=this;this[_0x19c8b6('0x1f')][_0x19c8b6('0xc')](function(){const _0x2018eb=_0x19c8b6;return _0x395cc0[_0x2018eb('0xe')]['sequelize'][_0x2018eb('0x23')](_0x3b2b44)[_0x2018eb('0x6')](function(){const _0x10767a=_0x2018eb;logger[_0x10767a('0x29')](_0x10767a('0x11'),_0x3b2b44);})[_0x2018eb('0x2a')](function(_0x3e19ff){const _0x1c3a59=_0x2018eb;logger[_0x1c3a59('0x29')](JSON['stringify'](_0x3e19ff));});});},Migration[_0x2189fc('0x1d')][_0x2189fc('0x4')]=function(_0x18b928,_0x252e44){const _0x25adaf=_0x2189fc,_0x8f4591=this;this[_0x25adaf('0x1f')][_0x25adaf('0xc')](function(){const _0x3cd45d=_0x25adaf;return _0x8f4591[_0x3cd45d('0xe')][_0x3cd45d('0x4')](_0x18b928,_0x252e44)[_0x3cd45d('0x6')](function(){const _0x3bf006=_0x3cd45d;logger['info'](_0x3bf006('0x7'),_0x252e44,_0x18b928);})[_0x3cd45d('0x2a')](function(_0x49c3b1){const _0x3a83b4=_0x3cd45d;logger[_0x3a83b4('0x29')](util['inspect'](_0x49c3b1,{'showHidden':![],'depth':null}));});});},Migration[_0x2189fc('0x1d')]['renameColumn']=function(_0x5ac9f9,_0x3094d6,_0x11cb53){const _0x77a547=_0x2189fc,_0x131a98=this;this[_0x77a547('0x1f')][_0x77a547('0xc')](function(){const _0x166eb7=_0x77a547;return _0x131a98[_0x166eb7('0xe')][_0x166eb7('0x5')](_0x5ac9f9,_0x3094d6,_0x11cb53)['then'](function(){const _0x4a49fd=_0x166eb7;logger[_0x4a49fd('0x29')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x3094d6,_0x11cb53,_0x5ac9f9);})[_0x166eb7('0x2a')](function(_0x135454){const _0x247bdf=_0x166eb7;logger[_0x247bdf('0x29')](util[_0x247bdf('0xf')](_0x135454,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x2189fc('0x27')]=function(_0x15afa7){const _0x3977e0=_0x2189fc;this[_0x3977e0('0x1f')]['enqueue'](function(){return _0x15afa7();});},module['exports']={'up':function(_0x25af22,_0x501137){return new Promise(function(_0xdfff46){const _0x1399f7=a1002_0x1240,_0x1963bc=new Migration(_0x25af22);_0x1963bc[_0x1399f7('0x8')]('int_zoho_configurations',_0x1399f7('0x14'),{'type':_0x501137[_0x1399f7('0x20')]('contact_lead','contact',_0x1399f7('0x0')),'defaultValue':_0x1399f7('0x25')}),_0x1963bc[_0x1399f7('0x15')](_0x1399f7('0x1'),_0x1399f7('0x19'),{'type':_0x501137['ENUM']('Leads',_0x1399f7('0x21'),_0x1399f7('0x13'),_0x1399f7('0x2e'),_0x1399f7('0x0'))}),_0x1963bc[_0x1399f7('0x23')](_0x1399f7('0x24')),_0x1963bc[_0x1399f7('0x23')](_0x1399f7('0x22')),_0x1963bc[_0x1399f7('0x15')](_0x1399f7('0x1'),_0x1399f7('0x19'),{'type':_0x501137[_0x1399f7('0x20')]('nothing',_0x1399f7('0x2e'),_0x1399f7('0x0')),'defaultValue':_0x1399f7('0x0')}),_0x1963bc[_0x1399f7('0x8')](_0x1399f7('0x2d'),_0x1399f7('0x30'),{'type':_0x501137['STRING']}),_0x1963bc[_0x1399f7('0x8')](_0x1399f7('0x2d'),_0x1399f7('0x1c'),{'type':_0x501137[_0x1399f7('0x17')]}),_0x1963bc['changeColumn'](_0x1399f7('0x2d'),_0x1399f7('0xa'),{'type':_0x501137[_0x1399f7('0x20')](_0x1399f7('0xb'),_0x1399f7('0x2'),'stun','turn')}),_0x1963bc[_0x1399f7('0x23')](_0x1399f7('0x12')),_0x1963bc[_0x1399f7('0x23')](_0x1399f7('0xd')),_0x1963bc[_0x1399f7('0x27')](_0xdfff46);});},'down':function(){}};
\ No newline at end of file
+const a1002_0x5d5b=['Leads','moduleCreate','INSERT\x20INTO\x20network\x20(type,value,\x20createdAt,\x20updatedAt)\x20SELECT\x20\x27stun\x27,\x20stunaddr,\x20current_timestamp(),\x20current_timestamp()\x20from\x20settings\x20WHERE\x20stunaddr<>\x27\x27','stun','migration','final','externip','tail','addColumn','removeIndex','int_zoho_configurations','username','sequelize','moduleSearch','removeIndex\x20%s\x20%s','removeColumn','nothing','prototype','changeColumn','lead','UPDATE\x20int_zoho_configurations\x20SET\x20moduleCreate\x20=\x20\x27lead\x27\x20WHERE\x20moduleCreate\x20=\x20\x27Leads\x27','sequence','Changed\x20column\x20%s\x20in\x20table\x20%s','info','then','enqueue','indexName','network','addIndex\x20%s\x20%s\x20%s\x20[%s]','table\x20dropped\x20%s','catch','indicesType','dropTable','join','contact','ENUM','addIndex','../config/logger','stringify','query','inspect','password','util','Contacts','localnet','queryInterface','turn','contact_lead'];(function(_0x24a8e1,_0x5d5b76){const _0x3b039e=function(_0x532a2a){while(--_0x532a2a){_0x24a8e1['push'](_0x24a8e1['shift']());}};_0x3b039e(++_0x5d5b76);}(a1002_0x5d5b,0x69));const a1002_0x3b03=function(_0x24a8e1,_0x5d5b76){_0x24a8e1=_0x24a8e1-0x0;let _0x3b039e=a1002_0x5d5b[_0x24a8e1];return _0x3b039e;};const _0x47a3e9=a1002_0x3b03;'use strict';const util=require(_0x47a3e9('0x21')),logger=require(_0x47a3e9('0x1c'))(_0x47a3e9('0x2b')),Sequence=function(){};Sequence[_0x47a3e9('0x8')][_0x47a3e9('0x10')]=function(_0x532a2a){const _0x59c579=_0x47a3e9;this['tail']=this[_0x59c579('0x2e')]?this[_0x59c579('0x2e')]['finally'](_0x532a2a):_0x532a2a();};const Migration=function(_0x58dfd9){const _0x1e4eb2=_0x47a3e9;this['queryInterface']=_0x58dfd9,this[_0x1e4eb2('0xc')]=new Sequence();};Migration[_0x47a3e9('0x8')][_0x47a3e9('0x9')]=function(_0x25e3d0,_0x590e00,_0x2adeee){const _0x4ce265=_0x47a3e9,_0xf7c053=this;this[_0x4ce265('0xc')][_0x4ce265('0x10')](function(){const _0x5c18c3=_0x4ce265;return _0xf7c053['queryInterface'][_0x5c18c3('0x9')](_0x25e3d0,_0x590e00,_0x2adeee)['then'](function(){const _0x154ded=_0x5c18c3;logger[_0x154ded('0xe')](_0x154ded('0xd'),_0x590e00,_0x25e3d0);})[_0x5c18c3('0x15')](function(_0x173f10){const _0x3551bd=_0x5c18c3;logger[_0x3551bd('0xe')](JSON[_0x3551bd('0x1d')](_0x173f10));});});},Migration['prototype']['addColumn']=function(_0x501f8b,_0x15424a,_0x5f4a0b){const _0x551ef3=_0x47a3e9,_0x201af6=this;this[_0x551ef3('0xc')][_0x551ef3('0x10')](function(){const _0x6bdb53=_0x551ef3;return _0x201af6[_0x6bdb53('0x24')]['addColumn'](_0x501f8b,_0x15424a,_0x5f4a0b)[_0x6bdb53('0xf')](function(){logger['info']('Added\x20column\x20%s\x20to\x20%s',_0x15424a,_0x501f8b);})['catch'](function(_0x4b077a){const _0x3cdfd6=_0x6bdb53;logger['info'](JSON[_0x3cdfd6('0x1d')](_0x4b077a));});});},Migration['prototype'][_0x47a3e9('0x17')]=function(_0x248e30){const _0x4fc3cc=_0x47a3e9,_0x293088=this;this[_0x4fc3cc('0xc')][_0x4fc3cc('0x10')](function(){const _0x16bfcf=_0x4fc3cc;return _0x293088[_0x16bfcf('0x24')]['dropTable'](_0x248e30,{'force':!![]})[_0x16bfcf('0xf')](function(){const _0x1c9c7d=_0x16bfcf;logger[_0x1c9c7d('0xe')](_0x1c9c7d('0x14'),_0x248e30);})[_0x16bfcf('0x15')](function(_0x1c6b1f){const _0x255b40=_0x16bfcf;logger['info'](JSON[_0x255b40('0x1d')](_0x1c6b1f));});});},Migration['prototype']['addIndex']=function(_0x47b16b,_0x56f158,_0x22f3bd){const _0x21f4ec=_0x47a3e9,_0x28d901=this;this['sequence'][_0x21f4ec('0x10')](function(){const _0x293427=_0x21f4ec;return _0x28d901[_0x293427('0x24')][_0x293427('0x1b')](_0x47b16b,_0x56f158,{'indexName':_0x22f3bd[_0x293427('0x11')],'indicesType':_0x22f3bd[_0x293427('0x16')]})[_0x293427('0xf')](function(){const _0x3b61db=_0x293427;logger['info'](_0x3b61db('0x13'),_0x47b16b,_0x56f158[_0x3b61db('0x18')](','),_0x22f3bd[_0x3b61db('0x11')],_0x22f3bd[_0x3b61db('0x16')]);})[_0x293427('0x15')](function(_0x120bae){const _0x4552df=_0x293427;logger[_0x4552df('0xe')](JSON[_0x4552df('0x1d')](_0x120bae));});});},Migration[_0x47a3e9('0x8')][_0x47a3e9('0x0')]=function(_0x3fc917,_0x15ed12){const _0x5cb42e=this;this['sequence']['enqueue'](function(){const _0x6a03ad=a1002_0x3b03;return _0x5cb42e[_0x6a03ad('0x24')][_0x6a03ad('0x0')](_0x3fc917,_0x15ed12)[_0x6a03ad('0xf')](function(){const _0x4b510f=_0x6a03ad;logger[_0x4b510f('0xe')](_0x4b510f('0x5'),_0x3fc917,_0x15ed12);})['catch'](function(_0xa46c47){const _0x8f0494=_0x6a03ad;logger[_0x8f0494('0xe')](JSON['stringify'](_0xa46c47));});});},Migration[_0x47a3e9('0x8')][_0x47a3e9('0x1e')]=function(_0x4b5fa4){const _0x3f3b3e=_0x47a3e9,_0x330bd5=this;this['sequence'][_0x3f3b3e('0x10')](function(){const _0x3b5d4b=_0x3f3b3e;return _0x330bd5[_0x3b5d4b('0x24')][_0x3b5d4b('0x3')][_0x3b5d4b('0x1e')](_0x4b5fa4)[_0x3b5d4b('0xf')](function(){logger['info']('query\x20%s',_0x4b5fa4);})[_0x3b5d4b('0x15')](function(_0x21a347){const _0x551f76=_0x3b5d4b;logger[_0x551f76('0xe')](JSON[_0x551f76('0x1d')](_0x21a347));});});},Migration[_0x47a3e9('0x8')][_0x47a3e9('0x6')]=function(_0x56f895,_0x51b4ca){const _0x873df7=_0x47a3e9,_0x13ed8a=this;this[_0x873df7('0xc')]['enqueue'](function(){const _0x543048=_0x873df7;return _0x13ed8a[_0x543048('0x24')][_0x543048('0x6')](_0x56f895,_0x51b4ca)[_0x543048('0xf')](function(){const _0x32149d=_0x543048;logger[_0x32149d('0xe')]('Removed\x20column\x20%s\x20from\x20%s',_0x51b4ca,_0x56f895);})[_0x543048('0x15')](function(_0xd90b3c){const _0x1300ef=_0x543048;logger[_0x1300ef('0xe')](util[_0x1300ef('0x1f')](_0xd90b3c,{'showHidden':![],'depth':null}));});});},Migration[_0x47a3e9('0x8')]['renameColumn']=function(_0x11387a,_0x212416,_0x1816dc){const _0x53b68f=_0x47a3e9,_0x492a4c=this;this[_0x53b68f('0xc')][_0x53b68f('0x10')](function(){const _0x5e983b=_0x53b68f;return _0x492a4c[_0x5e983b('0x24')]['renameColumn'](_0x11387a,_0x212416,_0x1816dc)[_0x5e983b('0xf')](function(){const _0xa0d12b=_0x5e983b;logger[_0xa0d12b('0xe')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x212416,_0x1816dc,_0x11387a);})['catch'](function(_0x4159f8){const _0x588e0b=_0x5e983b;logger[_0x588e0b('0xe')](util[_0x588e0b('0x1f')](_0x4159f8,{'showHidden':![],'depth':null}));});});},Migration[_0x47a3e9('0x8')]['final']=function(_0x5e00e0){const _0x7d33e8=_0x47a3e9;this['sequence'][_0x7d33e8('0x10')](function(){return _0x5e00e0();});},module['exports']={'up':function(_0x3fd71f,_0x3b9c0d){return new Promise(function(_0x1e1899){const _0x2d7c22=a1002_0x3b03,_0x1948f0=new Migration(_0x3fd71f);_0x1948f0['addColumn'](_0x2d7c22('0x1'),_0x2d7c22('0x4'),{'type':_0x3b9c0d['ENUM'](_0x2d7c22('0x26'),_0x2d7c22('0x19'),_0x2d7c22('0xa')),'defaultValue':_0x2d7c22('0x26')}),_0x1948f0[_0x2d7c22('0x9')](_0x2d7c22('0x1'),_0x2d7c22('0x28'),{'type':_0x3b9c0d[_0x2d7c22('0x1a')](_0x2d7c22('0x27'),_0x2d7c22('0x22'),_0x2d7c22('0x7'),_0x2d7c22('0x19'),_0x2d7c22('0xa'))}),_0x1948f0[_0x2d7c22('0x1e')]('UPDATE\x20int_zoho_configurations\x20SET\x20moduleCreate\x20=\x20\x27contact\x27\x20WHERE\x20moduleCreate\x20=\x20\x27Contacts\x27'),_0x1948f0[_0x2d7c22('0x1e')](_0x2d7c22('0xb')),_0x1948f0['changeColumn'](_0x2d7c22('0x1'),'moduleCreate',{'type':_0x3b9c0d[_0x2d7c22('0x1a')]('nothing',_0x2d7c22('0x19'),_0x2d7c22('0xa')),'defaultValue':_0x2d7c22('0xa')}),_0x1948f0[_0x2d7c22('0x2f')]('network',_0x2d7c22('0x2'),{'type':_0x3b9c0d['STRING']}),_0x1948f0[_0x2d7c22('0x2f')](_0x2d7c22('0x12'),_0x2d7c22('0x20'),{'type':_0x3b9c0d['STRING']}),_0x1948f0[_0x2d7c22('0x9')](_0x2d7c22('0x12'),'type',{'type':_0x3b9c0d[_0x2d7c22('0x1a')](_0x2d7c22('0x23'),_0x2d7c22('0x2d'),_0x2d7c22('0x2a'),_0x2d7c22('0x25'))}),_0x1948f0[_0x2d7c22('0x1e')](_0x2d7c22('0x29')),_0x1948f0[_0x2d7c22('0x1e')]('INSERT\x20INTO\x20network\x20(type,value,username,password,\x20createdAt,\x20updatedAt)\x20SELECT\x20\x27turn\x27,\x20turnaddr,\x20turnusername,\x20turnpassword,\x20current_timestamp(),\x20current_timestamp()\x20from\x20settings\x20WHERE\x20turnaddr<>\x27\x27'),_0x1948f0[_0x2d7c22('0x2c')](_0x1e1899);});},'down':function(){}};
\ No newline at end of file