Built motion from commit ded33658aad58fc8de845a8299a9db59a88cc353. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.55.js
1 const a934_0x38f3=['stringify','queryInterface','migration','Added\x20column\x20%s\x20to\x20%s','Removed\x20column\x20%s\x20from\x20%s','sequence','CREATE\x20TABLE\x20`mail_substatuses`\x20(\x20\x20\x20\x20\x20\x20\x20\x20\x20`id`\x20int(11)\x20NOT\x20NULL\x20AUTO_INCREMENT,\x20\x20\x20\x20\x20\x20\x20\x20\x20`name`\x20varchar(255)\x20NOT\x20NULL,\x20\x20\x20\x20\x20\x20\x20\x20\x20`description`\x20varchar(255)\x20DEFAULT\x20NULL,\x20\x20\x20\x20\x20\x20\x20\x20\x20`createdAt`\x20datetime\x20NOT\x20NULL,\x20\x20\x20\x20\x20\x20\x20\x20\x20`updatedAt`\x20datetime\x20NOT\x20NULL,\x20\x20\x20\x20\x20\x20\x20\x20\x20PRIMARY\x20KEY\x20(`id`),\x20\x20\x20\x20\x20\x20\x20\x20\x20UNIQUE\x20KEY\x20`name`\x20(`name`)\x20\x20\x20\x20\x20\x20\x20)\x20ENGINE=InnoDB\x20DEFAULT\x20CHARSET=utf8;','removeColumn','INSERT\x20INTO\x20`mail_substatuses`\x20(`name`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27pending\x27,\x20\x27Pending\x20status\x20for\x20mail\x20interaction\x27,\x20NOW(),\x20NOW());','then','renameColumn','query\x20%s','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','final','catch','util','addIndex','addColumn','addIndex\x20%s\x20%s\x20%s','info','../config/logger','changeColumn','enqueue','query','tail','sms_accounts','sequelize','exports','inspect','prototype'];(function(_0x333895,_0x38f346){const _0x1151f9=function(_0x40e5a5){while(--_0x40e5a5){_0x333895['push'](_0x333895['shift']());}};_0x1151f9(++_0x38f346);}(a934_0x38f3,0x7d));const a934_0x1151=function(_0x333895,_0x38f346){_0x333895=_0x333895-0x0;let _0x1151f9=a934_0x38f3[_0x333895];return _0x1151f9;};const _0x468069=a934_0x1151;'use strict';const util=require(_0x468069('0xa')),logger=require(_0x468069('0xf'))(_0x468069('0x1b')),Sequence=function(){};Sequence[_0x468069('0x18')][_0x468069('0x11')]=function(_0x40e5a5){const _0x4b69ee=_0x468069;this[_0x4b69ee('0x13')]=this['tail']?this['tail']['finally'](_0x40e5a5):_0x40e5a5();};const Migration=function(_0x57ea4a){this['queryInterface']=_0x57ea4a,this['sequence']=new Sequence();};Migration[_0x468069('0x18')][_0x468069('0x10')]=function(_0x35b9cb,_0x17c6c9,_0x48e982){const _0x1af13d=_0x468069,_0x574aca=this;this[_0x1af13d('0x0')][_0x1af13d('0x11')](function(){const _0x3eca9d=_0x1af13d;return _0x574aca[_0x3eca9d('0x1a')][_0x3eca9d('0x10')](_0x35b9cb,_0x17c6c9,_0x48e982)[_0x3eca9d('0x4')](function(){const _0x74d7c1=_0x3eca9d;logger[_0x74d7c1('0xe')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x17c6c9,_0x35b9cb);})['catch'](function(_0x47d1f5){const _0x1f418e=_0x3eca9d;logger[_0x1f418e('0xe')](JSON['stringify'](_0x47d1f5));});});},Migration[_0x468069('0x18')]['addColumn']=function(_0x2434ab,_0x5acf8e,_0x2caad3){const _0x7079ed=_0x468069,_0x419e7e=this;this[_0x7079ed('0x0')][_0x7079ed('0x11')](function(){const _0x203d8b=_0x7079ed;return _0x419e7e[_0x203d8b('0x1a')]['addColumn'](_0x2434ab,_0x5acf8e,_0x2caad3)[_0x203d8b('0x4')](function(){const _0x27c5d1=_0x203d8b;logger[_0x27c5d1('0xe')](_0x27c5d1('0x1c'),_0x5acf8e,_0x2434ab);})[_0x203d8b('0x9')](function(_0x3499ca){const _0x1e68eb=_0x203d8b;logger[_0x1e68eb('0xe')](JSON[_0x1e68eb('0x19')](_0x3499ca));});});},Migration[_0x468069('0x18')]['dropTable']=function(_0x2981ed){const _0x5d3a26=_0x468069,_0x5324d3=this;this[_0x5d3a26('0x0')][_0x5d3a26('0x11')](function(){const _0x4d87a9=_0x5d3a26;return _0x5324d3['queryInterface']['dropTable'](_0x2981ed,{'force':!![]})[_0x4d87a9('0x4')](function(){const _0xdbc50d=_0x4d87a9;logger[_0xdbc50d('0xe')]('table\x20dropped\x20%s',_0x2981ed);})[_0x4d87a9('0x9')](function(_0x417951){const _0x2a64c3=_0x4d87a9;logger[_0x2a64c3('0xe')](JSON[_0x2a64c3('0x19')](_0x417951));});});},Migration[_0x468069('0x18')][_0x468069('0xb')]=function(_0x510310,_0x5dd77a,_0x319d6c){const _0xc417f8=_0x468069,_0x145f0b=this;this[_0xc417f8('0x0')]['enqueue'](function(){const _0x375bfd=_0xc417f8;return _0x145f0b[_0x375bfd('0x1a')]['addIndex'](_0x510310,_0x5dd77a,{'indexName':_0x319d6c})[_0x375bfd('0x4')](function(){const _0x3e43b7=_0x375bfd;logger['info'](_0x3e43b7('0xd'),_0x510310,_0x5dd77a['join'](','),_0x319d6c);})[_0x375bfd('0x9')](function(_0x515448){const _0x15f860=_0x375bfd;logger[_0x15f860('0xe')](JSON[_0x15f860('0x19')](_0x515448));});});},Migration['prototype']['query']=function(_0xed46a9){const _0x521c4b=_0x468069,_0x2cdd52=this;this[_0x521c4b('0x0')][_0x521c4b('0x11')](function(){const _0x5d1138=_0x521c4b;return _0x2cdd52[_0x5d1138('0x1a')][_0x5d1138('0x15')]['query'](_0xed46a9)['then'](function(){const _0x42277f=_0x5d1138;logger['info'](_0x42277f('0x6'),_0xed46a9);})[_0x5d1138('0x9')](function(_0x48c75f){const _0xd5bf0c=_0x5d1138;logger['info'](JSON[_0xd5bf0c('0x19')](_0x48c75f));});});},Migration[_0x468069('0x18')][_0x468069('0x2')]=function(_0x49806c,_0x54b631){const _0xacaa88=_0x468069,_0x4503d2=this;this[_0xacaa88('0x0')][_0xacaa88('0x11')](function(){const _0x184398=_0xacaa88;return _0x4503d2[_0x184398('0x1a')][_0x184398('0x2')](_0x49806c,_0x54b631)['then'](function(){const _0xe7ebda=_0x184398;logger[_0xe7ebda('0xe')](_0xe7ebda('0x1d'),_0x54b631,_0x49806c);})['catch'](function(_0x44e836){const _0x38939a=_0x184398;logger['info'](util[_0x38939a('0x17')](_0x44e836,{'showHidden':![],'depth':null}));});});},Migration[_0x468069('0x18')][_0x468069('0x5')]=function(_0x3d93b7,_0x43439f,_0x4023ac){const _0x67f86a=_0x468069,_0xdcbc82=this;this[_0x67f86a('0x0')]['enqueue'](function(){const _0x1ed761=_0x67f86a;return _0xdcbc82[_0x1ed761('0x1a')]['renameColumn'](_0x3d93b7,_0x43439f,_0x4023ac)[_0x1ed761('0x4')](function(){const _0x50201f=_0x1ed761;logger[_0x50201f('0xe')](_0x50201f('0x7'),_0x43439f,_0x4023ac,_0x3d93b7);})[_0x1ed761('0x9')](function(_0x3e2cc3){const _0x571f5c=_0x1ed761;logger[_0x571f5c('0xe')](util[_0x571f5c('0x17')](_0x3e2cc3,{'showHidden':![],'depth':null}));});});},Migration[_0x468069('0x18')][_0x468069('0x8')]=function(_0x169140){const _0x45c04d=_0x468069;this[_0x45c04d('0x0')][_0x45c04d('0x11')](function(){return _0x169140();});},module[_0x468069('0x16')]={'up':function(_0x529caa,_0x18d651){return new Promise(function(_0x34e410){const _0x739935=a934_0x1151,_0x2506c5=new Migration(_0x529caa);_0x2506c5[_0x739935('0xc')](_0x739935('0x14'),'authId',{'type':_0x18d651['STRING']}),_0x2506c5[_0x739935('0x12')](_0x739935('0x1')),_0x2506c5[_0x739935('0x12')](_0x739935('0x3')),_0x2506c5['final'](_0x34e410);});},'down':function(){}};