Skip to content

Commit d3b8383

Browse files
committed
Database implementation of Resource Group children with association table
Signed-off-by: Stefan van Ieperen <stefan@tweedegolf.com>
1 parent ef30f69 commit d3b8383

4 files changed

Lines changed: 226 additions & 149 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-- Add migration script here
2+
create table resource_group
3+
(
4+
id text not null
5+
constraint resource_group_pk
6+
primary key,
7+
created_date_time timestamptz not null,
8+
modification_date_time timestamptz not null,
9+
resource_group_name text not null,
10+
attributes jsonb,
11+
targets text[] not null default '{}'
12+
);
13+
14+
create table rg_child_ven_resource
15+
(
16+
rg_parent_rg_id text not null references resource_group (id) on delete cascade,
17+
rg_child_ven_resource_id text not null references resource (id) on delete cascade
18+
);
19+
20+
create table rg_child_rg
21+
(
22+
rg_parent_rg_id text not null references resource_group (id) on delete cascade,
23+
rg_child_rg_id text not null references resource_group (id) on delete cascade
24+
);

openleadr-vtn/src/api/resource_group.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,6 @@ pub async fn delete(
195195
pub struct QueryParams {
196196
#[validate(length(min = 1, max = 128))]
197197
pub(crate) resource_group_name: Option<String>,
198-
#[serde(rename = "venID")]
199-
pub(crate) ven_id: Option<VenId>,
200198
pub(crate) targets: TargetQueryParams,
201199
#[serde(default)]
202200
#[validate(range(min = 0))]

0 commit comments

Comments
 (0)