From 6d1300640051baa23360846197b54e1e69ae32e3 Mon Sep 17 00:00:00 2001
From: Joris Guyonvarch
Date: Sat, 18 Apr 2026 11:04:47 +0200
Subject: Add balancing capabilities

If payment are too unbalanced, it’s easier to make a transfer.
---
 src/db/migrations/07-create-balancing-table.sql | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 src/db/migrations/07-create-balancing-table.sql

(limited to 'src/db/migrations/07-create-balancing-table.sql')

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;
-- 
cgit v1.2.3

