Built motion from commit f651e4b0a7312c0adceb5e57d6684a801a3aaf0d. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.68.js
index 0b15a91..a3e5758 100644 (file)
@@ -1 +1 @@
-const a947_0x5abf=['join','queryInterface','then','Changed\x20column\x20%s\x20in\x20table\x20%s','removeColumn','final','query\x20%s','dropTable','addIndex\x20%s\x20%s\x20%s','STRING','table\x20dropped\x20%s','addColumn','sequence','Added\x20column\x20%s\x20to\x20%s','removeIndex','UPDATE\x20settings\x20SET\x20messagesAlignment=\x27alternate\x27','prototype','tail','finally','changeColumn','catch','inspect','../config/logger','INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Not\x20Interested\x27,\x20NOW(),\x20NOW())','renameColumn','enqueue','messagesAlignment','INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Interested\x27,\x20NOW(),\x20NOW())','Removed\x20column\x20%s\x20from\x20%s','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','addIndex','chat_interactions','query','stringify','info','mapKey'];(function(_0x7ff1c2,_0x5abf21){const _0x1f080d=function(_0x4bddd1){while(--_0x4bddd1){_0x7ff1c2['push'](_0x7ff1c2['shift']());}};_0x1f080d(++_0x5abf21);}(a947_0x5abf,0x65));const a947_0x1f08=function(_0x7ff1c2,_0x5abf21){_0x7ff1c2=_0x7ff1c2-0x0;let _0x1f080d=a947_0x5abf[_0x7ff1c2];return _0x1f080d;};const _0xcbd58f=a947_0x1f08;'use strict';const util=require('util'),logger=require(_0xcbd58f('0x1d'))('migration'),Sequence=function(){};Sequence[_0xcbd58f('0x17')]['enqueue']=function(_0x4bddd1){const _0x1766ce=_0xcbd58f;this['tail']=this[_0x1766ce('0x18')]?this[_0x1766ce('0x18')][_0x1766ce('0x19')](_0x4bddd1):_0x4bddd1();};const Migration=function(_0x4aab74){const _0x4ce9df=_0xcbd58f;this[_0x4ce9df('0x8')]=_0x4aab74,this[_0x4ce9df('0x13')]=new Sequence();};Migration[_0xcbd58f('0x17')]['changeColumn']=function(_0x3c9ae,_0x459f07,_0x277476){const _0x264aca=_0xcbd58f,_0x4ba09e=this;this[_0x264aca('0x13')][_0x264aca('0x20')](function(){const _0x1dd578=_0x264aca;return _0x4ba09e['queryInterface'][_0x1dd578('0x1a')](_0x3c9ae,_0x459f07,_0x277476)[_0x1dd578('0x9')](function(){const _0x13291f=_0x1dd578;logger[_0x13291f('0x5')](_0x13291f('0xa'),_0x459f07,_0x3c9ae);})[_0x1dd578('0x1b')](function(_0x4fe573){const _0x47ce3d=_0x1dd578;logger[_0x47ce3d('0x5')](JSON[_0x47ce3d('0x4')](_0x4fe573));});});},Migration[_0xcbd58f('0x17')][_0xcbd58f('0x12')]=function(_0x30003e,_0x4de1ef,_0x50b461){const _0x29491f=_0xcbd58f,_0xebfc30=this;this[_0x29491f('0x13')][_0x29491f('0x20')](function(){const _0x218cdd=_0x29491f;return _0xebfc30[_0x218cdd('0x8')][_0x218cdd('0x12')](_0x30003e,_0x4de1ef,_0x50b461)[_0x218cdd('0x9')](function(){const _0x2de3c7=_0x218cdd;logger[_0x2de3c7('0x5')](_0x2de3c7('0x14'),_0x4de1ef,_0x30003e);})['catch'](function(_0x37e892){const _0x49dd5f=_0x218cdd;logger[_0x49dd5f('0x5')](JSON[_0x49dd5f('0x4')](_0x37e892));});});},Migration['prototype'][_0xcbd58f('0xe')]=function(_0xb9d9d7){const _0x2d4922=_0xcbd58f,_0xb4984d=this;this[_0x2d4922('0x13')][_0x2d4922('0x20')](function(){const _0x86aa0c=_0x2d4922;return _0xb4984d[_0x86aa0c('0x8')]['dropTable'](_0xb9d9d7,{'force':!![]})[_0x86aa0c('0x9')](function(){const _0x958b14=_0x86aa0c;logger[_0x958b14('0x5')](_0x958b14('0x11'),_0xb9d9d7);})[_0x86aa0c('0x1b')](function(_0x28f80d){const _0x51317b=_0x86aa0c;logger['info'](JSON[_0x51317b('0x4')](_0x28f80d));});});},Migration[_0xcbd58f('0x17')][_0xcbd58f('0x1')]=function(_0x52eb55,_0x8c1a91,_0x79f00b){const _0x13dfd5=_0xcbd58f,_0x6d794a=this;this['sequence'][_0x13dfd5('0x20')](function(){const _0x40027d=_0x13dfd5;return _0x6d794a['queryInterface'][_0x40027d('0x1')](_0x52eb55,_0x8c1a91,{'indexName':_0x79f00b})[_0x40027d('0x9')](function(){const _0x5347ff=_0x40027d;logger[_0x5347ff('0x5')](_0x5347ff('0xf'),_0x52eb55,_0x8c1a91[_0x5347ff('0x7')](','),_0x79f00b);})[_0x40027d('0x1b')](function(_0x3b5512){const _0x36e0ad=_0x40027d;logger[_0x36e0ad('0x5')](JSON[_0x36e0ad('0x4')](_0x3b5512));});});},Migration['prototype'][_0xcbd58f('0x15')]=function(_0x6a794c,_0x1006cf){const _0x4b5168=_0xcbd58f,_0x31a1da=this;this[_0x4b5168('0x13')][_0x4b5168('0x20')](function(){const _0xc9e07e=_0x4b5168;return _0x31a1da[_0xc9e07e('0x8')][_0xc9e07e('0x15')](_0x6a794c,_0x1006cf)['then'](function(){const _0x17b9de=_0xc9e07e;logger[_0x17b9de('0x5')]('removeIndex\x20%s\x20%s',_0x6a794c,_0x1006cf);})[_0xc9e07e('0x1b')](function(_0x19c5c5){const _0x5db8ef=_0xc9e07e;logger[_0x5db8ef('0x5')](JSON[_0x5db8ef('0x4')](_0x19c5c5));});});},Migration['prototype'][_0xcbd58f('0x3')]=function(_0x472883){const _0x240269=_0xcbd58f,_0x3e7b6f=this;this[_0x240269('0x13')][_0x240269('0x20')](function(){const _0x5daa5=_0x240269;return _0x3e7b6f[_0x5daa5('0x8')]['sequelize'][_0x5daa5('0x3')](_0x472883)[_0x5daa5('0x9')](function(){const _0x130e43=_0x5daa5;logger[_0x130e43('0x5')](_0x130e43('0xd'),_0x472883);})[_0x5daa5('0x1b')](function(_0xfb9aa2){const _0x370981=_0x5daa5;logger[_0x370981('0x5')](JSON[_0x370981('0x4')](_0xfb9aa2));});});},Migration[_0xcbd58f('0x17')][_0xcbd58f('0xb')]=function(_0x4e2ffa,_0x3ad22d){const _0x3c1759=_0xcbd58f,_0x2bcba8=this;this[_0x3c1759('0x13')][_0x3c1759('0x20')](function(){const _0x270053=_0x3c1759;return _0x2bcba8['queryInterface'][_0x270053('0xb')](_0x4e2ffa,_0x3ad22d)['then'](function(){const _0x2e3a5a=_0x270053;logger[_0x2e3a5a('0x5')](_0x2e3a5a('0x23'),_0x3ad22d,_0x4e2ffa);})['catch'](function(_0x3cf5f6){const _0x555486=_0x270053;logger[_0x555486('0x5')](util[_0x555486('0x1c')](_0x3cf5f6,{'showHidden':![],'depth':null}));});});},Migration[_0xcbd58f('0x17')][_0xcbd58f('0x1f')]=function(_0x173236,_0x181c07,_0x315cb2){const _0x4e9c53=_0xcbd58f,_0xc39567=this;this[_0x4e9c53('0x13')][_0x4e9c53('0x20')](function(){const _0x369f15=_0x4e9c53;return _0xc39567[_0x369f15('0x8')]['renameColumn'](_0x173236,_0x181c07,_0x315cb2)[_0x369f15('0x9')](function(){const _0x45e373=_0x369f15;logger[_0x45e373('0x5')](_0x45e373('0x0'),_0x181c07,_0x315cb2,_0x173236);})[_0x369f15('0x1b')](function(_0xc543b9){const _0x73f409=_0x369f15;logger[_0x73f409('0x5')](util[_0x73f409('0x1c')](_0xc543b9,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0xcbd58f('0xc')]=function(_0x5d7f6b){const _0xae0aa2=_0xcbd58f;this[_0xae0aa2('0x13')][_0xae0aa2('0x20')](function(){return _0x5d7f6b();});},module['exports']={'up':function(_0x311825,_0x9a234b){return new Promise(function(_0x1e7eb7){const _0xfb4e6=a947_0x1f08,_0x779508=new Migration(_0x311825);_0x779508[_0xfb4e6('0x3')]('INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Fax\x27,\x20NOW(),\x20NOW())'),_0x779508[_0xfb4e6('0x3')]('INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Answer\x20Machine\x27,\x20NOW(),\x20NOW())'),_0x779508[_0xfb4e6('0x3')](_0xfb4e6('0x22')),_0x779508[_0xfb4e6('0x3')](_0xfb4e6('0x1e')),_0x779508[_0xfb4e6('0x3')]('INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Sold\x27,\x20NOW(),\x20NOW())'),_0x779508[_0xfb4e6('0x3')]('INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Special\x27,\x20NOW(),\x20NOW())'),_0x779508[_0xfb4e6('0x12')]('openchannel_accounts',_0xfb4e6('0x6'),{'type':_0x9a234b[_0xfb4e6('0x10')]}),_0x779508[_0xfb4e6('0x12')](_0xfb4e6('0x2'),'closeReason',{'type':_0x9a234b['STRING']}),_0x779508['addColumn']('settings',_0xfb4e6('0x21'),{'type':_0x9a234b[_0xfb4e6('0x10')]}),_0x779508[_0xfb4e6('0x3')](_0xfb4e6('0x16')),_0x779508[_0xfb4e6('0xc')](_0x1e7eb7);});},'down':function(){}};
\ No newline at end of file
+const a947_0x2ef9=['sequence','mapKey','settings','STRING','changeColumn','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','migration','info','prototype','renameColumn','tail','addColumn','exports','INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Answer\x20Machine\x27,\x20NOW(),\x20NOW())','Added\x20column\x20%s\x20to\x20%s','then','INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Sold\x27,\x20NOW(),\x20NOW())','join','query','Removed\x20column\x20%s\x20from\x20%s','INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Not\x20Interested\x27,\x20NOW(),\x20NOW())','addIndex','closeReason','Changed\x20column\x20%s\x20in\x20table\x20%s','removeIndex','inspect','sequelize','removeColumn','enqueue','UPDATE\x20settings\x20SET\x20messagesAlignment=\x27alternate\x27','openchannel_accounts','query\x20%s','catch','queryInterface','stringify','messagesAlignment','table\x20dropped\x20%s','chat_interactions','final','INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Interested\x27,\x20NOW(),\x20NOW())','util','dropTable','../config/logger'];(function(_0x36ce84,_0x2ef9ab){const _0x257efe=function(_0x52f3a4){while(--_0x52f3a4){_0x36ce84['push'](_0x36ce84['shift']());}};_0x257efe(++_0x2ef9ab);}(a947_0x2ef9,0x9f));const a947_0x257e=function(_0x36ce84,_0x2ef9ab){_0x36ce84=_0x36ce84-0x0;let _0x257efe=a947_0x2ef9[_0x36ce84];return _0x257efe;};const _0xc5b0ec=a947_0x257e;'use strict';const util=require(_0xc5b0ec('0xa')),logger=require(_0xc5b0ec('0xc'))(_0xc5b0ec('0x13')),Sequence=function(){};Sequence[_0xc5b0ec('0x15')][_0xc5b0ec('0x29')]=function(_0x52f3a4){const _0x465ec0=_0xc5b0ec;this[_0x465ec0('0x17')]=this[_0x465ec0('0x17')]?this['tail']['finally'](_0x52f3a4):_0x52f3a4();};const Migration=function(_0x351f39){const _0x34090a=_0xc5b0ec;this[_0x34090a('0x3')]=_0x351f39,this[_0x34090a('0xd')]=new Sequence();};Migration['prototype']['changeColumn']=function(_0x407a3c,_0x745000,_0x1980f7){const _0x158077=_0xc5b0ec,_0x39f422=this;this['sequence'][_0x158077('0x29')](function(){const _0x41dee0=_0x158077;return _0x39f422['queryInterface'][_0x41dee0('0x11')](_0x407a3c,_0x745000,_0x1980f7)[_0x41dee0('0x1c')](function(){const _0x59761f=_0x41dee0;logger[_0x59761f('0x14')](_0x59761f('0x24'),_0x745000,_0x407a3c);})[_0x41dee0('0x2')](function(_0x581b22){const _0x2b9309=_0x41dee0;logger[_0x2b9309('0x14')](JSON[_0x2b9309('0x4')](_0x581b22));});});},Migration[_0xc5b0ec('0x15')][_0xc5b0ec('0x18')]=function(_0x22c57,_0x29df84,_0x50ecf7){const _0x3eba5c=_0xc5b0ec,_0x17ecb6=this;this[_0x3eba5c('0xd')][_0x3eba5c('0x29')](function(){const _0x34bd60=_0x3eba5c;return _0x17ecb6['queryInterface']['addColumn'](_0x22c57,_0x29df84,_0x50ecf7)['then'](function(){const _0xefe161=a947_0x257e;logger[_0xefe161('0x14')](_0xefe161('0x1b'),_0x29df84,_0x22c57);})[_0x34bd60('0x2')](function(_0x53c351){const _0x23ce56=_0x34bd60;logger[_0x23ce56('0x14')](JSON[_0x23ce56('0x4')](_0x53c351));});});},Migration['prototype'][_0xc5b0ec('0xb')]=function(_0x11322d){const _0x57d307=_0xc5b0ec,_0x30261f=this;this[_0x57d307('0xd')][_0x57d307('0x29')](function(){const _0xffeb9f=_0x57d307;return _0x30261f[_0xffeb9f('0x3')][_0xffeb9f('0xb')](_0x11322d,{'force':!![]})[_0xffeb9f('0x1c')](function(){const _0x44b13b=_0xffeb9f;logger['info'](_0x44b13b('0x6'),_0x11322d);})['catch'](function(_0x328c4a){const _0xfb33fe=_0xffeb9f;logger['info'](JSON[_0xfb33fe('0x4')](_0x328c4a));});});},Migration['prototype']['addIndex']=function(_0x35a546,_0x190b4f,_0x3a9475){const _0x462f11=_0xc5b0ec,_0x28c460=this;this[_0x462f11('0xd')][_0x462f11('0x29')](function(){const _0x4cc17e=_0x462f11;return _0x28c460['queryInterface'][_0x4cc17e('0x22')](_0x35a546,_0x190b4f,{'indexName':_0x3a9475})[_0x4cc17e('0x1c')](function(){const _0x27525f=_0x4cc17e;logger['info']('addIndex\x20%s\x20%s\x20%s',_0x35a546,_0x190b4f[_0x27525f('0x1e')](','),_0x3a9475);})[_0x4cc17e('0x2')](function(_0xba530c){logger['info'](JSON['stringify'](_0xba530c));});});},Migration[_0xc5b0ec('0x15')][_0xc5b0ec('0x25')]=function(_0x38b33b,_0x1511a0){const _0x19c5d5=_0xc5b0ec,_0x37c8fb=this;this[_0x19c5d5('0xd')][_0x19c5d5('0x29')](function(){const _0x858cf9=_0x19c5d5;return _0x37c8fb[_0x858cf9('0x3')]['removeIndex'](_0x38b33b,_0x1511a0)[_0x858cf9('0x1c')](function(){logger['info']('removeIndex\x20%s\x20%s',_0x38b33b,_0x1511a0);})['catch'](function(_0x3c01dc){const _0x48dae0=_0x858cf9;logger[_0x48dae0('0x14')](JSON[_0x48dae0('0x4')](_0x3c01dc));});});},Migration['prototype'][_0xc5b0ec('0x1f')]=function(_0x57745f){const _0x385eb2=_0xc5b0ec,_0x2a3030=this;this['sequence'][_0x385eb2('0x29')](function(){const _0x32d13f=_0x385eb2;return _0x2a3030[_0x32d13f('0x3')][_0x32d13f('0x27')][_0x32d13f('0x1f')](_0x57745f)[_0x32d13f('0x1c')](function(){const _0x1aa7e1=_0x32d13f;logger[_0x1aa7e1('0x14')](_0x1aa7e1('0x1'),_0x57745f);})[_0x32d13f('0x2')](function(_0x36d9a9){const _0x188fd0=_0x32d13f;logger[_0x188fd0('0x14')](JSON[_0x188fd0('0x4')](_0x36d9a9));});});},Migration[_0xc5b0ec('0x15')][_0xc5b0ec('0x28')]=function(_0x56b595,_0x27efea){const _0x3ad4e6=_0xc5b0ec,_0x581e16=this;this['sequence'][_0x3ad4e6('0x29')](function(){const _0x2c1fba=_0x3ad4e6;return _0x581e16[_0x2c1fba('0x3')][_0x2c1fba('0x28')](_0x56b595,_0x27efea)[_0x2c1fba('0x1c')](function(){const _0x3ce5be=_0x2c1fba;logger[_0x3ce5be('0x14')](_0x3ce5be('0x20'),_0x27efea,_0x56b595);})[_0x2c1fba('0x2')](function(_0x3a0aaf){const _0x2fd9d7=_0x2c1fba;logger[_0x2fd9d7('0x14')](util[_0x2fd9d7('0x26')](_0x3a0aaf,{'showHidden':![],'depth':null}));});});},Migration[_0xc5b0ec('0x15')][_0xc5b0ec('0x16')]=function(_0x508c38,_0xb0b474,_0x42a6eb){const _0x56ec4f=_0xc5b0ec,_0x48030d=this;this[_0x56ec4f('0xd')][_0x56ec4f('0x29')](function(){const _0x47d5ec=_0x56ec4f;return _0x48030d[_0x47d5ec('0x3')][_0x47d5ec('0x16')](_0x508c38,_0xb0b474,_0x42a6eb)[_0x47d5ec('0x1c')](function(){const _0x894484=_0x47d5ec;logger['info'](_0x894484('0x12'),_0xb0b474,_0x42a6eb,_0x508c38);})[_0x47d5ec('0x2')](function(_0x5627a6){const _0x203fbd=_0x47d5ec;logger[_0x203fbd('0x14')](util[_0x203fbd('0x26')](_0x5627a6,{'showHidden':![],'depth':null}));});});},Migration[_0xc5b0ec('0x15')][_0xc5b0ec('0x8')]=function(_0x2468ec){const _0x25f9af=_0xc5b0ec;this[_0x25f9af('0xd')]['enqueue'](function(){return _0x2468ec();});},module[_0xc5b0ec('0x19')]={'up':function(_0x318349,_0x37dfb8){return new Promise(function(_0x1666f5){const _0x128575=a947_0x257e,_0xdb48a3=new Migration(_0x318349);_0xdb48a3[_0x128575('0x1f')]('INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Fax\x27,\x20NOW(),\x20NOW())'),_0xdb48a3[_0x128575('0x1f')](_0x128575('0x1a')),_0xdb48a3[_0x128575('0x1f')](_0x128575('0x9')),_0xdb48a3[_0x128575('0x1f')](_0x128575('0x21')),_0xdb48a3[_0x128575('0x1f')](_0x128575('0x1d')),_0xdb48a3[_0x128575('0x1f')]('INSERT\x20INTO\x20tools_dispositions\x20(`name`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27Special\x27,\x20NOW(),\x20NOW())'),_0xdb48a3['addColumn'](_0x128575('0x0'),_0x128575('0xe'),{'type':_0x37dfb8[_0x128575('0x10')]}),_0xdb48a3[_0x128575('0x18')](_0x128575('0x7'),_0x128575('0x23'),{'type':_0x37dfb8[_0x128575('0x10')]}),_0xdb48a3[_0x128575('0x18')](_0x128575('0xf'),_0x128575('0x5'),{'type':_0x37dfb8[_0x128575('0x10')]}),_0xdb48a3[_0x128575('0x1f')](_0x128575('0x2a')),_0xdb48a3[_0x128575('0x8')](_0x1666f5);});},'down':function(){}};
\ No newline at end of file