Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.47.js
1 'use strict';const a1098_0x3521=['sequelize','prototype','1330099jqyRgs','removeColumn','Changed\x20column\x20%s\x20in\x20table\x20%s','util','@config/logger','1luMaFS','addColumn','enqueue','dropTable','304109fTIjMs','final','TEXT','tail','346gHYDal','addIndex\x20%s\x20%s\x20%s','Added\x20column\x20%s\x20to\x20%s','Removed\x20column\x20%s\x20from\x20%s','queryInterface','data','stringify','interval','11NiFegc','query\x20%s','dashboard_items','710KWEPpN','type','sequence','998QUwYcc','title','Form\x20submission\x20error','long','exports','Form\x20properly\x20submitted','142489OZTUZz','info','STRING','query','changeColumn','26062yxBNDU','addIndex','222288BxPJDA','chat_websites','formSubmitSuccessMessage','attrs','BOOLEAN','395VBflnI','catch','then'];const a1098_0x4b49=function(_0x569bd9,_0x2cb017){_0x569bd9=_0x569bd9-0x12b;let _0x3521ca=a1098_0x3521[_0x569bd9];return _0x3521ca;};const a1098_0x143508=a1098_0x4b49;(function(_0x161820,_0x285069){const _0x25bfae=a1098_0x4b49;while(!![]){try{const _0x5cff6c=parseInt(_0x25bfae(0x133))*parseInt(_0x25bfae(0x13e))+parseInt(_0x25bfae(0x14c))*-parseInt(_0x25bfae(0x13b))+-parseInt(_0x25bfae(0x147))+parseInt(_0x25bfae(0x12b))*-parseInt(_0x25bfae(0x12f))+-parseInt(_0x25bfae(0x14e))+-parseInt(_0x25bfae(0x153))*parseInt(_0x25bfae(0x141))+parseInt(_0x25bfae(0x158));if(_0x5cff6c===_0x285069)break;else _0x161820['push'](_0x161820['shift']());}catch(_0x41e2d9){_0x161820['push'](_0x161820['shift']());}}}(a1098_0x3521,0x372bd));const logger=require(a1098_0x143508(0x15c))('migration'),util=require(a1098_0x143508(0x15b)),Sequence=function(){};Sequence['prototype']['enqueue']=function(_0x5c5995){const _0x263f32=a1098_0x143508;this['tail']=this[_0x263f32(0x132)]?this['tail']['finally'](_0x5c5995):_0x5c5995();};const Migration=function(_0x31c6e9){const _0x25c479=a1098_0x143508;this['queryInterface']=_0x31c6e9,this[_0x25c479(0x140)]=new Sequence();};Migration[a1098_0x143508(0x157)][a1098_0x143508(0x14b)]=function(_0xc675af,_0x501ac1,_0x3fa1f7){const _0xd46796=a1098_0x143508,_0x179fe5=this;this[_0xd46796(0x140)][_0xd46796(0x12d)](function(){const _0x55718d=_0xd46796;return _0x179fe5['queryInterface']['changeColumn'](_0xc675af,_0x501ac1,_0x3fa1f7)[_0x55718d(0x155)](function(){const _0x294d30=_0x55718d;logger[_0x294d30(0x148)](_0x294d30(0x15a),_0x501ac1,_0xc675af);})[_0x55718d(0x154)](function(_0x1e4b3d){const _0x4cc30b=_0x55718d;logger[_0x4cc30b(0x148)](JSON[_0x4cc30b(0x139)](_0x1e4b3d));});});},Migration[a1098_0x143508(0x157)][a1098_0x143508(0x12c)]=function(_0x53fbaa,_0xe9d825,_0x4bbf89){const _0x4b1f6e=this;this['sequence']['enqueue'](function(){const _0x51148e=a1098_0x4b49;return _0x4b1f6e[_0x51148e(0x137)][_0x51148e(0x12c)](_0x53fbaa,_0xe9d825,_0x4bbf89)[_0x51148e(0x155)](function(){const _0x39a997=_0x51148e;logger['info'](_0x39a997(0x135),_0xe9d825,_0x53fbaa);})[_0x51148e(0x154)](function(_0x41011f){const _0x1c5b37=_0x51148e;logger[_0x1c5b37(0x148)](JSON[_0x1c5b37(0x139)](_0x41011f));});});},Migration[a1098_0x143508(0x157)][a1098_0x143508(0x12e)]=function(_0xb411bb){const _0x259491=a1098_0x143508,_0x40998c=this;this[_0x259491(0x140)][_0x259491(0x12d)](function(){const _0x3306d6=_0x259491;return _0x40998c[_0x3306d6(0x137)][_0x3306d6(0x12e)](_0xb411bb,{'force':!![]})[_0x3306d6(0x155)](function(){const _0x5e0e53=_0x3306d6;logger[_0x5e0e53(0x148)]('table\x20dropped\x20%s',_0xb411bb);})[_0x3306d6(0x154)](function(_0x385a6f){const _0x47b5b9=_0x3306d6;logger[_0x47b5b9(0x148)](JSON[_0x47b5b9(0x139)](_0x385a6f));});});},Migration[a1098_0x143508(0x157)][a1098_0x143508(0x14d)]=function(_0x299672,_0x25f76a,_0x2d8d7b){const _0x5d964e=a1098_0x143508,_0x147d95=this;this[_0x5d964e(0x140)][_0x5d964e(0x12d)](function(){const _0x3a916b=_0x5d964e;return _0x147d95['queryInterface'][_0x3a916b(0x14d)](_0x299672,_0x25f76a,{'indexName':_0x2d8d7b})[_0x3a916b(0x155)](function(){const _0x2e1ee9=_0x3a916b;logger[_0x2e1ee9(0x148)](_0x2e1ee9(0x134),_0x299672,_0x25f76a['join'](','),_0x2d8d7b);})[_0x3a916b(0x154)](function(_0x2f68aa){const _0x47bd05=_0x3a916b;logger[_0x47bd05(0x148)](JSON['stringify'](_0x2f68aa));});});},Migration['prototype']['query']=function(_0x25b39b){const _0x39765b=a1098_0x143508,_0x48b0dc=this;this[_0x39765b(0x140)][_0x39765b(0x12d)](function(){const _0x23121f=_0x39765b;return _0x48b0dc[_0x23121f(0x137)][_0x23121f(0x156)][_0x23121f(0x14a)](_0x25b39b)[_0x23121f(0x155)](function(){const _0x5c93ce=_0x23121f;logger[_0x5c93ce(0x148)](_0x5c93ce(0x13c),_0x25b39b);})[_0x23121f(0x154)](function(_0x1aee33){const _0x273a19=_0x23121f;logger[_0x273a19(0x148)](JSON['stringify'](_0x1aee33));});});},Migration[a1098_0x143508(0x157)][a1098_0x143508(0x159)]=function(_0x2b2ddd,_0x5002df){const _0x4c84b6=a1098_0x143508,_0x3a6a56=this;this[_0x4c84b6(0x140)][_0x4c84b6(0x12d)](function(){const _0x151c67=_0x4c84b6;return _0x3a6a56[_0x151c67(0x137)][_0x151c67(0x159)](_0x2b2ddd,_0x5002df)['then'](function(){const _0x4bd9e9=_0x151c67;logger[_0x4bd9e9(0x148)](_0x4bd9e9(0x136),_0x5002df,_0x2b2ddd);})['catch'](function(_0x1ca6eb){const _0x105dc8=_0x151c67;logger[_0x105dc8(0x148)](util['inspect'](_0x1ca6eb,{'showHidden':![],'depth':null}));});});},Migration['prototype'][a1098_0x143508(0x130)]=function(_0x53182a){this['sequence']['enqueue'](function(){return _0x53182a();});},module[a1098_0x143508(0x145)]={'up':function(_0x430b7a,_0x51f973){return new Promise(function(_0x40a64f){const _0x3e3815=a1098_0x4b49,_0x421e31=new Migration(_0x430b7a);_0x421e31['query']('DELETE\x20FROM\x20dashboards'),_0x421e31[_0x3e3815(0x159)]('dashboards',_0x3e3815(0x13a)),_0x421e31[_0x3e3815(0x14b)](_0x3e3815(0x13d),_0x3e3815(0x13f),{'type':_0x51f973[_0x3e3815(0x149)](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}}),_0x421e31[_0x3e3815(0x159)](_0x3e3815(0x13d),'query'),_0x421e31['removeColumn'](_0x3e3815(0x13d),_0x3e3815(0x138)),_0x421e31[_0x3e3815(0x12c)](_0x3e3815(0x13d),_0x3e3815(0x142),{'type':_0x51f973[_0x3e3815(0x149)](0x14),'validate':{'len':[0x0,0x14]}}),_0x421e31['addColumn']('dashboard_items',_0x3e3815(0x151),{'type':_0x51f973[_0x3e3815(0x131)](_0x3e3815(0x144))}),_0x421e31[_0x3e3815(0x12c)]('sms_messages','secret',{'type':_0x51f973[_0x3e3815(0x152)],'defaultValue':![]}),_0x421e31[_0x3e3815(0x12c)](_0x3e3815(0x14f),_0x3e3815(0x150),{'type':_0x51f973[_0x3e3815(0x149)],'defaultValue':_0x3e3815(0x146)}),_0x421e31['addColumn'](_0x3e3815(0x14f),'formSubmitFailureMessage',{'type':_0x51f973[_0x3e3815(0x149)],'defaultValue':_0x3e3815(0x143)}),_0x421e31[_0x3e3815(0x130)](_0x40a64f);});},'down':function(){return Promise['resolve']();}};