react-code-dataset / spectrum /api /migrations /20170714171920-web-push-subscription.js
Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
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);
});
};