0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00

Added sample table definitions for System-Versioning

Both with implicit and explicit column definition.
This commit is contained in:
Carlitxxx86 2022-04-21 08:51:00 -04:00 committed by Roland Bock
parent 31ef4f2e54
commit 92fa9d365d

View File

@ -30,8 +30,13 @@ CREATE TABLE tab_foo
_epsilon bigint, _epsilon bigint,
`omega` double, `omega` double,
some_number NUMERIC(314,15), 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 CREATE TABLE tab_bar
( (
@ -39,4 +44,6 @@ CREATE TABLE tab_bar
beta varchar(255) NULL DEFAULT "", beta varchar(255) NULL DEFAULT "",
gamma bool NOT NULL, gamma bool NOT NULL,
delta int delta int
);
-- implicit column definition for System-Versioned table
)WITH SYSTEM VERSIONING; -- enable System-Versioning for this table