Support restore operation

This commit is contained in:
WQY\qiong
2022-11-25 23:52:18 +08:00
parent e13bb53b98
commit 008cd2b3a2
7 changed files with 25 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
create table operation
(
id serial primary key
id bigserial primary key
, redo text not null
, undo text not null
, parent integer references operation(id) on delete cascade
@@ -13,13 +13,20 @@ insert into operation (id, redo, undo, redo_cs, undo_cs) values (0, '', '', '',
create table current_operation
(
id integer primary key references operation(id) -- must update before delete
id bigint primary key references operation(id) -- must update before delete
);
insert into current_operation (id) values (0);
create table snapshot_operation
(
id integer primary key references operation(id) on delete cascade
id bigint primary key references operation(id) on delete cascade
, tag text not null unique
);
create table restore_operation
(
id bigint primary key references operation(id) -- set after reading inp
);
insert into restore_operation (id) values (0);