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);