column api_keys.created_at timestamp with time zone
column api_keys.expiration timestamp with time zone
column api_keys.hash bytea
column api_keys.id bigint not null default nextval('api_keys_id_seq'::regclass)
column api_keys.last_seen timestamp with time zone
column api_keys.prefix text
column api_keys.user_id bigint
column database_versions.id bigint not null default nextval('database_versions_id_seq'::regclass)
column database_versions.updated_at timestamp with time zone
column database_versions.version text not null
column migrations.id character varying not null
column nodes.approved_routes text
column nodes.auth_key_id bigint
column nodes.created_at timestamp with time zone
column nodes.deleted_at timestamp with time zone
column nodes.disco_key text
column nodes.endpoints text
column nodes.expiry timestamp with time zone
column nodes.given_name character varying
column nodes.host_info text
column nodes.hostname text
column nodes.id bigint not null default nextval('nodes_id_seq'::regclass)
column nodes.ipv4 text
column nodes.ipv6 text
column nodes.last_seen timestamp with time zone
column nodes.machine_key text
column nodes.node_key text
column nodes.register_method text
column nodes.tags text
column nodes.updated_at timestamp with time zone
column nodes.user_id bigint
column policies.created_at timestamp with time zone
column policies.data text
column policies.deleted_at timestamp with time zone
column policies.id bigint not null default nextval('policies_id_seq'::regclass)
column policies.updated_at timestamp with time zone
column pre_auth_keys.created_at timestamp with time zone
column pre_auth_keys.ephemeral boolean default false
column pre_auth_keys.expiration timestamp with time zone
column pre_auth_keys.hash bytea
column pre_auth_keys.id bigint not null default nextval('pre_auth_keys_id_seq'::regclass)
column pre_auth_keys.key text
column pre_auth_keys.prefix text
column pre_auth_keys.reusable boolean
column pre_auth_keys.tags text
column pre_auth_keys.used boolean default false
column pre_auth_keys.user_id bigint
column users.created_at timestamp with time zone
column users.deleted_at timestamp with time zone
column users.display_name text
column users.email text
column users.id bigint not null default nextval('users_id_seq'::regclass)
column users.name text
column users.profile_pic_url text
column users.provider text
column users.provider_identifier text
column users.updated_at timestamp with time zone
constraint api_keys api_keys_pkey PRIMARY KEY (id)
constraint database_versions database_versions_pkey PRIMARY KEY (id)
constraint migrations migrations_pkey PRIMARY KEY (id)
constraint nodes fk_nodes_auth_key FOREIGN KEY (auth_key_id) REFERENCES pre_auth_keys(id)
constraint nodes fk_nodes_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
constraint nodes nodes_pkey PRIMARY KEY (id)
constraint policies policies_pkey PRIMARY KEY (id)
constraint pre_auth_keys fk_pre_auth_keys_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL
constraint pre_auth_keys pre_auth_keys_pkey PRIMARY KEY (id)
constraint users users_pkey PRIMARY KEY (id)
index CREATE INDEX idx_policies_deleted_at ON public.policies USING btree (deleted_at)
index CREATE INDEX idx_users_deleted_at ON public.users USING btree (deleted_at)
index CREATE UNIQUE INDEX api_keys_pkey ON public.api_keys USING btree (id)
index CREATE UNIQUE INDEX database_versions_pkey ON public.database_versions USING btree (id)
index CREATE UNIQUE INDEX idx_api_keys_prefix ON public.api_keys USING btree (prefix)
index CREATE UNIQUE INDEX idx_name_no_provider_identifier ON public.users USING btree (name) WHERE (provider_identifier IS NULL)
index CREATE UNIQUE INDEX idx_name_provider_identifier ON public.users USING btree (name, provider_identifier)
index CREATE UNIQUE INDEX idx_pre_auth_keys_prefix ON public.pre_auth_keys USING btree (prefix) WHERE ((prefix IS NOT NULL) AND (prefix <> ''::text))
index CREATE UNIQUE INDEX idx_provider_identifier ON public.users USING btree (provider_identifier) WHERE (provider_identifier IS NOT NULL)
index CREATE UNIQUE INDEX migrations_pkey ON public.migrations USING btree (id)
index CREATE UNIQUE INDEX nodes_pkey ON public.nodes USING btree (id)
index CREATE UNIQUE INDEX policies_pkey ON public.policies USING btree (id)
index CREATE UNIQUE INDEX pre_auth_keys_pkey ON public.pre_auth_keys USING btree (id)
index CREATE UNIQUE INDEX users_pkey ON public.users USING btree (id)
