2018-01-10 16:31:49 +00:00
|
|
|
//
|
|
|
|
// Products
|
|
|
|
//
|
|
|
|
db = db.getSiblingDB('users');
|
|
|
|
db.users.insertMany([
|
|
|
|
{name: 'user', password: 'password', email: 'user@me.com'},
|
2020-02-25 16:15:08 +00:00
|
|
|
{name: 'stan', password: 'bigbrain', email: 'stan@instana.com'},
|
|
|
|
{name: 'partner-57', password: 'worktogether', email: 'howdy@partner.com'}
|
2018-01-10 16:31:49 +00:00
|
|
|
]);
|
|
|
|
|
|
|
|
// unique index on the name
|
|
|
|
db.users.createIndex(
|
|
|
|
{name: 1},
|
|
|
|
{unique: true}
|
|
|
|
);
|
|
|
|
|