Download spectrum/api/migrations/20170706205658-slack-import.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 744 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/migrations/20170706205658-slack-import.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/api/migrations/20170706205658-slack-import.js
-
curl -L -o 20170706205658-slack-import.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/migrations/20170706205658-slack-import.js
744 Bytes
| exports.up = function(r, conn) { | |
| return Promise.all([ | |
| r | |
| .tableCreate('slackImports') | |
| .run(conn) | |
| .catch(err => { | |
| console.log(err); | |
| throw err; | |
| }), | |
| ]) | |
| .then(() => | |
| Promise.all([ | |
| r | |
| .table('slackImports') | |
| .indexCreate('communityId', r.row('communityId')) | |
| .run(conn) | |
| .catch(err => { | |
| console.log(err); | |
| throw err; | |
| }), | |
| r | |
| .table('users') | |
| .indexCreate('email', r.row('email')) | |
| .run(conn), | |
| ]) | |
| ) | |
| .catch(err => { | |
| console.log(err); | |
| throw err; | |
| }); | |
| }; | |
| exports.down = function(r, conn) { | |
| return Promise.all([r.tableDrop('slackImports').run(conn)]); | |
| }; | |