title: Cannot overwrite model once compiled Mongoose
body: <p>Not Sure what I'm doing wrong, here is my check.js</p>
  
  <pre><code>var db = mongoose.createConnection('localhost', 'event-db');
  db.on('error', console.error.bind(console, 'connection error:'));
  
  var a1= db.once('open',function(){
  var user = mongoose.model('users',{ 
         name:String,
         email:String,
         password:String,
         phone:Number,
        _enabled:Boolean
       });
  
  user.find({},{},function (err, users) {
      mongoose.connection.close();
      console.log("Username supplied"+username);
      //doSomethingHere })
      });
  </code></pre>
  
  <p>and here is my insert.js</p>
  
  <pre><code>var mongoose = require('mongoose');
  mongoose.connect('mongodb://localhost/event-db')
  
  var user = mongoose.model('users',{
       name:String,
       email:String,
       password: String,
       phone:Number,
       _enabled:Boolean
     });
  
  var new_user = new user({
       name:req.body.name,
       email: req.body.email,
       password: req.body.password,
       phone: req.body.phone,
       _enabled:false
     });
  
  new_user.save(function(err){
      if(err) console.log(err); 
     });
  </code></pre>
  
  <p>Whenever I'm trying to run check.js, I'm getting this error</p>
  
  <p><strong>Cannot overwrite 'users' model once compiled</strong>.</p>
  
  <p>I understand that this error comes due to mismatching of Schema, but I cannot see where this is happening ? I'm pretty new to mongoose and nodeJS.</p>
  
  <p>Here is what I'm getting from the client interface of my MongoDB: </p>
  
  <pre><code>MongoDB shell version: 2.4.6 connecting to: test 
  &gt; use event-db 
    switched to db event-db 
  &gt; db.users.find() 
    { "_id" : ObjectId("52457d8718f83293205aaa95"), 
      "name" : "MyName", 
      "email" : "myemail@me.com", 
      "password" : "myPassword", 
      "phone" : 900001123, 
      "_enable" : true 
    } 
  &gt;
  </code></pre>