title: transact sql temporal table and user-defined data type
body: <p>Sorry for my english. </p>
  
  <p>I have the following definitions in a visual studio 2017 dacpac project (target platform = SQL SERVER 2016). </p>
  
  <pre><code>CREATE SCHEMA [Demo]
  CREATE TYPE Demo.Code FROM NVARCHAR(16) NOT NULL 
  CREATE TABLE [Demo].[Gear] (
      [Id] int identity(1,1) primary key, 
      [Name] nvarchar(25) not null, 
      [Code] [Demo].[Code], 
      [rowguid] uniqueidentifier constraint [DF_Gear_rowguid] default (newid()) rowguidcol not null, 
      [ValidStart] DATETIME2 GENERATED ALWAYS AS ROW START NOT NULL,
      [ValidEnd] DATETIME2 GENERATED ALWAYS AS ROW END NOT NULL,
      PERIOD FOR SYSTEM_TIME([ValidStart], [ValidEnd])
  )
  WITH ( SYSTEM_VERSIONING = ON(HISTORY_TABLE = [Histo].[Gear]) )
  GO
  </code></pre>
  
  <p>After build, I have this error : </p>
  
  <blockquote>
    <p>SQL71609: System-versioned current and history tables do not have
    matching schemas. Mismatched column: '[Demo].[Gear].[Code]'.</p>
  </blockquote>
  
  <p>Without user defined data type, it's okay. Is someone knowing that's the problem ? </p>