diff options
| author | Joris Guyonvarch | 2026-04-18 11:04:47 +0200 |
|---|---|---|
| committer | Joris Guyonvarch | 2026-04-18 11:05:17 +0200 |
| commit | 6d1300640051baa23360846197b54e1e69ae32e3 (patch) | |
| tree | 46219dcf5b5c9e5da0920ffd966d49ba80947a9b /src/db/migrations/07-create-balancing-table.sql | |
| parent | b35589eb90f2e5ee5521964e64eb578e9eb99032 (diff) | |
Add balancing capabilities
If payment are too unbalanced, it’s easier to make a transfer.
Diffstat (limited to 'src/db/migrations/07-create-balancing-table.sql')
| -rw-r--r-- | src/db/migrations/07-create-balancing-table.sql | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/db/migrations/07-create-balancing-table.sql b/src/db/migrations/07-create-balancing-table.sql new file mode 100644 index 0000000..148657e --- /dev/null +++ b/src/db/migrations/07-create-balancing-table.sql @@ -0,0 +1,9 @@ +CREATE TABLE IF NOT EXISTS "balancing"( + "id" INTEGER PRIMARY KEY, + "source" INTEGER NOT NULL REFERENCES "users", + "destination" INTEGER NOT NULL REFERENCES "users", + "amount" INTEGER NOT NULL, + "created_at" TEXT NULL DEFAULT (datetime('now')), + "updated_at" TEXT NULL, + "deleted_at" TEXT NULL +) STRICT; |
