Support for temporal tables

I am trying to do a POC of ReadyRoll Core Edition. After the initial import of the database I try to do a build of the project but I am getting the error:
Expected FILESTREAM but encountered GENERATED instead. the error takes me to a table with system versioning enabled 

the create table look something like:
CREATE TABLE [dbo].[Table1]
(
[Id] [int] NOT NULL IDENTITY(1, 1),
[StartTime] [datetime2] GENERATED ALWAYS AS ROW START HIDDEN NOT NULL,
[EndTime] [datetime2] GENERATED ALWAYS AS ROW END HIDDEN NOT NULL,
PERIOD FOR SYSTEM_TIME (StartTime, EndTime),
CONSTRAINT [PK_Table1] PRIMARY KEY CLUSTERED  ([Id])
)
WITH
(
SYSTEM_VERSIONING = ON (HISTORY_TABLE = [history].[Table1])
)
GO
 
the error is on the line with StartTime column. Any ideas how to get this to work? (or workaround this)

Regards,

Arthur Baan
Tagged:

Best Answer

  • dnlnlndnlnln Posts: 234 Gold 2
    Accepted Answer
    Hi Arthur,

    Sorry to hear you've run into a problem with importing your database. Would you mind confirming which  Target platform is selected in your project file? This can be done by opening the project designer (right-click Project in the Solution Explorer and select Properties).


    Either of the Azure options should work. If you needed to change the selection, you may need to close and re-open the project in order for the setting to take effect within IntelliSense, but the project should then build successfully.
    Daniel Nolan
    Product Manager
    Redgate Software

Answers

  • Arthur_BaanArthur_Baan Posts: 3 New member
    :)  this did the trick. It was set to SQL Server 2012. I have changed it to the actual target: SQl Server 2016 and the build succeeds now. 
  • Arthur_BaanArthur_Baan Posts: 3 New member
    : this did the trick. It was set to SQL Server 2012. I have changed it to the actual target SQl Server 2016 and the build succeeds now.
  • That's great Arthur, thanks for confirming.

    Just a heads-up that there's a slight chance you may encounter an error when attempting to deploy your temporal tables outside of Visual Studio. However we're working on a resolution and will update this thread once a fix has been prepared.
    Daniel Nolan
    Product Manager
    Redgate Software
  • Quick update: A fix for the Target platform setting has been implemented and will be included in the next SQL Change Automation release.
    Daniel Nolan
    Product Manager
    Redgate Software
Sign In or Register to comment.