b89bc8646108880bc2b6d2c4ab9320813ca68c01
[motion-next.git] / server / migrations / 2.2.3.js
1 const a968_0x386e=['removeIndex','inspect','join','../config/logger','sequelize','changeColumn','util','prototype','removeColumn','inReplyTo','mail_interactions','catch','enqueue','Removed\x20column\x20%s\x20from\x20%s','renameColumn','exports','tail','query\x20%s','Changed\x20column\x20%s\x20in\x20table\x20%s','migration','Added\x20column\x20%s\x20to\x20%s','then','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','dropTable','queryInterface','addColumn','messageId','info','addIndex','stringify','STRING','sequence','finally'];(function(_0x309e99,_0x386e6f){const _0x46a84b=function(_0x310920){while(--_0x310920){_0x309e99['push'](_0x309e99['shift']());}};_0x46a84b(++_0x386e6f);}(a968_0x386e,0xf3));const a968_0x46a8=function(_0x309e99,_0x386e6f){_0x309e99=_0x309e99-0x0;let _0x46a84b=a968_0x386e[_0x309e99];return _0x46a84b;};const _0x3d0bca=a968_0x46a8;'use strict';const util=require(_0x3d0bca('0x1b')),logger=require(_0x3d0bca('0x18'))(_0x3d0bca('0x7')),Sequence=function(){};Sequence[_0x3d0bca('0x1c')][_0x3d0bca('0x0')]=function(_0x310920){const _0xf9339f=_0x3d0bca;this[_0xf9339f('0x4')]=this[_0xf9339f('0x4')]?this['tail'][_0xf9339f('0x14')](_0x310920):_0x310920();};const Migration=function(_0x281b42){const _0x53cf33=_0x3d0bca;this[_0x53cf33('0xc')]=_0x281b42,this[_0x53cf33('0x13')]=new Sequence();};Migration['prototype'][_0x3d0bca('0x1a')]=function(_0x42b9f3,_0x12618e,_0x381137){const _0x2de02c=_0x3d0bca,_0x11e8aa=this;this[_0x2de02c('0x13')][_0x2de02c('0x0')](function(){const _0x172a14=_0x2de02c;return _0x11e8aa[_0x172a14('0xc')][_0x172a14('0x1a')](_0x42b9f3,_0x12618e,_0x381137)[_0x172a14('0x9')](function(){const _0x15fad6=_0x172a14;logger[_0x15fad6('0xf')](_0x15fad6('0x6'),_0x12618e,_0x42b9f3);})[_0x172a14('0x20')](function(_0x407e82){const _0x484007=_0x172a14;logger['info'](JSON[_0x484007('0x11')](_0x407e82));});});},Migration['prototype'][_0x3d0bca('0xd')]=function(_0x167229,_0x214854,_0x51162a){const _0x19dfad=_0x3d0bca,_0x49e3b5=this;this[_0x19dfad('0x13')][_0x19dfad('0x0')](function(){const _0x2f528a=_0x19dfad;return _0x49e3b5[_0x2f528a('0xc')][_0x2f528a('0xd')](_0x167229,_0x214854,_0x51162a)['then'](function(){const _0x4bfe2a=_0x2f528a;logger[_0x4bfe2a('0xf')](_0x4bfe2a('0x8'),_0x214854,_0x167229);})[_0x2f528a('0x20')](function(_0x384d8b){const _0x5bf704=_0x2f528a;logger[_0x5bf704('0xf')](JSON[_0x5bf704('0x11')](_0x384d8b));});});},Migration['prototype']['dropTable']=function(_0x11170b){const _0x4f1bdf=_0x3d0bca,_0x40a74d=this;this[_0x4f1bdf('0x13')][_0x4f1bdf('0x0')](function(){const _0xc02a61=_0x4f1bdf;return _0x40a74d['queryInterface'][_0xc02a61('0xb')](_0x11170b,{'force':!![]})[_0xc02a61('0x9')](function(){const _0x43793e=_0xc02a61;logger[_0x43793e('0xf')]('table\x20dropped\x20%s',_0x11170b);})[_0xc02a61('0x20')](function(_0x2bd451){const _0x18f693=_0xc02a61;logger[_0x18f693('0xf')](JSON[_0x18f693('0x11')](_0x2bd451));});});},Migration[_0x3d0bca('0x1c')][_0x3d0bca('0x10')]=function(_0x421fc8,_0x25bc98,_0x54e85){const _0x38b783=_0x3d0bca,_0x21f441=this;this['sequence'][_0x38b783('0x0')](function(){const _0x5844b0=_0x38b783;return _0x21f441[_0x5844b0('0xc')][_0x5844b0('0x10')](_0x421fc8,_0x25bc98,{'indexName':_0x54e85})[_0x5844b0('0x9')](function(){const _0x2435be=_0x5844b0;logger[_0x2435be('0xf')]('addIndex\x20%s\x20%s\x20%s',_0x421fc8,_0x25bc98[_0x2435be('0x17')](','),_0x54e85);})[_0x5844b0('0x20')](function(_0x323a0b){const _0x572cbc=_0x5844b0;logger[_0x572cbc('0xf')](JSON[_0x572cbc('0x11')](_0x323a0b));});});},Migration[_0x3d0bca('0x1c')][_0x3d0bca('0x15')]=function(_0x178922,_0x4e9bb8){const _0x294563=_0x3d0bca,_0x3bdb8a=this;this[_0x294563('0x13')]['enqueue'](function(){const _0x35d509=_0x294563;return _0x3bdb8a[_0x35d509('0xc')][_0x35d509('0x15')](_0x178922,_0x4e9bb8)[_0x35d509('0x9')](function(){const _0x276299=_0x35d509;logger[_0x276299('0xf')]('removeIndex\x20%s\x20%s',_0x178922,_0x4e9bb8);})[_0x35d509('0x20')](function(_0x59f88c){const _0x3dc6ea=_0x35d509;logger[_0x3dc6ea('0xf')](JSON[_0x3dc6ea('0x11')](_0x59f88c));});});},Migration[_0x3d0bca('0x1c')]['query']=function(_0x15ef5d){const _0x4e77c2=_0x3d0bca,_0x56e5a7=this;this[_0x4e77c2('0x13')][_0x4e77c2('0x0')](function(){const _0x49d9b5=_0x4e77c2;return _0x56e5a7[_0x49d9b5('0xc')][_0x49d9b5('0x19')]['query'](_0x15ef5d)[_0x49d9b5('0x9')](function(){const _0x2ef01e=_0x49d9b5;logger[_0x2ef01e('0xf')](_0x2ef01e('0x5'),_0x15ef5d);})[_0x49d9b5('0x20')](function(_0x259195){const _0x3d851b=_0x49d9b5;logger[_0x3d851b('0xf')](JSON[_0x3d851b('0x11')](_0x259195));});});},Migration[_0x3d0bca('0x1c')][_0x3d0bca('0x1d')]=function(_0x32116f,_0x4ce820){const _0x52f575=_0x3d0bca,_0x530a27=this;this[_0x52f575('0x13')]['enqueue'](function(){const _0x5dbdb7=_0x52f575;return _0x530a27['queryInterface'][_0x5dbdb7('0x1d')](_0x32116f,_0x4ce820)[_0x5dbdb7('0x9')](function(){const _0x48080c=_0x5dbdb7;logger[_0x48080c('0xf')](_0x48080c('0x1'),_0x4ce820,_0x32116f);})[_0x5dbdb7('0x20')](function(_0x1f2637){const _0x47a81a=_0x5dbdb7;logger[_0x47a81a('0xf')](util[_0x47a81a('0x16')](_0x1f2637,{'showHidden':![],'depth':null}));});});},Migration[_0x3d0bca('0x1c')][_0x3d0bca('0x2')]=function(_0x4ee089,_0x3978a3,_0x1fcbcb){const _0x3c29a7=_0x3d0bca,_0x2c7b45=this;this[_0x3c29a7('0x13')][_0x3c29a7('0x0')](function(){const _0x5e7aa1=_0x3c29a7;return _0x2c7b45[_0x5e7aa1('0xc')][_0x5e7aa1('0x2')](_0x4ee089,_0x3978a3,_0x1fcbcb)[_0x5e7aa1('0x9')](function(){const _0x3d8fc4=_0x5e7aa1;logger['info'](_0x3d8fc4('0xa'),_0x3978a3,_0x1fcbcb,_0x4ee089);})[_0x5e7aa1('0x20')](function(_0x23098e){const _0x18b4b0=_0x5e7aa1;logger[_0x18b4b0('0xf')](util[_0x18b4b0('0x16')](_0x23098e,{'showHidden':![],'depth':null}));});});},Migration[_0x3d0bca('0x1c')]['final']=function(_0x1627aa){const _0x2173bf=_0x3d0bca;this[_0x2173bf('0x13')][_0x2173bf('0x0')](function(){return _0x1627aa();});},module[_0x3d0bca('0x3')]={'up':function(_0x5984e5,_0x512998){return new Promise(function(_0x1a019e){const _0xc6b02c=a968_0x46a8,_0x144d5e=new Migration(_0x5984e5);_0x144d5e[_0xc6b02c('0x1a')](_0xc6b02c('0x1f'),_0xc6b02c('0x1e'),{'type':_0x512998['STRING'](0x1fe)}),_0x144d5e[_0xc6b02c('0x1a')]('mail_messages',_0xc6b02c('0xe'),{'type':_0x512998[_0xc6b02c('0x12')](0x1fe)}),_0x144d5e['final'](_0x1a019e);});},'down':function(){}};