title: Using temporal tables with EF6 - PostgreSQL
body: <p>I'm using PostgreSQL as relational database for my EF Core 6 project and I can not figure out how to get temporal tables to work with PostgreSQL after running migration. It works fine if I used SQL Server for it, but I would like to make it work in PostgreSQL.</p>
  <p>Provider I use for EFCore:
  <a href="https://www.npgsql.org/efcore/" rel="nofollow noreferrer">https://www.npgsql.org/efcore/</a></p>
  <p>I follow this guide for temporal tables for EF Core 6
  <a href="https://devblogs.microsoft.com/dotnet/prime-your-flux-capacitor-sql-server-temporal-tables-in-ef-core-6-0/" rel="nofollow noreferrer">https://devblogs.microsoft.com/dotnet/prime-your-flux-capacitor-sql-server-temporal-tables-in-ef-core-6-0/</a></p>
  <p>All tables have been created, but not the temporal tables / System-Versioned.</p>
  <p>Code:</p>
  <pre><code>protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) =&gt; optionsBuilder.UseNpgsql(&quot;Host=my_host;Database=my_db;Username=my_user;Password=my_pw&quot;);}
  </code></pre>
  <p>Temporal tables using modelbuilder</p>
  <pre><code> modelBuilder.Entity&lt;Car&gt;().ToTable(&quot;Car&quot;, c =&gt; c.IsTemporal());
  </code></pre>
  <p>Is there anything I forgot? It also does not look like a temporal table is created in the migration / model snapshot itself</p>