Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / migrations / 3.0.0-alpha.js
index 0c4a02f..a8a078c 100644 (file)
@@ -1 +1 @@
-const a1020_0x543a=['removeColumn','Removed\x20column\x20%s\x20from\x20%s','removeIndex','sequelize','query\x20%s','indexName','removeIndex\x20%s\x20%s','queryInterface','sequence','enqueue','then','info','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','query','Changed\x20column\x20%s\x20in\x20table\x20%s','dropTable','../config/logger','migration','util','catch','renameColumn','addIndex','addColumn','prototype','stringify','inspect','Added\x20column\x20%s\x20to\x20%s','changeColumn','indicesType','final','DROP\x20INDEX\x20`users_ibfk_1`\x20ON\x20users','tail'];(function(_0x2ae380,_0x543a42){const _0x43eea6=function(_0x1aa0ba){while(--_0x1aa0ba){_0x2ae380['push'](_0x2ae380['shift']());}};_0x43eea6(++_0x543a42);}(a1020_0x543a,0xe8));const a1020_0x43ee=function(_0x2ae380,_0x543a42){_0x2ae380=_0x2ae380-0x0;let _0x43eea6=a1020_0x543a[_0x2ae380];return _0x43eea6;};const _0x151f4=a1020_0x43ee;'use strict';const util=require(_0x151f4('0xa')),logger=require(_0x151f4('0x8'))(_0x151f4('0x9')),Sequence=function(){};Sequence['prototype'][_0x151f4('0x1')]=function(_0x1aa0ba){const _0x2dee7b=_0x151f4;this[_0x2dee7b('0x17')]=this[_0x2dee7b('0x17')]?this['tail']['finally'](_0x1aa0ba):_0x1aa0ba();};const Migration=function(_0x5d6533){const _0x26ed5d=_0x151f4;this[_0x26ed5d('0x1f')]=_0x5d6533,this[_0x26ed5d('0x0')]=new Sequence();};Migration[_0x151f4('0xf')]['changeColumn']=function(_0x47ba3c,_0x4eb541,_0x4b4f7c){const _0x565948=_0x151f4,_0x407879=this;this[_0x565948('0x0')][_0x565948('0x1')](function(){const _0x13d98e=_0x565948;return _0x407879[_0x13d98e('0x1f')][_0x13d98e('0x13')](_0x47ba3c,_0x4eb541,_0x4b4f7c)[_0x13d98e('0x2')](function(){const _0xed1943=_0x13d98e;logger[_0xed1943('0x3')](_0xed1943('0x6'),_0x4eb541,_0x47ba3c);})[_0x13d98e('0xb')](function(_0x4b97d3){logger['info'](JSON['stringify'](_0x4b97d3));});});},Migration[_0x151f4('0xf')][_0x151f4('0xe')]=function(_0x3c1c57,_0x408b1f,_0x2263ac){const _0x11b667=_0x151f4,_0x1318ff=this;this[_0x11b667('0x0')][_0x11b667('0x1')](function(){const _0x18050c=_0x11b667;return _0x1318ff['queryInterface'][_0x18050c('0xe')](_0x3c1c57,_0x408b1f,_0x2263ac)[_0x18050c('0x2')](function(){const _0x1318cb=_0x18050c;logger['info'](_0x1318cb('0x12'),_0x408b1f,_0x3c1c57);})['catch'](function(_0x4ee761){logger['info'](JSON['stringify'](_0x4ee761));});});},Migration[_0x151f4('0xf')][_0x151f4('0x7')]=function(_0x29c2e0){const _0x34dc41=_0x151f4,_0xf0ab5e=this;this[_0x34dc41('0x0')][_0x34dc41('0x1')](function(){const _0xed01c0=_0x34dc41;return _0xf0ab5e[_0xed01c0('0x1f')][_0xed01c0('0x7')](_0x29c2e0,{'force':!![]})[_0xed01c0('0x2')](function(){logger['info']('table\x20dropped\x20%s',_0x29c2e0);})[_0xed01c0('0xb')](function(_0x741b6e){const _0x4188e9=_0xed01c0;logger[_0x4188e9('0x3')](JSON[_0x4188e9('0x10')](_0x741b6e));});});},Migration[_0x151f4('0xf')][_0x151f4('0xd')]=function(_0x38dee1,_0x57c4fd,_0x58596b){const _0x30c2b9=_0x151f4,_0x395bea=this;this[_0x30c2b9('0x0')][_0x30c2b9('0x1')](function(){const _0x35fc24=_0x30c2b9;return _0x395bea[_0x35fc24('0x1f')]['addIndex'](_0x38dee1,_0x57c4fd,{'indexName':_0x58596b[_0x35fc24('0x1d')],'indicesType':_0x58596b[_0x35fc24('0x14')]})[_0x35fc24('0x2')](function(){const _0x163ee7=_0x35fc24;logger[_0x163ee7('0x3')]('addIndex\x20%s\x20%s\x20%s\x20[%s]',_0x38dee1,_0x57c4fd['join'](','),_0x58596b[_0x163ee7('0x1d')],_0x58596b['indicesType']);})[_0x35fc24('0xb')](function(_0x5c68de){const _0x4dc479=_0x35fc24;logger['info'](JSON[_0x4dc479('0x10')](_0x5c68de));});});},Migration[_0x151f4('0xf')]['removeIndex']=function(_0x4cc155,_0x1033c5){const _0x265c46=this;this['sequence']['enqueue'](function(){const _0x155b5f=a1020_0x43ee;return _0x265c46[_0x155b5f('0x1f')][_0x155b5f('0x1a')](_0x4cc155,_0x1033c5)[_0x155b5f('0x2')](function(){const _0x46726a=_0x155b5f;logger[_0x46726a('0x3')](_0x46726a('0x1e'),_0x4cc155,_0x1033c5);})[_0x155b5f('0xb')](function(_0x4985cb){const _0x3dbe7f=_0x155b5f;logger[_0x3dbe7f('0x3')](JSON[_0x3dbe7f('0x10')](_0x4985cb));});});},Migration['prototype'][_0x151f4('0x5')]=function(_0x551dbd){const _0x61f2d5=_0x151f4,_0x324738=this;this[_0x61f2d5('0x0')][_0x61f2d5('0x1')](function(){const _0x3dd648=_0x61f2d5;return _0x324738[_0x3dd648('0x1f')][_0x3dd648('0x1b')][_0x3dd648('0x5')](_0x551dbd)[_0x3dd648('0x2')](function(){const _0x154f29=_0x3dd648;logger[_0x154f29('0x3')](_0x154f29('0x1c'),_0x551dbd);})[_0x3dd648('0xb')](function(_0x1c602){const _0x33a1e4=_0x3dd648;logger[_0x33a1e4('0x3')](JSON[_0x33a1e4('0x10')](_0x1c602));});});},Migration[_0x151f4('0xf')][_0x151f4('0x18')]=function(_0x455c37,_0x2cc5a9){const _0x3f2f51=_0x151f4,_0x5a933c=this;this[_0x3f2f51('0x0')]['enqueue'](function(){const _0x9c9e44=_0x3f2f51;return _0x5a933c[_0x9c9e44('0x1f')][_0x9c9e44('0x18')](_0x455c37,_0x2cc5a9)[_0x9c9e44('0x2')](function(){const _0x3c58d0=_0x9c9e44;logger[_0x3c58d0('0x3')](_0x3c58d0('0x19'),_0x2cc5a9,_0x455c37);})[_0x9c9e44('0xb')](function(_0x36b1dd){const _0x11db5d=_0x9c9e44;logger[_0x11db5d('0x3')](util[_0x11db5d('0x11')](_0x36b1dd,{'showHidden':![],'depth':null}));});});},Migration[_0x151f4('0xf')][_0x151f4('0xc')]=function(_0x34ed46,_0x479c0b,_0x25fbdb){const _0x4945f7=_0x151f4,_0x4fe529=this;this['sequence'][_0x4945f7('0x1')](function(){const _0x43c083=_0x4945f7;return _0x4fe529['queryInterface'][_0x43c083('0xc')](_0x34ed46,_0x479c0b,_0x25fbdb)['then'](function(){const _0x49cb8b=_0x43c083;logger[_0x49cb8b('0x3')](_0x49cb8b('0x4'),_0x479c0b,_0x25fbdb,_0x34ed46);})[_0x43c083('0xb')](function(_0x55f42c){const _0x172a72=_0x43c083;logger['info'](util[_0x172a72('0x11')](_0x55f42c,{'showHidden':![],'depth':null}));});});},Migration[_0x151f4('0xf')]['final']=function(_0x1ff57a){const _0x54a224=_0x151f4;this[_0x54a224('0x0')]['enqueue'](function(){return _0x1ff57a();});},module['exports']={'up':function(_0x2c04af){return new Promise(function(_0x46e020){const _0xb6a161=a1020_0x43ee,_0x431ef6=new Migration(_0x2c04af);_0x431ef6[_0xb6a161('0x5')]('ALTER\x20TABLE\x20users\x20DROP\x20FOREIGN\x20KEY\x20`users_ibfk_1`'),_0x431ef6[_0xb6a161('0x5')](_0xb6a161('0x16')),_0x431ef6[_0xb6a161('0x5')]('ALTER\x20TABLE\x20users\x20ADD\x20CONSTRAINT\x20`users_ibfk_1`\x20FOREIGN\x20KEY\x20(userProfileId)\x20REFERENCES\x20user_profiles(id)\x20ON\x20DELETE\x20RESTRICT'),_0x431ef6[_0xb6a161('0x15')](_0x46e020);});},'down':function(){}};
\ No newline at end of file
+const a1020_0x2dd3=['migration','prototype','finally','addIndex','removeIndex','then','indexName','catch','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','join','queryInterface','Removed\x20column\x20%s\x20from\x20%s','ALTER\x20TABLE\x20users\x20ADD\x20CONSTRAINT\x20`users_ibfk_1`\x20FOREIGN\x20KEY\x20(userProfileId)\x20REFERENCES\x20user_profiles(id)\x20ON\x20DELETE\x20RESTRICT','addColumn','sequence','util','final','query\x20%s','dropTable','tail','addIndex\x20%s\x20%s\x20%s\x20[%s]','enqueue','query','stringify','renameColumn','changeColumn','info','removeIndex\x20%s\x20%s','ALTER\x20TABLE\x20users\x20DROP\x20FOREIGN\x20KEY\x20`users_ibfk_1`','sequelize','Added\x20column\x20%s\x20to\x20%s','removeColumn'];(function(_0x55cb88,_0x2dd3e6){const _0x5d0f6a=function(_0x536a5b){while(--_0x536a5b){_0x55cb88['push'](_0x55cb88['shift']());}};_0x5d0f6a(++_0x2dd3e6);}(a1020_0x2dd3,0x143));const a1020_0x5d0f=function(_0x55cb88,_0x2dd3e6){_0x55cb88=_0x55cb88-0x0;let _0x5d0f6a=a1020_0x2dd3[_0x55cb88];return _0x5d0f6a;};const _0x2be0a7=a1020_0x5d0f;'use strict';const util=require(_0x2be0a7('0xc')),logger=require('../config/logger')(_0x2be0a7('0x1d')),Sequence=function(){};Sequence['prototype'][_0x2be0a7('0x12')]=function(_0x536a5b){const _0x5c1b79=_0x2be0a7;this['tail']=this[_0x5c1b79('0x10')]?this[_0x5c1b79('0x10')][_0x5c1b79('0x1f')](_0x536a5b):_0x536a5b();};const Migration=function(_0xbee92b){this['queryInterface']=_0xbee92b,this['sequence']=new Sequence();};Migration['prototype']['changeColumn']=function(_0x549dce,_0x363c55,_0x34fbf9){const _0x160812=_0x2be0a7,_0x51269b=this;this['sequence'][_0x160812('0x12')](function(){const _0x42f787=_0x160812;return _0x51269b['queryInterface'][_0x42f787('0x16')](_0x549dce,_0x363c55,_0x34fbf9)[_0x42f787('0x2')](function(){const _0x21ffbc=_0x42f787;logger[_0x21ffbc('0x17')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x363c55,_0x549dce);})[_0x42f787('0x4')](function(_0x2e2708){const _0x25ec0a=_0x42f787;logger['info'](JSON[_0x25ec0a('0x14')](_0x2e2708));});});},Migration[_0x2be0a7('0x1e')]['addColumn']=function(_0x5a5690,_0x490574,_0x101ac0){const _0x469867=_0x2be0a7,_0x45f753=this;this[_0x469867('0xb')]['enqueue'](function(){const _0x2a3ddc=_0x469867;return _0x45f753[_0x2a3ddc('0x7')][_0x2a3ddc('0xa')](_0x5a5690,_0x490574,_0x101ac0)[_0x2a3ddc('0x2')](function(){const _0x2a9e8=_0x2a3ddc;logger[_0x2a9e8('0x17')](_0x2a9e8('0x1b'),_0x490574,_0x5a5690);})[_0x2a3ddc('0x4')](function(_0x27fde9){const _0x143e23=_0x2a3ddc;logger['info'](JSON[_0x143e23('0x14')](_0x27fde9));});});},Migration[_0x2be0a7('0x1e')][_0x2be0a7('0xf')]=function(_0xa2e93f){const _0x8a4603=_0x2be0a7,_0x487da3=this;this[_0x8a4603('0xb')]['enqueue'](function(){const _0x3c53d8=_0x8a4603;return _0x487da3['queryInterface'][_0x3c53d8('0xf')](_0xa2e93f,{'force':!![]})[_0x3c53d8('0x2')](function(){logger['info']('table\x20dropped\x20%s',_0xa2e93f);})[_0x3c53d8('0x4')](function(_0x3163e8){logger['info'](JSON['stringify'](_0x3163e8));});});},Migration[_0x2be0a7('0x1e')]['addIndex']=function(_0x56247b,_0x1fb553,_0x201315){const _0x5568e6=_0x2be0a7,_0x31bfd6=this;this[_0x5568e6('0xb')][_0x5568e6('0x12')](function(){const _0x1a1a70=_0x5568e6;return _0x31bfd6[_0x1a1a70('0x7')][_0x1a1a70('0x0')](_0x56247b,_0x1fb553,{'indexName':_0x201315[_0x1a1a70('0x3')],'indicesType':_0x201315['indicesType']})[_0x1a1a70('0x2')](function(){const _0x4538b=_0x1a1a70;logger['info'](_0x4538b('0x11'),_0x56247b,_0x1fb553[_0x4538b('0x6')](','),_0x201315['indexName'],_0x201315['indicesType']);})[_0x1a1a70('0x4')](function(_0x501e72){const _0x16b977=_0x1a1a70;logger[_0x16b977('0x17')](JSON[_0x16b977('0x14')](_0x501e72));});});},Migration[_0x2be0a7('0x1e')]['removeIndex']=function(_0x55490f,_0x20c272){const _0x44d1c3=_0x2be0a7,_0x2785d8=this;this['sequence'][_0x44d1c3('0x12')](function(){const _0x133a79=_0x44d1c3;return _0x2785d8[_0x133a79('0x7')][_0x133a79('0x1')](_0x55490f,_0x20c272)[_0x133a79('0x2')](function(){const _0x49e05c=_0x133a79;logger[_0x49e05c('0x17')](_0x49e05c('0x18'),_0x55490f,_0x20c272);})['catch'](function(_0x24f2f3){const _0x5d60a8=_0x133a79;logger[_0x5d60a8('0x17')](JSON['stringify'](_0x24f2f3));});});},Migration[_0x2be0a7('0x1e')][_0x2be0a7('0x13')]=function(_0x544c8a){const _0x322ea0=_0x2be0a7,_0x1fe6ab=this;this[_0x322ea0('0xb')][_0x322ea0('0x12')](function(){const _0x4046ca=_0x322ea0;return _0x1fe6ab[_0x4046ca('0x7')][_0x4046ca('0x1a')][_0x4046ca('0x13')](_0x544c8a)[_0x4046ca('0x2')](function(){const _0x5e8007=_0x4046ca;logger[_0x5e8007('0x17')](_0x5e8007('0xe'),_0x544c8a);})[_0x4046ca('0x4')](function(_0x514a69){const _0x199dd9=_0x4046ca;logger['info'](JSON[_0x199dd9('0x14')](_0x514a69));});});},Migration[_0x2be0a7('0x1e')][_0x2be0a7('0x1c')]=function(_0x2f878a,_0x4dab00){const _0x5c61ec=this;this['sequence']['enqueue'](function(){const _0x58c954=a1020_0x5d0f;return _0x5c61ec[_0x58c954('0x7')][_0x58c954('0x1c')](_0x2f878a,_0x4dab00)[_0x58c954('0x2')](function(){const _0x1672ae=_0x58c954;logger[_0x1672ae('0x17')](_0x1672ae('0x8'),_0x4dab00,_0x2f878a);})[_0x58c954('0x4')](function(_0x6b791){const _0x16dcdf=_0x58c954;logger[_0x16dcdf('0x17')](util['inspect'](_0x6b791,{'showHidden':![],'depth':null}));});});},Migration[_0x2be0a7('0x1e')]['renameColumn']=function(_0x48fa06,_0xaca7d2,_0x16d32e){const _0x207c94=_0x2be0a7,_0x2496d1=this;this[_0x207c94('0xb')][_0x207c94('0x12')](function(){const _0x140e62=_0x207c94;return _0x2496d1['queryInterface'][_0x140e62('0x15')](_0x48fa06,_0xaca7d2,_0x16d32e)['then'](function(){const _0x3c666c=_0x140e62;logger[_0x3c666c('0x17')](_0x3c666c('0x5'),_0xaca7d2,_0x16d32e,_0x48fa06);})[_0x140e62('0x4')](function(_0x1524cf){const _0x18af86=_0x140e62;logger[_0x18af86('0x17')](util['inspect'](_0x1524cf,{'showHidden':![],'depth':null}));});});},Migration[_0x2be0a7('0x1e')][_0x2be0a7('0xd')]=function(_0x279487){const _0x693b06=_0x2be0a7;this[_0x693b06('0xb')][_0x693b06('0x12')](function(){return _0x279487();});},module['exports']={'up':function(_0x4cf779){return new Promise(function(_0x5f26a2){const _0x333165=a1020_0x5d0f,_0x13f67d=new Migration(_0x4cf779);_0x13f67d[_0x333165('0x13')](_0x333165('0x19')),_0x13f67d[_0x333165('0x13')]('DROP\x20INDEX\x20`users_ibfk_1`\x20ON\x20users'),_0x13f67d[_0x333165('0x13')](_0x333165('0x9')),_0x13f67d[_0x333165('0xd')](_0x5f26a2);});},'down':function(){}};
\ No newline at end of file