Built motion from commit b51cdcb3f2cb46634587ce1d55ea1b8f32dacea6. Version 3.0.0...
[motion-next.git] / server / migrations / 2.3.3.js
index ecc4f07..394d32d 100644 (file)
@@ -1 +1 @@
-const a976_0x737d=['Removed\x20column\x20%s\x20from\x20%s','inspect','addIndex\x20%s\x20%s\x20%s','chat_applications','changeColumn','stringify','dropTable','appdata','then','info','sms_applications','catch','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','enqueue','addIndex','util','query','Added\x20column\x20%s\x20to\x20%s','../config/logger','join','fax_applications','sequence','migration','TEXT','removeIndex','queryInterface','renameColumn','sequelize','query\x20%s','finally','mail_applications','removeColumn','tail','prototype','ALTER\x20TABLE\x20tools_canned_answers\x20CONVERT\x20TO\x20CHARACTER\x20SET\x20utf8mb4\x20COLLATE\x20utf8mb4_unicode_ci;','final','openchannel_applications','exports'];(function(_0x4ba07f,_0x737d57){const _0x455e35=function(_0x1ffaac){while(--_0x1ffaac){_0x4ba07f['push'](_0x4ba07f['shift']());}};_0x455e35(++_0x737d57);}(a976_0x737d,0x135));const a976_0x455e=function(_0x4ba07f,_0x737d57){_0x4ba07f=_0x4ba07f-0x0;let _0x455e35=a976_0x737d[_0x4ba07f];return _0x455e35;};const _0x3f1637=a976_0x455e;'use strict';const util=require(_0x3f1637('0xa')),logger=require(_0x3f1637('0xd'))(_0x3f1637('0x11')),Sequence=function(){};Sequence['prototype'][_0x3f1637('0x8')]=function(_0x1ffaac){const _0x30feb7=_0x3f1637;this['tail']=this[_0x30feb7('0x1b')]?this[_0x30feb7('0x1b')][_0x30feb7('0x18')](_0x1ffaac):_0x1ffaac();};const Migration=function(_0x4fdd15){const _0x4e44d8=_0x3f1637;this[_0x4e44d8('0x14')]=_0x4fdd15,this[_0x4e44d8('0x10')]=new Sequence();};Migration['prototype']['changeColumn']=function(_0x612c50,_0x1041f5,_0x4eb5f2){const _0x8d9cb9=_0x3f1637,_0x2c82e5=this;this[_0x8d9cb9('0x10')][_0x8d9cb9('0x8')](function(){const _0x530379=_0x8d9cb9;return _0x2c82e5['queryInterface'][_0x530379('0x25')](_0x612c50,_0x1041f5,_0x4eb5f2)[_0x530379('0x3')](function(){const _0x3458fa=_0x530379;logger[_0x3458fa('0x4')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x1041f5,_0x612c50);})['catch'](function(_0x90c525){const _0x8473bd=_0x530379;logger['info'](JSON[_0x8473bd('0x0')](_0x90c525));});});},Migration[_0x3f1637('0x1c')]['addColumn']=function(_0x38580d,_0x11f42f,_0x2432e8){const _0x29d47b=_0x3f1637,_0x1fc2d7=this;this['sequence'][_0x29d47b('0x8')](function(){const _0x440998=_0x29d47b;return _0x1fc2d7[_0x440998('0x14')]['addColumn'](_0x38580d,_0x11f42f,_0x2432e8)[_0x440998('0x3')](function(){const _0x19386a=_0x440998;logger[_0x19386a('0x4')](_0x19386a('0xc'),_0x11f42f,_0x38580d);})[_0x440998('0x6')](function(_0xc918cf){const _0xd92f10=_0x440998;logger['info'](JSON[_0xd92f10('0x0')](_0xc918cf));});});},Migration[_0x3f1637('0x1c')]['dropTable']=function(_0x4a8ee3){const _0x499c75=_0x3f1637,_0x58e22e=this;this[_0x499c75('0x10')][_0x499c75('0x8')](function(){const _0x27eff9=_0x499c75;return _0x58e22e['queryInterface'][_0x27eff9('0x1')](_0x4a8ee3,{'force':!![]})[_0x27eff9('0x3')](function(){const _0x59ce0f=_0x27eff9;logger[_0x59ce0f('0x4')]('table\x20dropped\x20%s',_0x4a8ee3);})[_0x27eff9('0x6')](function(_0x7aee21){const _0x33df73=_0x27eff9;logger[_0x33df73('0x4')](JSON[_0x33df73('0x0')](_0x7aee21));});});},Migration[_0x3f1637('0x1c')][_0x3f1637('0x9')]=function(_0x8c6686,_0x10e634,_0x2ddfa6){const _0x433f83=_0x3f1637,_0x1d7df7=this;this[_0x433f83('0x10')][_0x433f83('0x8')](function(){const _0x183b87=_0x433f83;return _0x1d7df7['queryInterface']['addIndex'](_0x8c6686,_0x10e634,{'indexName':_0x2ddfa6})[_0x183b87('0x3')](function(){const _0x1aedca=_0x183b87;logger['info'](_0x1aedca('0x23'),_0x8c6686,_0x10e634[_0x1aedca('0xe')](','),_0x2ddfa6);})[_0x183b87('0x6')](function(_0x42be8a){const _0xbade19=_0x183b87;logger[_0xbade19('0x4')](JSON['stringify'](_0x42be8a));});});},Migration['prototype'][_0x3f1637('0x13')]=function(_0x376a9f,_0x9d47ca){const _0x5001d0=_0x3f1637,_0x3c264d=this;this[_0x5001d0('0x10')]['enqueue'](function(){const _0x226900=_0x5001d0;return _0x3c264d[_0x226900('0x14')][_0x226900('0x13')](_0x376a9f,_0x9d47ca)[_0x226900('0x3')](function(){const _0x572e18=_0x226900;logger[_0x572e18('0x4')]('removeIndex\x20%s\x20%s',_0x376a9f,_0x9d47ca);})[_0x226900('0x6')](function(_0x505b3a){const _0x5050bd=_0x226900;logger['info'](JSON[_0x5050bd('0x0')](_0x505b3a));});});},Migration[_0x3f1637('0x1c')][_0x3f1637('0xb')]=function(_0x3defee){const _0x2ef122=_0x3f1637,_0x436386=this;this[_0x2ef122('0x10')][_0x2ef122('0x8')](function(){const _0x4a68a3=_0x2ef122;return _0x436386[_0x4a68a3('0x14')][_0x4a68a3('0x16')][_0x4a68a3('0xb')](_0x3defee)['then'](function(){const _0x743f71=_0x4a68a3;logger[_0x743f71('0x4')](_0x743f71('0x17'),_0x3defee);})[_0x4a68a3('0x6')](function(_0x145c64){const _0x56ef44=_0x4a68a3;logger[_0x56ef44('0x4')](JSON[_0x56ef44('0x0')](_0x145c64));});});},Migration[_0x3f1637('0x1c')][_0x3f1637('0x1a')]=function(_0x1c24d2,_0x23b998){const _0x4385d8=_0x3f1637,_0xbbde4e=this;this[_0x4385d8('0x10')]['enqueue'](function(){const _0x3e980e=_0x4385d8;return _0xbbde4e[_0x3e980e('0x14')][_0x3e980e('0x1a')](_0x1c24d2,_0x23b998)['then'](function(){const _0x292217=_0x3e980e;logger[_0x292217('0x4')](_0x292217('0x21'),_0x23b998,_0x1c24d2);})[_0x3e980e('0x6')](function(_0x54acb9){const _0x2b795f=_0x3e980e;logger[_0x2b795f('0x4')](util[_0x2b795f('0x22')](_0x54acb9,{'showHidden':![],'depth':null}));});});},Migration[_0x3f1637('0x1c')][_0x3f1637('0x15')]=function(_0x43e585,_0x23718b,_0x1e8b05){const _0x522d4a=_0x3f1637,_0x3111e7=this;this[_0x522d4a('0x10')]['enqueue'](function(){const _0x50f1a2=_0x522d4a;return _0x3111e7['queryInterface'][_0x50f1a2('0x15')](_0x43e585,_0x23718b,_0x1e8b05)['then'](function(){const _0x1865f3=_0x50f1a2;logger[_0x1865f3('0x4')](_0x1865f3('0x7'),_0x23718b,_0x1e8b05,_0x43e585);})[_0x50f1a2('0x6')](function(_0x3cc47c){const _0x3e5676=_0x50f1a2;logger['info'](util[_0x3e5676('0x22')](_0x3cc47c,{'showHidden':![],'depth':null}));});});},Migration[_0x3f1637('0x1c')][_0x3f1637('0x1e')]=function(_0x37a2d3){const _0x112982=_0x3f1637;this[_0x112982('0x10')][_0x112982('0x8')](function(){return _0x37a2d3();});},module[_0x3f1637('0x20')]={'up':function(_0xc1e694,_0x4d1141){return new Promise(function(_0xc403c6){const _0x4ec519=a976_0x455e,_0x30fa48=new Migration(_0xc1e694);_0x30fa48['query'](_0x4ec519('0x1d')),_0x30fa48[_0x4ec519('0x25')](_0x4ec519('0x24'),'appdata',{'type':_0x4d1141[_0x4ec519('0x12')]()}),_0x30fa48[_0x4ec519('0x25')](_0x4ec519('0xf'),_0x4ec519('0x2'),{'type':_0x4d1141[_0x4ec519('0x12')]()}),_0x30fa48[_0x4ec519('0x25')](_0x4ec519('0x19'),_0x4ec519('0x2'),{'type':_0x4d1141[_0x4ec519('0x12')]()}),_0x30fa48['changeColumn'](_0x4ec519('0x1f'),_0x4ec519('0x2'),{'type':_0x4d1141[_0x4ec519('0x12')]()}),_0x30fa48[_0x4ec519('0x25')](_0x4ec519('0x5'),'appdata',{'type':_0x4d1141[_0x4ec519('0x12')]()}),_0x30fa48[_0x4ec519('0x1e')](_0xc403c6);});},'down':function(){}};
\ No newline at end of file
+const a976_0x525a=['inspect','queryInterface','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','sequence','query','final','stringify','finally','table\x20dropped\x20%s','fax_applications','query\x20%s','ALTER\x20TABLE\x20tools_canned_answers\x20CONVERT\x20TO\x20CHARACTER\x20SET\x20utf8mb4\x20COLLATE\x20utf8mb4_unicode_ci;','tail','join','catch','renameColumn','appdata','info','dropTable','Added\x20column\x20%s\x20to\x20%s','then','addColumn','removeColumn','sequelize','enqueue','TEXT','openchannel_applications','addIndex','../config/logger','changeColumn','prototype','exports','removeIndex'];(function(_0x44e477,_0x525aaf){const _0x528f18=function(_0x4993c0){while(--_0x4993c0){_0x44e477['push'](_0x44e477['shift']());}};_0x528f18(++_0x525aaf);}(a976_0x525a,0x15e));const a976_0x528f=function(_0x44e477,_0x525aaf){_0x44e477=_0x44e477-0x0;let _0x528f18=a976_0x525a[_0x44e477];return _0x528f18;};const _0x27a18d=a976_0x528f;'use strict';const util=require('util'),logger=require(_0x27a18d('0x8'))('migration'),Sequence=function(){};Sequence[_0x27a18d('0xa')][_0x27a18d('0x4')]=function(_0x4993c0){const _0x909d47=_0x27a18d;this['tail']=this['tail']?this[_0x909d47('0x19')][_0x909d47('0x14')](_0x4993c0):_0x4993c0();};const Migration=function(_0x203cb3){const _0x381dfb=_0x27a18d;this[_0x381dfb('0xe')]=_0x203cb3,this['sequence']=new Sequence();};Migration[_0x27a18d('0xa')]['changeColumn']=function(_0xd43fe0,_0x152ef0,_0x122e41){const _0x399915=_0x27a18d,_0x30ae4a=this;this[_0x399915('0x10')][_0x399915('0x4')](function(){const _0x35a42c=_0x399915;return _0x30ae4a['queryInterface'][_0x35a42c('0x9')](_0xd43fe0,_0x152ef0,_0x122e41)['then'](function(){const _0x450ed2=_0x35a42c;logger[_0x450ed2('0x1e')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x152ef0,_0xd43fe0);})[_0x35a42c('0x1b')](function(_0x12c9b2){const _0x15d877=_0x35a42c;logger[_0x15d877('0x1e')](JSON[_0x15d877('0x13')](_0x12c9b2));});});},Migration['prototype'][_0x27a18d('0x1')]=function(_0x749e4c,_0x2ed0bf,_0x567d4f){const _0x41391e=this;this['sequence']['enqueue'](function(){const _0xf25923=a976_0x528f;return _0x41391e[_0xf25923('0xe')][_0xf25923('0x1')](_0x749e4c,_0x2ed0bf,_0x567d4f)[_0xf25923('0x0')](function(){const _0x3c66d3=_0xf25923;logger[_0x3c66d3('0x1e')](_0x3c66d3('0x20'),_0x2ed0bf,_0x749e4c);})[_0xf25923('0x1b')](function(_0x190926){const _0x4b60dd=_0xf25923;logger[_0x4b60dd('0x1e')](JSON['stringify'](_0x190926));});});},Migration['prototype']['dropTable']=function(_0x8c21fb){const _0x291c56=_0x27a18d,_0x5aed1d=this;this[_0x291c56('0x10')][_0x291c56('0x4')](function(){const _0x1dc13e=_0x291c56;return _0x5aed1d['queryInterface'][_0x1dc13e('0x1f')](_0x8c21fb,{'force':!![]})[_0x1dc13e('0x0')](function(){const _0x16738c=_0x1dc13e;logger[_0x16738c('0x1e')](_0x16738c('0x15'),_0x8c21fb);})[_0x1dc13e('0x1b')](function(_0x585f5f){const _0x34e9a4=_0x1dc13e;logger[_0x34e9a4('0x1e')](JSON[_0x34e9a4('0x13')](_0x585f5f));});});},Migration[_0x27a18d('0xa')]['addIndex']=function(_0x1ecff6,_0x49dd0d,_0x256225){const _0x44165b=_0x27a18d,_0x3dcf7f=this;this['sequence'][_0x44165b('0x4')](function(){const _0x39b4cd=_0x44165b;return _0x3dcf7f[_0x39b4cd('0xe')][_0x39b4cd('0x7')](_0x1ecff6,_0x49dd0d,{'indexName':_0x256225})['then'](function(){const _0x3b65eb=_0x39b4cd;logger[_0x3b65eb('0x1e')]('addIndex\x20%s\x20%s\x20%s',_0x1ecff6,_0x49dd0d[_0x3b65eb('0x1a')](','),_0x256225);})[_0x39b4cd('0x1b')](function(_0x334459){logger['info'](JSON['stringify'](_0x334459));});});},Migration['prototype'][_0x27a18d('0xc')]=function(_0xc92d80,_0x1e4b4a){const _0x5f3536=_0x27a18d,_0x56bfde=this;this[_0x5f3536('0x10')][_0x5f3536('0x4')](function(){const _0x23f275=_0x5f3536;return _0x56bfde['queryInterface']['removeIndex'](_0xc92d80,_0x1e4b4a)[_0x23f275('0x0')](function(){logger['info']('removeIndex\x20%s\x20%s',_0xc92d80,_0x1e4b4a);})[_0x23f275('0x1b')](function(_0x389ba0){logger['info'](JSON['stringify'](_0x389ba0));});});},Migration[_0x27a18d('0xa')][_0x27a18d('0x11')]=function(_0x359c25){const _0x387e4e=_0x27a18d,_0xd756f5=this;this[_0x387e4e('0x10')][_0x387e4e('0x4')](function(){const _0x3a9cd3=_0x387e4e;return _0xd756f5[_0x3a9cd3('0xe')][_0x3a9cd3('0x3')][_0x3a9cd3('0x11')](_0x359c25)[_0x3a9cd3('0x0')](function(){const _0x4e69ca=_0x3a9cd3;logger[_0x4e69ca('0x1e')](_0x4e69ca('0x17'),_0x359c25);})[_0x3a9cd3('0x1b')](function(_0x375fea){const _0x1e53f9=_0x3a9cd3;logger[_0x1e53f9('0x1e')](JSON[_0x1e53f9('0x13')](_0x375fea));});});},Migration['prototype'][_0x27a18d('0x2')]=function(_0x575906,_0x1147c2){const _0x467678=_0x27a18d,_0x18ae3d=this;this[_0x467678('0x10')][_0x467678('0x4')](function(){const _0x185310=_0x467678;return _0x18ae3d[_0x185310('0xe')][_0x185310('0x2')](_0x575906,_0x1147c2)[_0x185310('0x0')](function(){const _0x2c4039=_0x185310;logger[_0x2c4039('0x1e')]('Removed\x20column\x20%s\x20from\x20%s',_0x1147c2,_0x575906);})[_0x185310('0x1b')](function(_0x2f835e){const _0x5cef92=_0x185310;logger[_0x5cef92('0x1e')](util['inspect'](_0x2f835e,{'showHidden':![],'depth':null}));});});},Migration[_0x27a18d('0xa')][_0x27a18d('0x1c')]=function(_0x1f2a48,_0x13f9f8,_0x28c635){const _0x3e8fa8=_0x27a18d,_0xe2c8ba=this;this['sequence'][_0x3e8fa8('0x4')](function(){const _0x3afa37=_0x3e8fa8;return _0xe2c8ba[_0x3afa37('0xe')][_0x3afa37('0x1c')](_0x1f2a48,_0x13f9f8,_0x28c635)[_0x3afa37('0x0')](function(){const _0xfa4ec2=_0x3afa37;logger['info'](_0xfa4ec2('0xf'),_0x13f9f8,_0x28c635,_0x1f2a48);})['catch'](function(_0x4fbffc){const _0x5ac003=_0x3afa37;logger[_0x5ac003('0x1e')](util[_0x5ac003('0xd')](_0x4fbffc,{'showHidden':![],'depth':null}));});});},Migration[_0x27a18d('0xa')][_0x27a18d('0x12')]=function(_0x29f043){const _0x21273c=_0x27a18d;this[_0x21273c('0x10')][_0x21273c('0x4')](function(){return _0x29f043();});},module[_0x27a18d('0xb')]={'up':function(_0x53d7f4,_0xd04b61){return new Promise(function(_0x502f86){const _0x27eb2a=a976_0x528f,_0xcaeb57=new Migration(_0x53d7f4);_0xcaeb57[_0x27eb2a('0x11')](_0x27eb2a('0x18')),_0xcaeb57[_0x27eb2a('0x9')]('chat_applications',_0x27eb2a('0x1d'),{'type':_0xd04b61['TEXT']()}),_0xcaeb57['changeColumn'](_0x27eb2a('0x16'),_0x27eb2a('0x1d'),{'type':_0xd04b61[_0x27eb2a('0x5')]()}),_0xcaeb57[_0x27eb2a('0x9')]('mail_applications','appdata',{'type':_0xd04b61[_0x27eb2a('0x5')]()}),_0xcaeb57[_0x27eb2a('0x9')](_0x27eb2a('0x6'),_0x27eb2a('0x1d'),{'type':_0xd04b61['TEXT']()}),_0xcaeb57[_0x27eb2a('0x9')]('sms_applications',_0x27eb2a('0x1d'),{'type':_0xd04b61[_0x27eb2a('0x5')]()}),_0xcaeb57['final'](_0x502f86);});},'down':function(){}};
\ No newline at end of file