e0905b7ced0c5d13d3015617276d0f0c0cf8c58c
[motion-next.git] / server / migrations / 2.0.72.js
1 const a951_0x33b3=['renameColumn','enqueue','queryInterface','uniqueid','prototype','Changed\x20column\x20%s\x20in\x20table\x20%s','report_square','then','info','stringify','addColumn','inspect','table\x20dropped\x20%s','migration','addIndex\x20%s\x20%s\x20%s','changeColumn','removeColumn','DELETE\x20FROM\x20user_has_voice_queues_rt\x20WHERE\x20UserId\x20NOT\x20IN\x20(SELECT\x20id\x20FROM\x20users\x20WHERE\x20role\x20=\x20\x27agent\x27)','query','final','exports','removeIndex\x20%s\x20%s','sequence','dropTable','finally','catch','leaveAt','../config/logger','addIndex','util','tail','removeIndex'];(function(_0x9b0004,_0x33b302){const _0x2cc68e=function(_0x1f3692){while(--_0x1f3692){_0x9b0004['push'](_0x9b0004['shift']());}};_0x2cc68e(++_0x33b302);}(a951_0x33b3,0xf4));const a951_0x2cc6=function(_0x9b0004,_0x33b302){_0x9b0004=_0x9b0004-0x0;let _0x2cc68e=a951_0x33b3[_0x9b0004];return _0x2cc68e;};const _0x11d647=a951_0x2cc6;'use strict';const util=require(_0x11d647('0x9')),logger=require(_0x11d647('0x7'))(_0x11d647('0x19')),Sequence=function(){};Sequence['prototype'][_0x11d647('0xd')]=function(_0x1f3692){const _0x402e99=_0x11d647;this[_0x402e99('0xa')]=this[_0x402e99('0xa')]?this['tail'][_0x402e99('0x4')](_0x1f3692):_0x1f3692();};const Migration=function(_0x5cbae5){this['queryInterface']=_0x5cbae5,this['sequence']=new Sequence();};Migration[_0x11d647('0x10')][_0x11d647('0x1b')]=function(_0x34c8df,_0x252ee8,_0x890e5c){const _0x36ada0=_0x11d647,_0xfd0ac9=this;this[_0x36ada0('0x2')][_0x36ada0('0xd')](function(){const _0x278840=_0x36ada0;return _0xfd0ac9['queryInterface'][_0x278840('0x1b')](_0x34c8df,_0x252ee8,_0x890e5c)[_0x278840('0x13')](function(){const _0x2fbf62=_0x278840;logger[_0x2fbf62('0x14')](_0x2fbf62('0x11'),_0x252ee8,_0x34c8df);})[_0x278840('0x5')](function(_0x3ede84){const _0x3c988a=_0x278840;logger[_0x3c988a('0x14')](JSON[_0x3c988a('0x15')](_0x3ede84));});});},Migration[_0x11d647('0x10')]['addColumn']=function(_0x3c8bf3,_0x4be134,_0x9acb83){const _0x546e85=_0x11d647,_0x259489=this;this[_0x546e85('0x2')][_0x546e85('0xd')](function(){const _0x1e7c69=_0x546e85;return _0x259489[_0x1e7c69('0xe')][_0x1e7c69('0x16')](_0x3c8bf3,_0x4be134,_0x9acb83)[_0x1e7c69('0x13')](function(){const _0x259ebb=_0x1e7c69;logger[_0x259ebb('0x14')]('Added\x20column\x20%s\x20to\x20%s',_0x4be134,_0x3c8bf3);})[_0x1e7c69('0x5')](function(_0x2760af){const _0x85143b=_0x1e7c69;logger[_0x85143b('0x14')](JSON[_0x85143b('0x15')](_0x2760af));});});},Migration['prototype'][_0x11d647('0x3')]=function(_0x384612){const _0x52eb23=_0x11d647,_0x4dda47=this;this['sequence'][_0x52eb23('0xd')](function(){const _0x3359c7=_0x52eb23;return _0x4dda47[_0x3359c7('0xe')]['dropTable'](_0x384612,{'force':!![]})['then'](function(){const _0x590216=_0x3359c7;logger[_0x590216('0x14')](_0x590216('0x18'),_0x384612);})[_0x3359c7('0x5')](function(_0x1d733a){const _0x2b103d=_0x3359c7;logger[_0x2b103d('0x14')](JSON[_0x2b103d('0x15')](_0x1d733a));});});},Migration[_0x11d647('0x10')][_0x11d647('0x8')]=function(_0x5157c3,_0x14f35d,_0x3cf250){const _0x2bda52=_0x11d647,_0x547f9a=this;this[_0x2bda52('0x2')][_0x2bda52('0xd')](function(){const _0x5452c5=_0x2bda52;return _0x547f9a[_0x5452c5('0xe')]['addIndex'](_0x5157c3,_0x14f35d,{'indexName':_0x3cf250})['then'](function(){const _0x161a4c=_0x5452c5;logger[_0x161a4c('0x14')](_0x161a4c('0x1a'),_0x5157c3,_0x14f35d['join'](','),_0x3cf250);})[_0x5452c5('0x5')](function(_0x16aff4){const _0x466737=_0x5452c5;logger['info'](JSON[_0x466737('0x15')](_0x16aff4));});});},Migration[_0x11d647('0x10')][_0x11d647('0xb')]=function(_0x52f765,_0xdc427){const _0x32f354=_0x11d647,_0x413346=this;this[_0x32f354('0x2')]['enqueue'](function(){const _0x540f3c=_0x32f354;return _0x413346[_0x540f3c('0xe')][_0x540f3c('0xb')](_0x52f765,_0xdc427)[_0x540f3c('0x13')](function(){const _0x2a47fa=_0x540f3c;logger['info'](_0x2a47fa('0x1'),_0x52f765,_0xdc427);})[_0x540f3c('0x5')](function(_0x2aa294){const _0x2aeebd=_0x540f3c;logger[_0x2aeebd('0x14')](JSON[_0x2aeebd('0x15')](_0x2aa294));});});},Migration['prototype'][_0x11d647('0x1e')]=function(_0x32032c){const _0x2f2cdb=_0x11d647,_0x2eb7eb=this;this[_0x2f2cdb('0x2')][_0x2f2cdb('0xd')](function(){const _0x46688e=_0x2f2cdb;return _0x2eb7eb[_0x46688e('0xe')]['sequelize'][_0x46688e('0x1e')](_0x32032c)[_0x46688e('0x13')](function(){const _0x4ad9dd=_0x46688e;logger[_0x4ad9dd('0x14')]('query\x20%s',_0x32032c);})['catch'](function(_0x43c00a){const _0xe291f3=_0x46688e;logger[_0xe291f3('0x14')](JSON[_0xe291f3('0x15')](_0x43c00a));});});},Migration[_0x11d647('0x10')][_0x11d647('0x1c')]=function(_0x4bd9a8,_0x18533d){const _0x103f64=this;this['sequence']['enqueue'](function(){const _0x5e06ca=a951_0x2cc6;return _0x103f64[_0x5e06ca('0xe')][_0x5e06ca('0x1c')](_0x4bd9a8,_0x18533d)[_0x5e06ca('0x13')](function(){const _0x467168=_0x5e06ca;logger[_0x467168('0x14')]('Removed\x20column\x20%s\x20from\x20%s',_0x18533d,_0x4bd9a8);})[_0x5e06ca('0x5')](function(_0x27c1b8){const _0x2f0b5b=_0x5e06ca;logger[_0x2f0b5b('0x14')](util[_0x2f0b5b('0x17')](_0x27c1b8,{'showHidden':![],'depth':null}));});});},Migration[_0x11d647('0x10')][_0x11d647('0xc')]=function(_0x2e0429,_0x2ee82a,_0x1eb510){const _0x11d1a5=this;this['sequence']['enqueue'](function(){const _0x17c261=a951_0x2cc6;return _0x11d1a5[_0x17c261('0xe')][_0x17c261('0xc')](_0x2e0429,_0x2ee82a,_0x1eb510)[_0x17c261('0x13')](function(){const _0x422919=_0x17c261;logger[_0x422919('0x14')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x2ee82a,_0x1eb510,_0x2e0429);})[_0x17c261('0x5')](function(_0x2fbed6){const _0x56e005=_0x17c261;logger[_0x56e005('0x14')](util[_0x56e005('0x17')](_0x2fbed6,{'showHidden':![],'depth':null}));});});},Migration[_0x11d647('0x10')][_0x11d647('0x1f')]=function(_0x240da1){const _0x31dce4=_0x11d647;this[_0x31dce4('0x2')][_0x31dce4('0xd')](function(){return _0x240da1();});},module[_0x11d647('0x0')]={'up':function(_0x599513){return new Promise(function(_0x186e43){const _0x44b64f=a951_0x2cc6,_0x2270e8=new Migration(_0x599513);_0x2270e8[_0x44b64f('0x1e')](_0x44b64f('0x1d')),_0x2270e8[_0x44b64f('0x8')](_0x44b64f('0x12'),[_0x44b64f('0xf'),'project_name'],'uid_pname'),_0x2270e8['addIndex'](_0x44b64f('0x12'),[_0x44b64f('0x6')],_0x44b64f('0x6')),_0x2270e8[_0x44b64f('0x1f')](_0x186e43);});},'down':function(){}};