title: Generating models and migrations for an engine
body: <p>So I'm working on a new project that seems like a great choice for using the new Engine functionality. It's as engines say, its own little app, w/ its own views and controllers and models. Here's where I'm coming up short.</p>
  
  <p>I create my test application in which I will mount the new engine.</p>
  
  <pre><code>rails new engine_app &amp;&amp; cd engine_app
  </code></pre>
  
  <p>I then create the new engine</p>
  
  <pre><code>rails plugin new my_engine --mountable
  </code></pre>
  
  <p>I then add the 'gem' to the engine_app's gemfile</p>
  
  <pre><code>gem 'my_engine', :path =&gt; './my_engine'
  </code></pre>
  
  <p>I then mount the engine in engine_app's routes as so</p>
  
  <pre><code>mount MyEngine::Engine, :at =&gt; '/my_engine'
  </code></pre>
  
  <p>I then cd into my_engine's dummy app and run </p>
  
  <pre><code>rails generate model MyModel title:string body:text
  </code></pre>
  
  <p>Here's where I run into my confusion. From what I understand this is supposed to generate a namespace table (I think it would be my_engine_my_model). The table in the migration file is just my_model.</p>
  
  <p>Secondly how do I run this migration and is the migration file correct in only calling the table :my_model? I have tried running the following but nothing seems to happen, and I've checked the database and the table isn't there.</p>
  
  <p>So to recap, I need to know how to create migrations in the engine, and be able to run them on the parent apps database correctly.</p>
  
  <p>Thanks for any help and guidance.</p>