Download spectrum/api/migrations/20180621001409-thread-likes-table.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 508 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/migrations/20180621001409-thread-likes-table.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/api/migrations/20180621001409-thread-likes-table.js
-
curl -L -o 20180621001409-thread-likes-table.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/migrations/20180621001409-thread-likes-table.js
508 Bytes
| exports.up = function(r, conn) { | |
| return r | |
| .tableCreate('threadReactions') | |
| .run(conn) | |
| .then(() => { | |
| return Promise.all([ | |
| r | |
| .table('threadReactions') | |
| .indexCreate('threadId') | |
| .run(conn), | |
| r | |
| .table('threadReactions') | |
| .indexCreate('userId') | |
| .run(conn), | |
| ]); | |
| }) | |
| .catch(err => console.error(err)); | |
| }; | |
| exports.down = function(r, conn) { | |
| return Promise.all([r.tableDrop('threadReactions').run(conn)]); | |
| }; | |