diff --git a/scripts/create_table.sql b/scripts/create_table.sql index 62981f1..2b2ac3d 100644 --- a/scripts/create_table.sql +++ b/scripts/create_table.sql @@ -30,7 +30,7 @@ CREATE TABLE transaction ( t_id SERIAL PRIMARY KEY, -- 流水号 a_id INTEGER REFERENCES account(a_id) NOT NULL, -- 关联账户号 c_id INTEGER REFERENCES category(c_id), -- 关联类别号 - s_id INTEGER REFERENCES category(c_id), -- 源账户号 + s_id INTEGER REFERENCES account(a_id), -- 源账户号 time TIMESTAMP, amount MONEY, meta JSONB -- 元数据