Support restore operation
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user