@@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS features (
2121CREATE UNIQUE INDEX IF NOT EXISTS features_name_idx ON features (name);
2222
2323-- kvstores houses key-value pairs under various namespaces determined
24- -- by the rule name, session ID, and feature name.
24+ -- by the rule name, group ID, and feature name.
2525CREATE TABLE IF NOT EXISTS kvstores (
2626 -- The auto incrementing primary key.
2727 id INTEGER PRIMARY KEY ,
@@ -35,15 +35,15 @@ CREATE TABLE IF NOT EXISTS kvstores (
3535 -- kv_store.
3636 rule_id BIGINT REFERENCES rules(id) NOT NULL ,
3737
38- -- The session ID that this kv_store belongs to.
39- -- If this is set, then this kv_store is a session-specific
38+ -- The group ID that this kv_store belongs to.
39+ -- If this is set, then this kv_store is a session-group specific
4040 -- kv_store for the given rule.
41- session_id BIGINT REFERENCES sessions(id) ON DELETE CASCADE ,
41+ group_id BIGINT REFERENCES sessions(id) ON DELETE CASCADE ,
4242
4343 -- The feature name that this kv_store belongs to.
4444 -- If this is set, then this kv_store is a feature-specific
45- -- kvstore under the given session ID and rule name.
46- -- If this is set, then session_id must also be set.
45+ -- kvstore under the given group ID and rule name.
46+ -- If this is set, then group_id must also be set.
4747 feature_id BIGINT REFERENCES features(id),
4848
4949 -- The key of the entry.
@@ -54,4 +54,4 @@ CREATE TABLE IF NOT EXISTS kvstores (
5454);
5555
5656CREATE UNIQUE INDEX IF NOT EXISTS kvstores_lookup_idx
57- ON kvstores (entry_key, rule_id, perm, session_id , feature_id);
57+ ON kvstores (entry_key, rule_id, perm, group_id , feature_id);
0 commit comments