Commit Graph

46 Commits

Author SHA1 Message Date
kiwiidb
9ba016becd remove fee reserve id from tx entry 2023-07-04 17:04:41 +02:00
kiwiidb
f0237fa443 update constraint 2023-07-04 14:47:50 +02:00
kiwiidb
3660db37a9 commit fee reserve tx entry 2023-07-04 11:50:03 +02:00
kiwiidb
1313e089eb add db migration 2023-07-03 14:31:07 +02:00
kiwiidb
891d9e8ef5 add user migration 2023-05-24 11:20:08 +02:00
kiwiidb
413b0cfb0d remove debug 2023-05-08 09:20:54 +02:00
kiwiidb
22261a5c37 remove debug 2023-05-08 09:18:52 +02:00
kiwiidb
f7be3e5ce5 add migration 2023-05-08 09:16:33 +02:00
kiwiidb
4ab37875d0 Revert "remove nowait"
This reverts commit 140523eacf.
2023-05-08 09:16:02 +02:00
kiwiidb
140523eacf remove nowait 2023-05-08 09:15:47 +02:00
kiwiidb
1b641e25e7 add db migration 2023-05-03 17:17:23 +02:00
René Aaron
b66898e599 feat: db index for subscriptions query 2023-02-22 20:19:50 +01:00
René Aaron
05748cb6a3 fix: added a new index for invoices 2023-02-16 06:30:35 +01:00
kiwiidb
364b4e0ca4 specific constraint name 2023-01-13 14:10:06 +01:00
kiwiidb
434eb95e7f add tx entry tuple constraint 2023-01-13 10:32:43 +01:00
Michael Bumann
78ebd16cce Remove more 2022-12-27 10:30:10 +01:00
Michael Bumann
bad31df8be Too many index at once 2022-12-27 10:17:47 +01:00
Michael Bumann
301c78f426 This one is wrong here 2022-12-26 23:39:37 +01:00
Michael Bumann
eda3151791 Try --bin:split 2022-12-26 23:35:32 +01:00
Michael Bumann
e33b0551b4 typo 2022-12-26 23:28:18 +01:00
Michael Bumann
b665172e5f Add full query index 2022-12-26 23:23:26 +01:00
Michael Bumann
fa690530bb Create index concurrently 2022-12-26 22:28:17 +01:00
Michael Bumann
d0e942448b Enable all index 2022-12-26 21:39:04 +01:00
Michael Bumann
287d06e5bf Add DB indexes 2022-12-26 21:31:43 +01:00
Pavol Rusnak
9dc300a6cf Add .editorconfig + fix whitespace issues 2022-07-22 00:03:48 +02:00
Michael Bumann
6173dcac09 Fix SQLite error in inital migration
'initialized'::character varying is not supported in SQLite
2022-05-27 20:37:01 +02:00
kiwiidb
26944ae515 add destination custom records column 2022-05-18 09:08:15 +02:00
Stefan Kostic
64c77d4ebb Add new migration to alter check balance trigger 2022-03-08 18:51:16 +01:00
Stefan Kostic
f68ca7ac6e Revert constraint migration 2022-03-08 18:38:53 +01:00
kiwiidb
a3c6f294e0 fix merge conflict 2022-03-08 14:57:46 +01:00
Stefan Kostic
a881131b8d Adapt balance constraint 2022-03-04 18:29:31 +01:00
Stefan Kostic
90e90dc79c Merge branch 'main' into fee-handling 2022-03-04 17:46:36 +01:00
kiwiidb
3d8ecd425f keysend: low-level work and instructions 2022-03-04 11:08:27 +01:00
kiwiidb
735cd6a839 fee handling should come from payment response 2022-03-01 10:06:29 +01:00
Stefan Kostic
de823e478a Fix migration according to PR comments 2022-02-23 18:41:58 +01:00
Stefan Kostic
b25c1cb1c4 Use sql for init migration 2022-02-22 15:52:21 +01:00
Michael Bumann
0de0ed18b4 Missing fix 2022-01-22 15:19:30 +01:00
Michael Bumann
319524ea4c Trying to get the PG constraints working
This uses row level locking on the accounts. If two transactions access the same account one fails
2022-01-22 13:00:46 +01:00
Michael Bumann
43aba70dd8 Fix invoice preimages for internal payments
We create the preimage on incoming invoices. If it is an internal incoming payment (meaning from one user to another user) we use that preimage and save it on the outgoing invoice.
This makes sure we can give wallets the correct preimage for a payment request even though no lightning transaction happened
2022-01-21 13:56:02 +01:00
Michael Bumann
a5d1c3f4ed Add constraint to invoices DB to make sure settled invoices have a preimage saved
We just try to store as much potential relevant information as possible.
This could help debugging and verifiying payments if there is an issue
2022-01-21 11:16:48 +01:00
Michael Bumann
3a67f86a34 Merge main 2022-01-20 14:15:40 +01:00
kiwiidb
7c51383feb replace all panics with log.Fatal 2022-01-20 13:44:59 +01:00
Michael Bumann
70a7e1a8eb Add DB constraints to check for user balances 2022-01-20 02:03:51 +01:00
Michael Bumann
b38357091d Add DB view for easier balance calculation and extend model associations 2022-01-19 10:57:50 +01:00
Viktor Patchev
919affa2db Update package name to new repo 2022-01-18 10:42:53 +01:00
Roman Useinov
628071160c Cleanup (#25)
* remove cmd folder as we are going to have only one entrypoint

* get rid of pkg directory

* rename test -> integration_tests as unit tests should reside next to the actual files they are testing

* database migration WIP

* reinstate gorm boilerplate in the addinvoice for now to make it compile

* introduce migrations

* add Makefile

* don't use unsigned types for database mappings

* migrations work now

* add build target

* use echo groups

* gorm removed

* add envconfig

* fix comments
2022-01-16 00:49:19 +01:00