title: Heroku postgres unique constraint error
body: <p>I have a local sqlite db that was created using the knex library. It runs perfectly fine on my local machine.</p>
  
  <p>I deployed the same knex syntax on heroku but under postgres however I get the error: </p>
  
  <pre><code>error: alter table "dAppTable" add constraint 
  "dapptable_dappname_unique" unique ("dAppName") - column "dAppName" 
  named in key does not exist
  </code></pre>
  
  <p>This is unusual as the table is clearly stated below: </p>
  
  <pre><code>exports.up = function(knex, Promise)
  {
    console.log('create dApp table');
  
    return knex.schema.createTableIfNotExists('dAppTable', function(table)
    {
      table.increments('id');
      table.string('dAppName').unique();
      table.string('abi');
      table.string('contractAddress').unique();
    })
  };
  
  exports.down = function(knex, Promise)
  {
      return knex.schema.dropTableIfExists('dAppTable').then(function ()
      {
          console.log('dAppTable table was dropped');
      })
  };
  </code></pre>
  
  <p>Here is the connection config file, production is used: </p>
  
  <pre><code>production: {
      client: 'postgresql',
      connection: process.env.DATABASE_URL,
      pool: {
          min: 2,
          max: 10
      },
      migrations: {
          tableName: 'dAppTable',
          directory: __dirname + '/migrations'
      },
      seeds: {
          directory: __dirname + '/seeds'
      }
  }
  </code></pre>