# public.credential_dependency

## Columns

| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false |  |  |  |
| credentialId | varchar(36) |  | false |  | [public.credentials_entity](public.credentials_entity.md) |  |
| dependencyId | varchar(255) |  | false |  |  |  |
| dependencyType | varchar(64) |  | false |  |  |  |
| id | integer |  | false |  |  |  |

## Constraints

| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_5ec8e8c8d3539f3696cf73b43bf | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE CASCADE |
| PK_80212729ed0ffa0709417ab28f4 | PRIMARY KEY | PRIMARY KEY (id) |
| credential_dependency_createdAt_not_null | n | NOT NULL "createdAt" |
| credential_dependency_credentialId_not_null | n | NOT NULL "credentialId" |
| credential_dependency_dependencyId_not_null | n | NOT NULL "dependencyId" |
| credential_dependency_dependencyType_not_null | n | NOT NULL "dependencyType" |
| credential_dependency_id_not_null | n | NOT NULL id |

## Indexes

| Name | Definition |
| ---- | ---------- |
| IDX_5ec8e8c8d3539f3696cf73b43b | CREATE INDEX "IDX_5ec8e8c8d3539f3696cf73b43b" ON public.credential_dependency USING btree ("credentialId") |
| IDX_91ee85fa9619dd6776725e117b | CREATE INDEX "IDX_91ee85fa9619dd6776725e117b" ON public.credential_dependency USING btree ("dependencyType", "dependencyId") |
| IDX_credential_dependency_credentialId_dependencyType_dependenc | CREATE UNIQUE INDEX "IDX_credential_dependency_credentialId_dependencyType_dependenc" ON public.credential_dependency USING btree ("credentialId", "dependencyType", "dependencyId") |
| PK_80212729ed0ffa0709417ab28f4 | CREATE UNIQUE INDEX "PK_80212729ed0ffa0709417ab28f4" ON public.credential_dependency USING btree (id) |

## Relations

```mermaid
erDiagram

"public.credential_dependency" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE"

"public.credential_dependency" {
  timestamp_3__with_time_zone createdAt
  varchar_36_ credentialId FK
  varchar_255_ dependencyId
  varchar_64_ dependencyType
  integer id
}
"public.credentials_entity" {
  timestamp_3__with_time_zone createdAt
  text data
  varchar_36_ id
  boolean isGlobal
  boolean isManaged
  boolean isResolvable
  varchar_128_ name
  boolean resolvableAllowFallback
  varchar_16_ resolverId FK
  varchar_128_ type
  timestamp_3__with_time_zone updatedAt
}
```

---

> Generated by [tbls](https://github.com/k1LoW/tbls)
