Download spectrum/api/migrations/20170714171920-web-push-subscription.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 559 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/migrations/20170714171920-web-push-subscription.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/api/migrations/20170714171920-web-push-subscription.js
-
curl -L -o 20170714171920-web-push-subscription.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/migrations/20170714171920-web-push-subscription.js
559 Bytes
| exports.up = function(r, conn) { | |
| return r | |
| .tableCreate('webPushSubscriptions') | |
| .run(conn) | |
| .catch(err => { | |
| throw new Error(err); | |
| }) | |
| .then(() => | |
| r | |
| .table('webPushSubscriptions') | |
| .indexCreate('userId') | |
| .run(conn) | |
| ) | |
| .then(() => | |
| r | |
| .table('webPushSubscriptions') | |
| .indexCreate('endpoint') | |
| .run(conn) | |
| ); | |
| }; | |
| exports.down = function(r, conn) { | |
| return r | |
| .tableDrop('webPushSubscriptions') | |
| .run(conn) | |
| .catch(err => { | |
| throw new Error(err); | |
| }); | |
| }; | |