Skip to content

Commit

Permalink
Added sample table definitions for System-Versioning
Browse files Browse the repository at this point in the history
Both with implicit and explicit column definition.
  • Loading branch information
Carlitxxx86 authored and rbock committed Apr 22, 2022
1 parent 31ef4f2 commit 92fa9d3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tests/scripts/ddl2cpp_sample_good.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,20 @@ CREATE TABLE tab_foo
_epsilon bigint,
`omega` double,
some_number NUMERIC(314,15),
CONSTRAINT uc_delta UNIQUE (delta, _epsilon)
);
CONSTRAINT uc_delta UNIQUE (delta, _epsilon),

-- explicit column definition for System-Versioned table
rowStart TIMESTAMP(6) GENERATED ALWAYS AS ROW START,
rowEnd TIMESTAMP(6) GENERATED ALWAYS AS ROW END,
PERIOD FOR SYSTEM_TIME(rowStart, rowEnd)
) WITH SYSTEM VERSIONING; -- enable System-Versioning for this table

CREATE TABLE tab_bar
(
alpha bigint AUTO_INCREMENT RRIMARY_KEY,
beta varchar(255) NULL DEFAULT "",
gamma bool NOT NULL,
delta int
);

-- implicit column definition for System-Versioned table
)WITH SYSTEM VERSIONING; -- enable System-Versioning for this table

0 comments on commit 92fa9d3

Please sign in to comment.