This commit is contained in:
acx
2024-11-24 11:29:18 +08:00
parent 3fa7649877
commit 7a58035d0c
8 changed files with 129 additions and 19 deletions

View File

@@ -9,3 +9,4 @@ DROP TABLE IF EXISTS "accounts";
DROP TABLE IF EXISTS "amounts";
DROP TABLE IF EXISTS "users";
DROP TABLE IF EXISTS "operations";
DROP TABLE IF EXISTS "operation_snapshots";

View File

@@ -103,3 +103,10 @@ CREATE TABLE "operations" (
"create_at" TIMESTAMP NOT NULL DEFAULT current_timestamp,
"update_at" TIMESTAMP NOT NULL DEFAULT current_timestamp
);
CREATE TABLE "operation_snapshots" (
"id" BIGSERIAL PRIMARY KEY,
"uid" BIGINT NOT NULL,
"max_op_id" BIGINT NOT NULL,
"create_at" TIMESTAMP NOT NULL DEFAULT current_timestamp
);