<p dir="auto">Using Postgresql dialect uses psycopg2  <code class="notranslate">postgresql+psycopg2://scott:tiger@localhost/mydatabase</code> , I was able to connect to redshift, however, I was not able to fetch any tables in schema other than public! Is there any way we get fetch tables from schema other than public.</p>
<p dir="auto">when I try to upgrade my superset, I use superset db upgrade, I ran into the error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sqlalchemy.exc.IntegrityError: (pymysql.err.IntegrityError) (1062, &quot;Duplicate entry 'xxxx' for key 'uq_saved_query_uuid'&quot;)
[SQL: ALTER TABLE saved_query ADD CONSTRAINT uq_saved_query_uuid UNIQUE (uuid)]
(Background on this error at: http://sqlalche.me/e/13/gkpj)"><pre class="notranslate"><code class="notranslate">sqlalchemy.exc.IntegrityError: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'xxxx' for key 'uq_saved_query_uuid'")
[SQL: ALTER TABLE saved_query ADD CONSTRAINT uq_saved_query_uuid UNIQUE (uuid)]
(Background on this error at: http://sqlalche.me/e/13/gkpj)
</code></pre></div>
<h3 dir="auto">Environment</h3>
<p dir="auto">Mysql-5.7.25</p>
<h3 dir="auto">Additional context</h3>
<p dir="auto">I went back to commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/apache/superset/commit/d7eb1d476f6e2ffbc500c613e319b1e49a456a5a/hovercard" href="https://github.com/apache/superset/commit/d7eb1d476f6e2ffbc500c613e319b1e49a456a5a"><tt>d7eb1d4</tt></a>:  on 96e99fb176a0_add_import_mixing_to_saved_query.py, there is a line of code, which is obviously written for acceleration:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Add uuids directly using built-in SQL uuid function
add_uuids_by_dialect = {
    MySQLDialect: &quot;&quot;&quot;UPDATE %s SET uuid = UNHEX(REPLACE(uuid(), &quot;-&quot;, &quot;&quot;));&quot;&quot;&quot;,
    PGDialect: &quot;&quot;&quot;UPDATE %s SET uuid = uuid_in(md5(random()::text || clock_timestamp()::text)::cstring);&quot;&quot;&quot;,
}
"><pre class="notranslate"><code class="notranslate"># Add uuids directly using built-in SQL uuid function
add_uuids_by_dialect = {
    MySQLDialect: """UPDATE %s SET uuid = UNHEX(REPLACE(uuid(), "-", ""));""",
    PGDialect: """UPDATE %s SET uuid = uuid_in(md5(random()::text || clock_timestamp()::text)::cstring);""",
}

</code></pre></div>
<p dir="auto">I tried this line of code on my table with couple rows, it gives exact same uuid for each row. After I deleted this line of code, everything goes on well.</p>