Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4c24a25

Browse files
authored
triggered_at => created_at
1 parent fc70db1 commit 4c24a25

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,18 +1427,18 @@ create table test_history
14271427
(
14281428
id integer generated always as identity primary key,
14291429
reference_id integer not null, -- идентификатор связанной сущности, FK быть не должно, т.к. запись м.б. удалена
1430-
triggered_at timestamp(0) with time zone not null default now() check (triggered_at <= now() + interval '10m'),
1430+
created_at timestamp(0) with time zone not null default now() check (created_at <= now() + interval '10m'),
14311431
old_data jsonb check(jsonb_typeof(old_data) = 'object'),
14321432
new_data jsonb check(jsonb_typeof(new_data) = 'object'),
14331433
check (not (old_data is null and new_data is null))
14341434
);
14351435

14361436
create index on test_history (reference_id);
1437-
create index on test_history using brin (triggered_at);
1437+
create index on test_history using brin (created_at);
14381438

14391439
comment on column test_history.id is 'ID';
14401440
comment on column test_history.reference_id is 'ID в таблице test (существующий или удалённый)';
1441-
comment on column test_history.triggered_at is 'Дата-время действия';
1441+
comment on column test_history.created_at is 'Дата-время действия';
14421442
comment on column test_history.old_data is 'Старые данные (для INSERT всегда NULL)';
14431443
comment on column test_history.new_data is 'Новые данные (для DELETE всегда NULL)';
14441444

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /