Issue Tracker database error

When I try to seed my database with a second entry I always get an error. I want two projects, one called “test” and one called “apitest”. My code looks like:

Project.create({
  project_title: "apitest"
}, function(err, project){
  if(err){
    console.log(err);
  } else {
    console.log(project);
  }
});

I have tried deleting the database a few times but whenever I try to add a second project, I get this error:
{ MongoError: E11000 duplicate key error index: freecodecamp.projects.$project_1 dup key: { : null }

My schema looks like this:

// Issue
var issueSchema = new mongoose.Schema({
  issue_title: {
    type: String,
    required: true
  },
  issue_text: {
    type: String,
    required: true
  },
  created_by: {
    type: String,
    required: true
  },
  assigned_to: String,
  status_text: String,
  created_on: Date,
  updated_on: Date,
  open: {
    type: Boolean,
    default: true
  }
});
var Issue = new mongoose.model("Issue", issueSchema);

// Project
var projectSchema = new mongoose.Schema({
  project_title: {
    type: String,
    unique: true
  },
  issues: [
    {
      type: mongoose.Schema.Types.ObjectId,
      ref: "Issue"
    }
  ]
});
var Project = mongoose.model("Project", projectSchema);

I have never has this issue before. Can someone help me to understand this?

I eventually solved the issue.

If anyone is having a similar problem, you need to go to mLab, click the “indexes” tab and delete the indexes. Not really sure how they got there in the first place but that is what solved it for me.