Description
Join table connecting nodes to tags (many-to-many)
Columns
| Name |
Type |
Default |
Nullable |
Children |
Parents |
Comment |
| created_at |
timestamp with time zone |
CURRENT_TIMESTAMP |
true |
|
|
When this association was created |
| deleted_at |
timestamp with time zone |
|
true |
|
|
Soft delete timestamp |
| id |
bigint |
nextval('node_tags_id_seq'::regclass) |
false |
|
|
|
| node_id |
bigint |
|
false |
|
public.nodes |
ID of the node being tagged |
| tag_id |
bigint |
|
false |
|
public.tags |
ID of the tag being applied |
Constraints
| Name |
Type |
Definition |
| fk_rails_b51cdcc57f |
FOREIGN KEY |
FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE |
| fk_rails_ebc9aafd9f |
FOREIGN KEY |
FOREIGN KEY (node_id) REFERENCES nodes(id) ON DELETE CASCADE |
| node_tags_pkey |
PRIMARY KEY |
PRIMARY KEY (id) |
Indexes
| Name |
Definition |
| idx_node_tags_deleted_at |
CREATE INDEX idx_node_tags_deleted_at ON public.node_tags USING btree (deleted_at) |
| idx_node_tags_node_id |
CREATE INDEX idx_node_tags_node_id ON public.node_tags USING btree (node_id) |
| idx_node_tags_tag_id |
CREATE INDEX idx_node_tags_tag_id ON public.node_tags USING btree (tag_id) |
| idx_node_tags_unique |
CREATE UNIQUE INDEX idx_node_tags_unique ON public.node_tags USING btree (node_id, tag_id) |
| node_tags_pkey |
CREATE UNIQUE INDEX node_tags_pkey ON public.node_tags USING btree (id) |
Relations

Generated by tbls