Update Node

- add error handing for
  - foreign key constraint
  - unique constraint
- Update nodes database
This commit is contained in:
2025-03-05 15:58:31 +01:00
parent 1aba25b9b3
commit 10b95057e5
6 changed files with 41 additions and 5 deletions

5
sql/001-nodes.sql Normal file
View File

@@ -0,0 +1,5 @@
-- make device index unique
DROP INDEX IF EXISTS public.i_nodes_type;
CREATE UNIQUE INDEX IF NOT EXISTS i_nodes_device ON public.nodes (device);