title: How can i fix SQLSTATE[42704]: Undefined object: 7 ERROR: data type json has no default operator class for access method "btree" in heroku hosting
body: <p>I want to ask how to fix this error in laravel heroku hosting in my local I was using mysql but in heroku I switched to postgres and I get those errors while migrating.</p>
  <p>In Connection.php line 678:</p>
  <blockquote>
  <p>SQLSTATE[42704]: Undefined object: 7 ERROR:  data type json has no default operator class for access method &quot;btree&quot;<br />
  HINT: You must specify an operator class for the index or define a default operator class for the data type. (SQL: alter table &quot;functions&quot; add constraint &quot;functions_function_elements_unique&quot; unique (&quot;function_elements&quot;))</p>
  </blockquote>
  <p>In Connection.php line 471:</p>
  <blockquote>
  <p>SQLSTATE[42704]: Undefined object: 7 ERROR:  data type json has no default operator class for access method &quot;btree&quot;<br />
  HINT: You must specify an operator class for the index or define a default operator class for the data type.</p>
  </blockquote>