title: First and only user gets assigned id 2 at Heroku
body: <p>After deploying my application I created a new user and noticed that the address bar was reporting number 2 at the end of the url: htt://...herokuapp.com/users/2.</p>
  
  <p>So I checked with rails console in production environment first and then at Heroku. There seemed to be nothing irregular in my production environment (running sqlite3), so I ran <code>heroku run console --sandbox</code> and got the following results:</p>
  
  <pre><code>irb(main):001:0&gt; User.count
     (4.9ms)  SELECT COUNT(*) FROM "users"
     (4.9ms)  SELECT COUNT(*) FROM "users"
  =&gt; 1
  
  
  irb(main):002:0&gt; User.first
    User Load (2.5ms)  SELECT  "users".* FROM "users"  ORDER BY "users"."id" ASC LIMIT 1
    User Load (2.5ms)  SELECT  "users".* FROM "users"  ORDER BY "users"."id" ASC LIMIT 1
  =&gt; #&lt;User id: 2, name: "Mark Homburg", email: "mark.homburg@yahoo.com", created_at: "2015-12-20 13:56:04", updated_at: "2015-12-20 13:56:04", password_digest: "..."&gt;
  
  
  irb(main):001:0&gt; User.find(1)
    User Load (1.1ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 1]]
    User Load (1.1ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 1]]
  ActiveRecord::RecordNotFound: Couldn't find User with 'id'=1
  </code></pre>
  
  <p>What is irregular at Heroku is the duplicate SELECT FROM "users" action after running <code>User.count</code>, <code>User.first</code> and <code>User.find(1)</code>. As I said there was nothing irregular in the corresponding commands in my production environment:</p>
  
  <pre><code>&gt;&gt; User.find(1)
    User Load (0.4ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1  [["id", 1]]
  =&gt; #&lt;User id: 1, name: "Rails Tutorial", email: "example@railstutorial.org", created_at: "2015-12-20 10:08:22", updated_at: "2015-12-20 10:08:22", password_digest: "..."&gt;
  </code></pre>
  
  <p>In my opinion this could be explained by the presence of a duplicate users table in the database, as I tried to explain in <a href="https://stackoverflow.com/questions/34295303/duplicate-migrations-in-topic-branch">Duplicate migrations in topic branch</a>.
  What is your opinion and what do you suggest I can do?</p>