1
0
Fork 1
mirror of https://example.com synced 2024-11-23 09:06:39 +09:00
This commit is contained in:
syuilo 2018-03-28 16:11:50 +09:00
parent 9bcd3cde46
commit efb7c71d88
2 changed files with 18 additions and 1 deletions

View file

@ -1,3 +1,13 @@
import * as mongo from 'mongodb';
import db from '../../db/mongodb';
export default db.get('sw_subscriptions') as any; // fuck type definition
const SwSubscription = db.get<ISwSubscription>('swSubscriptions');
export default SwSubscription;
export interface ISwSubscription {
_id: mongo.ObjectID;
userId: mongo.ObjectID;
endpoint: string;
auth: string;
publickey: string;
}

View file

@ -187,3 +187,10 @@ db.signin.update({}, {
user_id: 'userId',
}
}, false, true);
db.sw_subscriptions.renameCollection('swSubscriptions');
db.swSubscriptions.update({}, {
$rename: {
user_id: 'userId',
}
}, false, true);