module.exports = function(schema, mongoose) {
  'use strict';

  mongoose = mongoose || require('mongoose');

  var clonedSchema = new mongoose.Schema();

  schema.eachPath(function(key, path) {
    if (key === "_id") {
      return;
    }

    var clonedPath = {};

    clonedPath[key] = path.options;
    clonedPath[key].unique = false;

    clonedSchema.add(clonedPath);
  });

  return clonedSchema;
};
@@ -296,24 +296,31 @@
 ptions;%0A    
+delete 
 clonedPath%5Bk
@@ -333,16 +333,8 @@
 ique
- = false
 ;%0A%0A 

Check that 'unique' exists. Fixes #26