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:
parent
31ef4f2e54
commit
92fa9d365d
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user