Sorry for my english.
I have the following definitions in a visual studio 2017 dacpac project (target platform = SQL SERVER 2016).
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
After build, I have this error :
SQL71609: System-versioned current and history tables do not have matching schemas. Mismatched column: '[Demo].[Gear].[Code]'.
Without user defined data type, it's okay. Is someone knowing that's the problem ?