update seata 1.7.1 => 2.3.0

This commit is contained in:
疯狂的狮子Li
2025-03-20 17:38:11 +08:00
parent d2fb7da4aa
commit 6dc7519bdb
18 changed files with 629 additions and 101 deletions

View File

@@ -1408,7 +1408,7 @@ create cast (varchar as timestamptz) with function cast_varchar_to_timestamp as
-- for AT mode you must to init this sql for you business database. the seata server not need it.
CREATE TABLE IF NOT EXISTS undo_log
CREATE TABLE IF NOT EXISTS public.undo_log
(
id SERIAL NOT NULL,
branch_id BIGINT NOT NULL,
@@ -1420,8 +1420,16 @@ CREATE TABLE IF NOT EXISTS undo_log
log_modified TIMESTAMP(0) NOT NULL,
CONSTRAINT pk_undo_log PRIMARY KEY (id),
CONSTRAINT ux_undo_log UNIQUE (xid, branch_id)
);
);
CREATE INDEX ix_log_created ON undo_log(log_created);
COMMENT on table undo_log is 'AT transaction mode undo table';
COMMENT ON TABLE public.undo_log IS 'AT transaction mode undo table';
COMMENT ON COLUMN public.undo_log.branch_id IS 'branch transaction id';
COMMENT ON COLUMN public.undo_log.xid IS 'global transaction id';
COMMENT ON COLUMN public.undo_log.context IS 'undo_log context,such as serialization';
COMMENT ON COLUMN public.undo_log.rollback_info IS 'rollback info';
COMMENT ON COLUMN public.undo_log.log_status IS '0:normal status,1:defense status';
COMMENT ON COLUMN public.undo_log.log_created IS 'create datetime';
COMMENT ON COLUMN public.undo_log.log_modified IS 'modify datetime';
CREATE SEQUENCE IF NOT EXISTS undo_log_id_seq INCREMENT BY 1 MINVALUE 1 ;