From 4bf9662efc7eb5963d5e610af32680f3fe1b8823 Mon Sep 17 00:00:00 2001 From: iridiumR Date: Mon, 22 May 2023 01:03:03 +0800 Subject: [PATCH] feat(db): change table Why not use jsonb? --- scripts/create_table.sql | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/create_table.sql b/scripts/create_table.sql index 8c1c808..2aae1cf 100644 --- a/scripts/create_table.sql +++ b/scripts/create_table.sql @@ -1,22 +1,18 @@ -- 创建账户表 CREATE TABLE account ( a_id SERIAL PRIMARY KEY, - balance DECIMAL(10, 2), meta JSONB ); -- 创建类别表 CREATE TABLE category ( c_id SERIAL PRIMARY KEY, - income_type boolean, meta JSONB ); -- 创建流水表 CREATE TABLE transaction ( t_id SERIAL PRIMARY KEY, - amount DECIMAL(10, 2), - date DATE, c_id INTEGER REFERENCES category(c_id), a_id INTEGER REFERENCES account(a_id), meta JSONB