-
Notifications
You must be signed in to change notification settings - Fork 24
feat(policy): rework attribute value members #398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
53f5e85
2ee64a6
8ec2b58
264d2f1
915a548
91198e3
4da80e4
ca6ef6d
6a35e05
716022f
968d523
c5c1514
5e1f51e
477f928
a7fffe7
5ceeb0e
e0cd4d9
65316a0
95112d7
e618d92
ece2fed
53b5550
f1dc6ef
3ad315e
08ffa28
bb2a8fa
df41d3b
66398db
ad5df0d
adc0ff1
0be9b32
2c349d5
b4d590b
35199ba
ef02242
8234843
2f3d6e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Diagram for 20240223000000_create_val_members.sql | ||
|
|
||
| ```mermaid | ||
| --- | ||
| title: Attribute Value Mermaid Diagram | ||
| nodes: | | ||
| --- | ||
|
|
||
| erDiagram | ||
| AttributeValue ||--o{ ValueMember: "has group members" | ||
|
|
||
| AttributeValue { | ||
| uuid id PK | ||
| uuid namespace_id FK | ||
| uuid attribute_definition_id FK | ||
| varchar value | ||
| jsonb metadata | ||
| compIdx comp_key UK "ns_id + ad_id + value" | ||
| bool active | ||
| } | ||
|
|
||
| ValueMember { | ||
| uuid id PK | ||
| uuid value_id FK | ||
| uuid member_id FK | ||
| compIdx comp_key UK "value_id + member_id" | ||
| } | ||
|
|
||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| -- +goose Up | ||
| -- +goose StatementBegin | ||
|
|
||
| CREATE TABLE IF NOT EXISTS attribute_value_members | ||
| ( | ||
| id UUID PRIMARY KEY DEFAULT gen_random_uuid(), | ||
| value_id UUID NOT NULL REFERENCES attribute_values(id), | ||
| member_id UUID NOT NULL REFERENCES attribute_values(id), | ||
| UNIQUE (value_id, member_id) | ||
| ); | ||
|
|
||
| -- +goose StatementEnd | ||
|
|
||
| -- +goose Down | ||
|
|
||
| -- +goose StatementBegin | ||
| DROP TABLE IF EXISTS attribute_value_members; | ||
| -- +goose StatementEnd |
Uh oh!
There was an error while loading. Please reload this page.