commit 3a31364c0f3ec5c91ac06ef20844f82e50ac637a
parent 0c8bf3282d296a2e73d393cebeac780e07e40526
Author: Martin Ashby <martin@ashbysoft.com>
Date: Sat, 7 Nov 2026 11:16:17 +0000
tweaks to schema
Diffstat:
| M | main.go | | | 3 | ++- |
| M | schema.sql | | | 2341 | ++++++++++++++++++++++++++++++++++++++++--------------------------------------- |
2 files changed, 1187 insertions(+), 1157 deletions(-)
diff --git a/main.go b/main.go
@@ -129,10 +129,11 @@ type MyServer struct{
// Login implements [ServerInterface].
func (m *MyServer) Login(w http.ResponseWriter, r *http.Request) {
- /*lrb*/_, err := doReadJsonRequestOrSendErr(w, r, &LoginJSONRequestBody{})
+ _, err := doReadJsonRequestOrSendErr(w, r, &LoginJSONRequestBody{})
if err != nil {
return
}
+
// TODO comment back in auth check
// if lrb.Email == email && lrb.Password == "P@55word" {
diff --git a/schema.sql b/schema.sql
@@ -121,32 +121,32 @@
--
-- ENuM not supported in sqlite
--- CREATE TYPE public.album_user_role_enum AS ENUM (
+-- CREATE TYPE album_user_role_enum AS ENUM (
-- 'owner',
-- 'editor',
-- 'viewer'
-- );
--- ALTER TYPE public.album_user_role_enum OWNER TO postgres;
+-- ALTER TYPE album_user_role_enum OWNER TO postgres;
--
-- Name: asset_checksum_algorithm_enum; Type: TYPE; Schema: public; Owner: postgres
--
--- CREATE TYPE public.asset_checksum_algorithm_enum AS ENUM (
+-- CREATE TYPE asset_checksum_algorithm_enum AS ENUM (
-- 'sha1',
-- 'sha1-path'
-- );
--- ALTER TYPE public.asset_checksum_algorithm_enum OWNER TO postgres;
+-- ALTER TYPE asset_checksum_algorithm_enum OWNER TO postgres;
--
-- Name: asset_visibility_enum; Type: TYPE; Schema: public; Owner: postgres
--
--- CREATE TYPE public.asset_visibility_enum AS ENUM (
+-- CREATE TYPE asset_visibility_enum AS ENUM (
-- 'archive',
-- 'timeline',
-- 'hidden',
@@ -154,52 +154,52 @@
-- );
--- ALTER TYPE public.asset_visibility_enum OWNER TO postgres;
+-- ALTER TYPE asset_visibility_enum OWNER TO postgres;
--
-- Name: assets_status_enum; Type: TYPE; Schema: public; Owner: postgres
--
--- CREATE TYPE public.assets_status_enum AS ENUM (
+-- CREATE TYPE assets_status_enum AS ENUM (
-- 'active',
-- 'trashed',
-- 'deleted'
-- );
--- ALTER TYPE public.assets_status_enum OWNER TO postgres;
+-- ALTER TYPE assets_status_enum OWNER TO postgres;
--
-- Name: sourcetype; Type: TYPE; Schema: public; Owner: postgres
--
--- CREATE TYPE public.sourcetype AS ENUM (
+-- CREATE TYPE sourcetype AS ENUM (
-- 'machine-learning',
-- 'exif',
-- 'manual'
-- );
--- ALTER TYPE public.sourcetype OWNER TO postgres;
+-- ALTER TYPE sourcetype OWNER TO postgres;
--
-- Name: video_stream_variant_codec_enum; Type: TYPE; Schema: public; Owner: postgres
--
--- CREATE TYPE public.video_stream_variant_codec_enum AS ENUM (
+-- CREATE TYPE video_stream_variant_codec_enum AS ENUM (
-- 'av1',
-- 'hevc',
-- 'h264'
-- );
--- ALTER TYPE public.video_stream_variant_codec_enum OWNER TO postgres;
+-- ALTER TYPE video_stream_variant_codec_enum OWNER TO postgres;
--
-- Name: album_asset_delete_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.album_asset_delete_audit() RETURNS trigger
+-- CREATE FUNCTION album_asset_delete_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -211,17 +211,17 @@
-- $$;
--- ALTER FUNCTION public.album_asset_delete_audit() OWNER TO postgres;
+-- ALTER FUNCTION album_asset_delete_audit() OWNER TO postgres;
--
-- Name: album_user_after_insert(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.album_user_after_insert() RETURNS trigger
+-- CREATE FUNCTION album_user_after_insert() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
--- UPDATE album SET "updatedAt" = clock_timestamp(), "updateId" = immich_uuid_v7(clock_timestamp())
+-- UPDATE album SET "updatedAt" = current_timestamp, "updateId" = immich_uuid_v7(current_timestamp)
-- WHERE "id" IN (SELECT "albumId" FROM inserted_rows)
-- AND NOT EXISTS (SELECT FROM inserted_rows WHERE role = 'owner');
-- RETURN NULL;
@@ -229,13 +229,13 @@
-- $$;
--- ALTER FUNCTION public.album_user_after_insert() OWNER TO postgres;
+-- ALTER FUNCTION album_user_after_insert() OWNER TO postgres;
--
-- Name: album_user_delete(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.album_user_delete() RETURNS trigger
+-- CREATE FUNCTION album_user_delete() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -248,13 +248,13 @@
-- $$;
--- ALTER FUNCTION public.album_user_delete() OWNER TO postgres;
+-- ALTER FUNCTION album_user_delete() OWNER TO postgres;
--
-- Name: album_user_delete_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.album_user_delete_audit() RETURNS trigger
+-- CREATE FUNCTION album_user_delete_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -273,13 +273,13 @@
-- $$;
--- ALTER FUNCTION public.album_user_delete_audit() OWNER TO postgres;
+-- ALTER FUNCTION album_user_delete_audit() OWNER TO postgres;
--
-- Name: asset_delete_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.asset_delete_audit() RETURNS trigger
+-- CREATE FUNCTION asset_delete_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -291,13 +291,13 @@
-- $$;
--- ALTER FUNCTION public.asset_delete_audit() OWNER TO postgres;
+-- ALTER FUNCTION asset_delete_audit() OWNER TO postgres;
--
-- Name: asset_edit_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.asset_edit_audit() RETURNS trigger
+-- CREATE FUNCTION asset_edit_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -309,13 +309,13 @@
-- $$;
--- ALTER FUNCTION public.asset_edit_audit() OWNER TO postgres;
+-- ALTER FUNCTION asset_edit_audit() OWNER TO postgres;
--
-- Name: asset_edit_delete(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.asset_edit_delete() RETURNS trigger
+-- CREATE FUNCTION asset_edit_delete() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -329,13 +329,13 @@
-- $$;
--- ALTER FUNCTION public.asset_edit_delete() OWNER TO postgres;
+-- ALTER FUNCTION asset_edit_delete() OWNER TO postgres;
--
-- Name: asset_edit_insert(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.asset_edit_insert() RETURNS trigger
+-- CREATE FUNCTION asset_edit_insert() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -348,13 +348,13 @@
-- $$;
--- ALTER FUNCTION public.asset_edit_insert() OWNER TO postgres;
+-- ALTER FUNCTION asset_edit_insert() OWNER TO postgres;
--
-- Name: asset_face_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.asset_face_audit() RETURNS trigger
+-- CREATE FUNCTION asset_face_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -366,13 +366,13 @@
-- $$;
--- ALTER FUNCTION public.asset_face_audit() OWNER TO postgres;
+-- ALTER FUNCTION asset_face_audit() OWNER TO postgres;
--
-- Name: asset_metadata_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.asset_metadata_audit() RETURNS trigger
+-- CREATE FUNCTION asset_metadata_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -384,13 +384,13 @@
-- $$;
--- ALTER FUNCTION public.asset_metadata_audit() OWNER TO postgres;
+-- ALTER FUNCTION asset_metadata_audit() OWNER TO postgres;
--
-- Name: asset_ocr_delete_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.asset_ocr_delete_audit() RETURNS trigger
+-- CREATE FUNCTION asset_ocr_delete_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -402,35 +402,35 @@
-- $$;
--- ALTER FUNCTION public.asset_ocr_delete_audit() OWNER TO postgres;
+-- ALTER FUNCTION asset_ocr_delete_audit() OWNER TO postgres;
--
-- Name: f_concat_ws(text, text[]); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.f_concat_ws(text, text[]) RETURNS text
+-- CREATE FUNCTION f_concat_ws(text, text[]) RETURNS text
-- LANGUAGE sql IMMUTABLE PARALLEL SAFE
-- AS $_$SELECT array_to_string($2, $1)$_$;
--- ALTER FUNCTION public.f_concat_ws(text, text[]) OWNER TO postgres;
+-- ALTER FUNCTION f_concat_ws(text, text[]) OWNER TO postgres;
--
-- Name: f_unaccent(text); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.f_unaccent(text) RETURNS text
+-- CREATE FUNCTION f_unaccent(text) RETURNS text
-- LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE
--- RETURN public.unaccent('public.unaccent'::regdictionary, $1);
+-- RETURN unaccent('public.unaccent'::regdictionary, $1);
--- ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres;
+-- ALTER FUNCTION f_unaccent(text) OWNER TO postgres;
--
--- Name: immich_uuid_v7(timestamp with time zone); Type: FUNCTION; Schema: public; Owner: postgres
+-- Name: immich_uuid_v7(text); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.immich_uuid_v7(p_timestamp timestamp with time zone DEFAULT clock_timestamp()) RETURNS uuid
+-- CREATE FUNCTION immich_uuid_v7(p_timestamp text DEFAULT current_timestamp) RETURNS uuid
-- LANGUAGE sql
-- AS $$
-- select encode(
@@ -448,26 +448,26 @@
-- $$;
--- ALTER FUNCTION public.immich_uuid_v7(p_timestamp timestamp with time zone) OWNER TO postgres;
+-- ALTER FUNCTION immich_uuid_v7(p_timestamp text) OWNER TO postgres;
--
--- Name: ll_to_earth_public(double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
+-- Name: ll_to_earth_public(real, real); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.ll_to_earth_public(latitude double precision, longitude double precision) RETURNS public.earth
+-- CREATE FUNCTION ll_to_earth_public(latitude real, longitude real) RETURNS earth
-- LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE
-- AS $$
--- SELECT public.cube(public.cube(public.cube(public.earth()*cos(radians(latitude))*cos(radians(longitude))),public.earth()*cos(radians(latitude))*sin(radians(longitude))),public.earth()*sin(radians(latitude)))::public.earth
+-- SELECT cube(public.cube(public.cube(public.earth()*cos(radians(latitude))*cos(radians(longitude))),public.earth()*cos(radians(latitude))*sin(radians(longitude))),public.earth()*sin(radians(latitude)))::public.earth
-- $$;
--- ALTER FUNCTION public.ll_to_earth_public(latitude double precision, longitude double precision) OWNER TO postgres;
+-- ALTER FUNCTION ll_to_earth_public(latitude real, longitude real) OWNER TO postgres;
--
-- Name: memory_asset_delete_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.memory_asset_delete_audit() RETURNS trigger
+-- CREATE FUNCTION memory_asset_delete_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -479,13 +479,13 @@
-- $$;
--- ALTER FUNCTION public.memory_asset_delete_audit() OWNER TO postgres;
+-- ALTER FUNCTION memory_asset_delete_audit() OWNER TO postgres;
--
-- Name: memory_delete_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.memory_delete_audit() RETURNS trigger
+-- CREATE FUNCTION memory_delete_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -497,13 +497,13 @@
-- $$;
--- ALTER FUNCTION public.memory_delete_audit() OWNER TO postgres;
+-- ALTER FUNCTION memory_delete_audit() OWNER TO postgres;
--
-- Name: partner_delete_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.partner_delete_audit() RETURNS trigger
+-- CREATE FUNCTION partner_delete_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -515,13 +515,13 @@
-- $$;
--- ALTER FUNCTION public.partner_delete_audit() OWNER TO postgres;
+-- ALTER FUNCTION partner_delete_audit() OWNER TO postgres;
--
-- Name: person_delete_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.person_delete_audit() RETURNS trigger
+-- CREATE FUNCTION person_delete_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -533,13 +533,13 @@
-- $$;
--- ALTER FUNCTION public.person_delete_audit() OWNER TO postgres;
+-- ALTER FUNCTION person_delete_audit() OWNER TO postgres;
--
-- Name: person_group_delete_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.person_group_delete_audit() RETURNS trigger
+-- CREATE FUNCTION person_group_delete_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -551,13 +551,13 @@
-- $$;
--- ALTER FUNCTION public.person_group_delete_audit() OWNER TO postgres;
+-- ALTER FUNCTION person_group_delete_audit() OWNER TO postgres;
--
-- Name: stack_delete_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.stack_delete_audit() RETURNS trigger
+-- CREATE FUNCTION stack_delete_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -569,17 +569,17 @@
-- $$;
--- ALTER FUNCTION public.stack_delete_audit() OWNER TO postgres;
+-- ALTER FUNCTION stack_delete_audit() OWNER TO postgres;
--
-- Name: updated_at(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.updated_at() RETURNS trigger
+-- CREATE FUNCTION updated_at() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- DECLARE
--- clock_timestamp TIMESTAMP := clock_timestamp();
+-- clock_timestamp TIMESTAMP := current_timestamp;
-- BEGIN
-- new."updatedAt" = clock_timestamp;
-- new."updateId" = immich_uuid_v7(clock_timestamp);
@@ -588,13 +588,13 @@
-- $$;
--- ALTER FUNCTION public.updated_at() OWNER TO postgres;
+-- ALTER FUNCTION updated_at() OWNER TO postgres;
--
-- Name: user_delete_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.user_delete_audit() RETURNS trigger
+-- CREATE FUNCTION user_delete_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -606,13 +606,13 @@
-- $$;
--- ALTER FUNCTION public.user_delete_audit() OWNER TO postgres;
+-- ALTER FUNCTION user_delete_audit() OWNER TO postgres;
--
-- Name: user_metadata_audit(); Type: FUNCTION; Schema: public; Owner: postgres
--
--- CREATE FUNCTION public.user_metadata_audit() RETURNS trigger
+-- CREATE FUNCTION user_metadata_audit() RETURNS trigger
-- LANGUAGE plpgsql
-- AS $$
-- BEGIN
@@ -624,7 +624,7 @@
-- $$;
--- ALTER FUNCTION public.user_metadata_audit() OWNER TO postgres;
+-- ALTER FUNCTION user_metadata_audit() OWNER TO postgres;
-- SET default_tablespace = '';
@@ -635,40 +635,40 @@
--
CREATE TABLE activity (
- id uuid NOT NULL, -- DEFAULT uuid_generate_v4()
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "albumId" uuid NOT NULL,
- "userId" uuid NOT NULL,
- "assetId" uuid,
+ id text NOT NULL, --
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "albumId" text NOT NULL,
+ "userId" text NOT NULL,
+ "assetId" text,
comment text,
- "isLiked" boolean DEFAULT false NOT NULL,
- "updateId" uuid NOT NULL, -- DEFAULT immich_uuid_v7()
+ "isLiked" int DEFAULT false NOT NULL,
+ "updateId" text NOT NULL, --
CONSTRAINT activity_like_check CHECK ((((comment IS NULL) AND ("isLiked" = true)) OR ((comment IS NOT NULL) AND ("isLiked" = false))))
-);
+) STRICT;
--- ALTER TABLE public.activity OWNER TO postgres;
+-- -- ALTER TABLE activity OWNER TO postgres;
--
-- Name: album; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE album (
- id uuid NOT NULL, --DEFAULT public.uuid_generate_v4()
+ id text NOT NULL, --
"albumName" text DEFAULT 'Untitled Album' NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "albumThumbnailAssetId" uuid,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "albumThumbnailAssetId" text,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
description text,
- "deletedAt" timestamp with time zone,
- "isActivityEnabled" boolean DEFAULT true NOT NULL,
+ "deletedAt" text,
+ "isActivityEnabled" int DEFAULT true NOT NULL,
"order" text DEFAULT 'desc' NOT NULL,
- "updateId" uuid NOT NULL -- DEFAULT public.immich_uuid_v7()
-);
+ "updateId" text NOT NULL -- DEFAULT immich_uuid_v7()
+) STRICT;
--- ALTER TABLE public.album OWNER TO postgres;
+-- -- ALTER TABLE album OWNER TO postgres;
--
-- Name: COLUMN album."albumThumbnailAssetId"; Type: COMMENT; Schema: public; Owner: postgres
@@ -682,75 +682,75 @@ CREATE TABLE album (
--
CREATE TABLE album_asset (
- "albumId" uuid NOT NULL,
- "assetId" uuid NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updateId" uuid NOT NULL -- DEFAULT public.immich_uuid_v7()
-);
+ "albumId" text NOT NULL,
+ "assetId" text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "updateId" text NOT NULL -- DEFAULT immich_uuid_v7()
+) STRICT;
--- ALTER TABLE public.album_asset OWNER TO postgres;
+-- -- ALTER TABLE album_asset OWNER TO postgres;
--
-- Name: album_asset_audit; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE album_asset_audit (
- id uuid NOT NULL, -- DEFAULT public.immich_uuid_v7()
- "albumId" uuid NOT NULL,
- "assetId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL
-);
+ id text NOT NULL, --
+ "albumId" text NOT NULL,
+ "assetId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
--- ALTER TABLE public.album_asset_audit OWNER TO postgres;
+-- -- ALTER TABLE album_asset_audit OWNER TO postgres;
--
-- Name: album_audit; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE album_audit (
- id uuid NOT NULL, -- DEFAULT immich_uuid_v7()
- "albumId" uuid NOT NULL,
- "userId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL
-);
+ id text NOT NULL, -- DEFAULT immich_uuid_v7()
+ "albumId" text NOT NULL,
+ "userId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
--- ALTER TABLE public.album_audit OWNER TO postgres;
+-- -- ALTER TABLE album_audit OWNER TO postgres;
--
-- Name: album_user; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE album_user (
- "albumId" uuid NOT NULL,
- "userId" uuid NOT NULL,
+ "albumId" text NOT NULL,
+ "userId" text NOT NULL,
role text DEFAULT 'editor' NOT NULL,
- "updateId" uuid NOT NULL, -- DEFAULT public.immich_uuid_v7()
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "createId" uuid NOT NULL, -- DEFAULT public.immich_uuid_v7()
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
+ "updateId" text NOT NULL, --
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "createId" text NOT NULL, -- DEFAULT immich_uuid_v7()
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
CONSTRAINT role_check CHECK (role = "editor" OR role = "owner" OR role = "viewer")
-);
+) STRICT;
--- ALTER TABLE public.album_user OWNER TO postgres;
+-- -- ALTER TABLE album_user OWNER TO postgres;
--
-- Name: album_user_audit; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE album_user_audit (
- id uuid NOT NULL, -- DEFAULT public.immich_uuid_v7()
- "albumId" uuid NOT NULL,
- "userId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL
-);
+ id text NOT NULL, --
+ "albumId" text NOT NULL,
+ "userId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
--- ALTER TABLE public.album_user_audit OWNER TO postgres;
+-- -- ALTER TABLE album_user_audit OWNER TO postgres;
--
-- Name: api_key; Type: TABLE; Schema: public; Owner: postgres
@@ -758,285 +758,314 @@ CREATE TABLE album_user_audit (
CREATE TABLE api_key (
name text NOT NULL,
- key bytea NOT NULL,
- "userId" uuid NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- permissions character varying[] NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL
-);
+ key blob NOT NULL,
+ "userId" text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ id text NOT NULL, --
+ permissions text NOT NULL,
+ "updateId" text NOT NULL -- DEFAULT immich_uuid_v7()
+) STRICT;
-ALTER TABLE public.api_key OWNER TO postgres;
+-- -- ALTER TABLE api_key OWNER TO postgres;
--
-- Name: asset; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "ownerId" uuid NOT NULL,
- type character varying NOT NULL,
- "originalPath" character varying NOT NULL,
- "fileCreatedAt" timestamp with time zone NOT NULL,
- "fileModifiedAt" timestamp with time zone NOT NULL,
- "isFavorite" boolean DEFAULT false NOT NULL,
- duration integer,
- checksum bytea NOT NULL,
- "livePhotoVideoId" uuid,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "originalFileName" character varying NOT NULL,
- thumbhash bytea,
- "isOffline" boolean DEFAULT false NOT NULL,
- "libraryId" uuid,
- "isExternal" boolean DEFAULT false NOT NULL,
- "deletedAt" timestamp with time zone,
- "localDateTime" timestamp with time zone NOT NULL,
- "stackId" uuid,
- "duplicateId" uuid,
- status public.assets_status_enum DEFAULT 'active'::public.assets_status_enum NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- visibility public.asset_visibility_enum DEFAULT 'timeline'::public.asset_visibility_enum NOT NULL,
- width integer,
- height integer,
- "isEdited" boolean DEFAULT false NOT NULL,
- "checksumAlgorithm" public.asset_checksum_algorithm_enum NOT NULL
-);
-
-
-ALTER TABLE public.asset OWNER TO postgres;
+CREATE TABLE asset (
+ id text NOT NULL,
+ "ownerId" text NOT NULL,
+ type text NOT NULL,
+ "originalPath" text NOT NULL,
+ "fileCreatedAt" text NOT NULL,
+ "fileModifiedAt" text NOT NULL,
+ "isFavorite" int DEFAULT false NOT NULL,
+ duration int,
+ checksum blob NOT NULL,
+ "livePhotoVideoId" text,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "originalFileName" text NOT NULL,
+ thumbhash blob,
+ "isOffline" int DEFAULT false NOT NULL,
+ "libraryId" text,
+ "isExternal" int DEFAULT false NOT NULL,
+ "deletedAt" text,
+ "localDateTime" text NOT NULL,
+ "stackId" text,
+ "duplicateId" text,
+ status text DEFAULT 'active' NOT NULL,
+ "updateId" text NOT NULL,
+ visibility text DEFAULT 'timeline' NOT NULL,
+ width int,
+ height int,
+ "isEdited" int DEFAULT false NOT NULL,
+ "checksumAlgorithm" text NOT NULL,
+ CONSTRAINT status_check CHECK (status = 'active' OR status = 'trashed' OR status = 'deleted'),
+ CONSTRAINT visibility_check CHECK (visibility = 'archive' OR visibility = 'timeline' OR visibility = 'hidden' OR visibility = 'locked'),
+ CONSTRAINT "checksumAlgorithm_check" CHECK ("checksumAlgorithm" = 'sha1' OR "checksumAlgorithm" = 'sha1-path')
+) STRICT;
+
+
+-- -- ALTER TABLE asset OWNER TO postgres;
--
-- Name: asset_audio; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_audio (
- "assetId" uuid NOT NULL,
+CREATE TABLE asset_audio (
+ "assetId" text NOT NULL,
bitrate integer NOT NULL,
- index smallint NOT NULL,
- profile smallint,
+ "index" int NOT NULL,
+ profile int,
"codecName" text NOT NULL
-);
+) STRICT;
-ALTER TABLE public.asset_audio OWNER TO postgres;
+-- -- ALTER TABLE asset_audio OWNER TO postgres;
--
-- Name: asset_audit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_audit (
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "assetId" uuid NOT NULL,
- "ownerId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL
-);
+CREATE TABLE asset_audit (
+ id text NOT NULl,
+ "assetId" text NOT NULL,
+ "ownerId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.asset_audit OWNER TO postgres;
+-- -- ALTER TABLE asset_audit OWNER TO postgres;
--
-- Name: asset_edit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_edit (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "assetId" uuid NOT NULL,
- action character varying NOT NULL,
- parameters jsonb NOT NULL,
+CREATE TABLE asset_edit (
+ id text NOT NULL,
+ "assetId" text NOT NULL,
+ action text NOT NULL,
+ parameters text NOT NULL,
sequence integer NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL
-);
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "updateId" text NOT NULL
+) STRICT;
-ALTER TABLE public.asset_edit OWNER TO postgres;
+-- -- ALTER TABLE asset_edit OWNER TO postgres;
--
-- Name: asset_edit_audit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_edit_audit (
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "editId" uuid NOT NULL,
- "assetId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL
-);
+CREATE TABLE asset_edit_audit (
+ id text NOT NULl,
+ "editId" text NOT NULL,
+ "assetId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.asset_edit_audit OWNER TO postgres;
+-- -- ALTER TABLE asset_edit_audit OWNER TO postgres;
--
-- Name: asset_exif; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_exif (
- "assetId" uuid NOT NULL,
- make character varying,
- model character varying,
- "exifImageWidth" integer,
- "exifImageHeight" integer,
- "fileSizeInByte" bigint,
- orientation character varying,
- "dateTimeOriginal" timestamp with time zone,
- "modifyDate" timestamp with time zone,
- "lensModel" character varying,
- "fNumber" double precision,
- "focalLength" double precision,
- iso integer,
- latitude double precision,
- longitude double precision,
- city character varying,
- state character varying,
- country character varying,
- description text DEFAULT ''::text NOT NULL,
- fps double precision,
- "exposureTime" character varying,
- "livePhotoCID" character varying,
- "timeZone" character varying,
- "projectionType" character varying,
- "profileDescription" character varying,
- colorspace character varying,
- "bitsPerSample" integer,
- "autoStackId" character varying,
- rating integer,
- "updatedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "lockedProperties" character varying[],
- tags character varying[]
-);
-
-
-ALTER TABLE public.asset_exif OWNER TO postgres;
+CREATE TABLE asset_exif (
+ "assetId" text NOT NULL,
+ make text,
+ model text,
+ "exifImageWidth" int,
+ "exifImageHeight" int,
+ "fileSizeInByte" int,
+ orientation text,
+ "dateTimeOriginal" text,
+ "modifyDate" text,
+ "lensModel" text,
+ "fNumber" real,
+ "focalLength" real,
+ iso int,
+ latitude real,
+ longitude real,
+ city text,
+ state text,
+ country text,
+ description text DEFAULT '' NOT NULL,
+ fps real,
+ "exposureTime" text,
+ "livePhotoCID" text,
+ "timeZone" text,
+ "projectionType" text,
+ "profileDescription" text,
+ colorspace text,
+ "bitsPerSample" int,
+ "autoStackId" text,
+ rating int,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "updateId" text NOT NULl
+ -- "lockedProperties" character varying[], -- new table asset_exif_locked_property
+ --tags character varying[] -- new table asset_exif_tag
+) STRICT;
+
+CREATE TABLE asset_exif_locked_property (
+ "assetId" text not null REFERENCES asset_exif("assetId") ON DELETE CASCADE,
+ property text NOT NULL
+) STRICT;
+
+CREATE TABLE asset_exif_tag (
+ "assetId" text not null REFERENCES asset_exif("assetId") ON DELETE CASCADE,
+ tag text NOT NULL
+) STRICT;
+
+
+-- ALTER TABLE asset_exif OWNER TO postgres;
--
-- Name: asset_face; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_face (
- "assetId" uuid NOT NULL,
- "personGroupId" uuid,
+CREATE TABLE asset_face (
+ "assetId" text NOT NULL,
+ "personGroupId" text,
"imageWidth" integer DEFAULT 0 NOT NULL,
"imageHeight" integer DEFAULT 0 NOT NULL,
"boundingBoxX1" integer DEFAULT 0 NOT NULL,
"boundingBoxY1" integer DEFAULT 0 NOT NULL,
"boundingBoxX2" integer DEFAULT 0 NOT NULL,
"boundingBoxY2" integer DEFAULT 0 NOT NULL,
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "sourceType" public.sourcetype DEFAULT 'machine-learning'::public.sourcetype NOT NULL,
- "deletedAt" timestamp with time zone,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "isVisible" boolean DEFAULT true NOT NULL
-);
+ id text NOT NULL,
+ "sourceType" text DEFAULT 'machine-learning' NOT NULL,
+ "deletedAt" text,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "updateId" text NOT NULl,
+ "isVisible" int DEFAULT true NOT NULL,
+ CONSTRAINT "sourceType_check" CHECK ("sourceType" = 'machine-learning' OR "sourceType" = 'exif' OR "sourceType" = 'manual')
+) STRICT;
-ALTER TABLE public.asset_face OWNER TO postgres;
+-- ALTER TABLE asset_face OWNER TO postgres;
--
-- Name: asset_face_audit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_face_audit (
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "assetFaceId" uuid NOT NULL,
- "assetId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL
-);
+CREATE TABLE asset_face_audit (
+ id text NOT NULl,
+ "assetFaceId" text NOT NULL,
+ "assetId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.asset_face_audit OWNER TO postgres;
+-- ALTER TABLE asset_face_audit OWNER TO postgres;
--
-- Name: asset_file; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_file (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "assetId" uuid NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- type character varying NOT NULL,
- path character varying NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "isEdited" boolean DEFAULT false NOT NULL,
- "isProgressive" boolean DEFAULT false NOT NULL,
- "isTransparent" boolean DEFAULT false NOT NULL
-);
+CREATE TABLE asset_file (
+ id text NOT NULL,
+ "assetId" text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ type text NOT NULL,
+ path text NOT NULL,
+ "updateId" text NOT NULl,
+ "isEdited" int DEFAULT false NOT NULL,
+ "isProgressive" int DEFAULT false NOT NULL,
+ "isTransparent" int DEFAULT false NOT NULL
+) STRICT;
-ALTER TABLE public.asset_file OWNER TO postgres;
+-- ALTER TABLE asset_file OWNER TO postgres;
--
-- Name: asset_job_status; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_job_status (
- "assetId" uuid NOT NULL,
- "facesRecognizedAt" timestamp with time zone,
- "metadataExtractedAt" timestamp with time zone,
- "duplicatesDetectedAt" timestamp with time zone,
- "ocrAt" timestamp with time zone
-);
+CREATE TABLE asset_job_status (
+ "assetId" text NOT NULL,
+ "facesRecognizedAt" text,
+ "metadataExtractedAt" text,
+ "duplicatesDetectedAt" text,
+ "ocrAt" text
+) STRICT;
-ALTER TABLE public.asset_job_status OWNER TO postgres;
+-- ALTER TABLE asset_job_status OWNER TO postgres;
--
-- Name: asset_keyframe; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_keyframe (
- "assetId" uuid NOT NULL,
- pts integer[] NOT NULL,
- "accDuration" integer[] NOT NULL,
- "ownDuration" integer[] NOT NULL,
+CREATE TABLE asset_keyframe (
+ "assetId" text NOT NULL,
+ -- pts integer[] NOT NULL, -- new table
+ -- "accDuration" integer[] NOT NULL,
+ -- "ownDuration" integer[] NOT NULL,
"totalDuration" integer NOT NULL,
"packetCount" integer NOT NULL,
"outputFrames" integer NOT NULL
-);
-
-
-ALTER TABLE public.asset_keyframe OWNER TO postgres;
+) STRICT;
+
+CREATE TABLE asset_keyframe_pt (
+ "assetId" text NOT NULL REFERENCES asset_keyframe("assetId") ON DELETE CASCADE,
+ pt int NOT NULL,
+ ordinal int NOT NULL
+) STRICT;
+CREATE TABLE "asset_keyframe_accDuration" (
+ "assetId" text NOT NULL REFERENCES asset_keyframe("assetId") ON DELETE CASCADE,
+ "accDuration" int NOT NULL,
+ ordinal int NOT NULL
+) STRICT;
+CREATE TABLE "asset_keyframe_ownDuration" (
+ "assetId" text NOT NULL REFERENCES asset_keyframe("assetId") ON DELETE CASCADE,
+ "ownDuration" int NOT NULL,
+ ordinal int NOT NULL
+) STRICT;
+
+-- ALTER TABLE asset_keyframe OWNER TO postgres;
--
-- Name: asset_metadata; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_metadata (
- "assetId" uuid NOT NULL,
- key character varying NOT NULL,
- value jsonb NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL
-);
+CREATE TABLE asset_metadata (
+ "assetId" text NOT NULL,
+ key text NOT NULL,
+ value text NOT NULL,
+ "updateId" text NOT NULl,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.asset_metadata OWNER TO postgres;
+-- ALTER TABLE asset_metadata OWNER TO postgres;
--
-- Name: asset_metadata_audit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_metadata_audit (
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "assetId" uuid NOT NULL,
- key character varying NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL
-);
+CREATE TABLE asset_metadata_audit (
+ id text NOT NULl,
+ "assetId" text NOT NULL,
+ key text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.asset_metadata_audit OWNER TO postgres;
+-- ALTER TABLE asset_metadata_audit OWNER TO postgres;
--
-- Name: asset_ocr; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_ocr (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "assetId" uuid NOT NULL,
+CREATE TABLE asset_ocr (
+ id text NOT NULL,
+ "assetId" text NOT NULL,
x1 real NOT NULL,
y1 real NOT NULL,
x2 real NOT NULL,
@@ -1048,830 +1077,830 @@ CREATE TABLE public.asset_ocr (
"boxScore" real NOT NULL,
"textScore" real NOT NULL,
text text NOT NULL,
- "isVisible" boolean DEFAULT true NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL
-);
+ "isVisible" int DEFAULT true NOT NULL,
+ "updateId" text NOT NULl,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.asset_ocr OWNER TO postgres;
+-- ALTER TABLE asset_ocr OWNER TO postgres;
--
-- Name: asset_ocr_audit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_ocr_audit (
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "assetId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL
-);
+CREATE TABLE asset_ocr_audit (
+ id text NOT NULl,
+ "assetId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.asset_ocr_audit OWNER TO postgres;
+-- ALTER TABLE asset_ocr_audit OWNER TO postgres;
--
-- Name: asset_video; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.asset_video (
- "assetId" uuid NOT NULL,
+CREATE TABLE asset_video (
+ "assetId" text NOT NULL,
bitrate integer NOT NULL,
"frameCount" integer NOT NULL,
"timeBase" integer NOT NULL,
- index smallint NOT NULL,
- profile smallint,
- level smallint,
- "colorPrimaries" smallint NOT NULL,
- "colorTransfer" smallint NOT NULL,
- "colorMatrix" smallint NOT NULL,
- "dvProfile" smallint,
- "dvLevel" smallint,
- "dvBlSignalCompatibilityId" smallint,
+ "index" int NOT NULL,
+ profile int,
+ level int,
+ "colorPrimaries" int NOT NULL,
+ "colorTransfer" int NOT NULL,
+ "colorMatrix" int NOT NULL,
+ "dvProfile" int,
+ "dvLevel" int,
+ "dvBlSignalCompatibilityId" int,
"codecName" text NOT NULL,
"formatName" text NOT NULL,
"formatLongName" text NOT NULL,
"pixelFormat" text NOT NULL
-);
+) STRICT;
-ALTER TABLE public.asset_video OWNER TO postgres;
+-- ALTER TABLE asset_video OWNER TO postgres;
--
-- Name: cluster_group; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.cluster_group (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- name character varying,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL
-);
+CREATE TABLE cluster_group (
+ id text NOT NULL,
+ name text,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "updateId" text NOT NULL
+) STRICT;
-ALTER TABLE public.cluster_group OWNER TO postgres;
+-- ALTER TABLE cluster_group OWNER TO postgres;
--
-- Name: cluster_group_request; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.cluster_group_request (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "clusterGroupId" uuid NOT NULL,
- "userId" uuid NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL
-);
+CREATE TABLE cluster_group_request (
+ id text NOT NULL,
+ "clusterGroupId" text NOT NULL,
+ "userId" text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.cluster_group_request OWNER TO postgres;
+-- -- ALTER TABLE cluster_group_request OWNER TO postgres;
--
-- Name: face_search; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.face_search (
- "faceId" uuid NOT NULL,
- embedding public.vector(512) NOT NULL
-);
+CREATE TABLE face_search (
+ "faceId" text NOT NULL,
+ embedding vector(512) NOT NULL
+) STRICT;
-ALTER TABLE public.face_search OWNER TO postgres;
+-- -- ALTER TABLE face_search OWNER TO postgres;
--
-- Name: geodata_places; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.geodata_places (
+CREATE TABLE geodata_places (
id integer NOT NULL,
name character varying(200) NOT NULL,
- longitude double precision NOT NULL,
- latitude double precision NOT NULL,
+ longitude real NOT NULL,
+ latitude real NOT NULL,
"countryCode" character(2) NOT NULL,
"admin1Code" character varying(20),
"admin2Code" character varying(80),
"modificationDate" date NOT NULL,
- "admin1Name" character varying,
- "admin2Name" character varying,
+ "admin1Name" text,
+ "admin2Name" text,
"alternateNames" character varying
-);
+) STRICT;
-ALTER TABLE public.geodata_places OWNER TO postgres;
+-- ALTER TABLE geodata_places OWNER TO postgres;
--
-- Name: integrity_report; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.integrity_report (
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- type character varying NOT NULL,
- path character varying NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "assetId" uuid,
+CREATE TABLE integrity_report (
+ id text NOT NULl,
+ type text NOT NULL,
+ path text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "assetId" text,
"fileAssetId" uuid
-);
+) STRICT;
-ALTER TABLE public.integrity_report OWNER TO postgres;
+-- ALTER TABLE integrity_report OWNER TO postgres;
--
-- Name: kysely_migrations; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.kysely_migrations (
+CREATE TABLE kysely_migrations (
name character varying(255) NOT NULL,
"timestamp" character varying(255) NOT NULL
-);
+) STRICT;
-ALTER TABLE public.kysely_migrations OWNER TO postgres;
+-- ALTER TABLE kysely_migrations OWNER TO postgres;
--
-- Name: kysely_migrations_lock; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.kysely_migrations_lock (
+CREATE TABLE kysely_migrations_lock (
id character varying(255) NOT NULL,
is_locked integer DEFAULT 0 NOT NULL
-);
+) STRICT;
-ALTER TABLE public.kysely_migrations_lock OWNER TO postgres;
+-- ALTER TABLE kysely_migrations_lock OWNER TO postgres;
--
-- Name: library; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.library (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- name character varying NOT NULL,
- "ownerId" uuid NOT NULL,
+CREATE TABLE library (
+ id text NOT NULL,
+ name text NOT NULL,
+ "ownerId" text NOT NULL,
"importPaths" text[] NOT NULL,
"exclusionPatterns" text[] NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "deletedAt" timestamp with time zone,
- "refreshedAt" timestamp with time zone,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL
-);
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "deletedAt" text,
+ "refreshedAt" text,
+ "updateId" text NOT NULL
+) STRICT;
-ALTER TABLE public.library OWNER TO postgres;
+-- ALTER TABLE library OWNER TO postgres;
--
-- Name: memory; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.memory (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "deletedAt" timestamp with time zone,
- "ownerId" uuid NOT NULL,
- type character varying NOT NULL,
- data jsonb NOT NULL,
- "isSaved" boolean DEFAULT false NOT NULL,
- "memoryAt" timestamp with time zone NOT NULL,
- "seenAt" timestamp with time zone,
- "showAt" timestamp with time zone,
- "hideAt" timestamp with time zone,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL
-);
+CREATE TABLE memory (
+ id text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "deletedAt" text,
+ "ownerId" text NOT NULL,
+ type text NOT NULL,
+ data text NOT NULL,
+ "isSaved" int DEFAULT false NOT NULL,
+ "memoryAt" text NOT NULL,
+ "seenAt" text,
+ "showAt" text,
+ "hideAt" text,
+ "updateId" text NOT NULL
+) STRICT;
-ALTER TABLE public.memory OWNER TO postgres;
+-- ALTER TABLE memory OWNER TO postgres;
--
-- Name: memory_asset; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.memory_asset (
- "memoriesId" uuid NOT NULL,
- "assetId" uuid NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL
-);
+CREATE TABLE memory_asset (
+ "memoriesId" text NOT NULL,
+ "assetId" text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "updateId" text NOT NULL
+) STRICT;
-ALTER TABLE public.memory_asset OWNER TO postgres;
+-- ALTER TABLE memory_asset OWNER TO postgres;
--
-- Name: memory_asset_audit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.memory_asset_audit (
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "memoryId" uuid NOT NULL,
- "assetId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL
-);
+CREATE TABLE memory_asset_audit (
+ id text NOT NULl,
+ "memoryId" text NOT NULL,
+ "assetId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.memory_asset_audit OWNER TO postgres;
+-- ALTER TABLE memory_asset_audit OWNER TO postgres;
--
-- Name: memory_audit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.memory_audit (
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "memoryId" uuid NOT NULL,
- "userId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL
-);
+CREATE TABLE memory_audit (
+ id text NOT NULl,
+ "memoryId" text NOT NULL,
+ "userId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.memory_audit OWNER TO postgres;
+-- ALTER TABLE memory_audit OWNER TO postgres;
--
-- Name: migration_overrides; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.migration_overrides (
- name character varying NOT NULL,
- value jsonb NOT NULL
-);
+CREATE TABLE migration_overrides (
+ name text NOT NULL,
+ value text NOT NULL
+) STRICT;
-ALTER TABLE public.migration_overrides OWNER TO postgres;
+-- ALTER TABLE migration_overrides OWNER TO postgres;
--
-- Name: move_history; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.move_history (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "entityId" uuid NOT NULL,
- "pathType" character varying NOT NULL,
- "oldPath" character varying NOT NULL,
- "newPath" character varying NOT NULL
-);
+CREATE TABLE move_history (
+ id text NOT NULL,
+ "entityId" text NOT NULL,
+ "pathType" text NOT NULL,
+ "oldPath" text NOT NULL,
+ "newPath" text NOT NULL
+) STRICT;
-ALTER TABLE public.move_history OWNER TO postgres;
+-- ALTER TABLE move_history OWNER TO postgres;
--
-- Name: naturalearth_countries; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.naturalearth_countries (
- id integer NOT NULL,
+CREATE TABLE naturalearth_countries (
+ id integer primary key NOT NULL,
admin character varying(50) NOT NULL,
admin_a3 character varying(3) NOT NULL,
type character varying(50) NOT NULL,
coordinates polygon NOT NULL
-);
+) STRICT;
-ALTER TABLE public.naturalearth_countries OWNER TO postgres;
+-- ALTER TABLE naturalearth_countries OWNER TO postgres;
--
-- Name: naturalearth_countries_tmp_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
-ALTER TABLE public.naturalearth_countries ALTER COLUMN id ADD GENERATED ALWAYS AS IDENTITY (
- SEQUENCE NAME public.naturalearth_countries_tmp_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- MAXVALUE 2147483647
- CACHE 1
-);
+-- ALTER TABLE naturalearth_countries ALTER COLUMN id ADD GENERATED ALWAYS AS IDENTITY (
+-- SEQUENCE NAME naturalearth_countries_tmp_id_seq
+-- START WITH 1
+-- INCREMENT BY 1
+-- NO MINVALUE
+-- MAXVALUE 2147483647
+-- CACHE 1
+-- );
--
-- Name: notification; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.notification (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "deletedAt" timestamp with time zone,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "userId" uuid,
- level character varying DEFAULT 'info'::character varying NOT NULL,
- type character varying DEFAULT 'info'::character varying NOT NULL,
+CREATE TABLE notification (
+ id text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "deletedAt" text,
+ "updateId" text NOT NULl,
+ "userId" text,
+ level text DEFAULT 'info'::character varying NOT NULL,
+ type text DEFAULT 'info'::character varying NOT NULL,
data jsonb,
- title character varying NOT NULL,
+ title text NOT NULL,
description text,
- "readAt" timestamp with time zone
-);
+ "readAt" text
+) STRICT;
-ALTER TABLE public.notification OWNER TO postgres;
+-- ALTER TABLE notification OWNER TO postgres;
--
-- Name: ocr_search; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.ocr_search (
- "assetId" uuid NOT NULL,
+CREATE TABLE ocr_search (
+ "assetId" text NOT NULL,
text text NOT NULL
-);
+) STRICT;
-ALTER TABLE public.ocr_search OWNER TO postgres;
+-- ALTER TABLE ocr_search OWNER TO postgres;
--
-- Name: partner; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.partner (
- "sharedById" uuid NOT NULL,
- "sharedWithId" uuid NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "inTimeline" boolean DEFAULT false NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "createId" uuid DEFAULT public.immich_uuid_v7() NOT NULL
-);
+CREATE TABLE partner (
+ "sharedById" text NOT NULL,
+ "sharedWithId" text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "inTimeline" int DEFAULT false NOT NULL,
+ "updateId" text NOT NULl,
+ "createId" text NOT NULL
+) STRICT;
-ALTER TABLE public.partner OWNER TO postgres;
+-- ALTER TABLE partner OWNER TO postgres;
--
-- Name: partner_audit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.partner_audit (
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "sharedById" uuid NOT NULL,
- "sharedWithId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL
-);
+CREATE TABLE partner_audit (
+ id text NOT NULl,
+ "sharedById" text NOT NULL,
+ "sharedWithId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.partner_audit OWNER TO postgres;
+-- ALTER TABLE partner_audit OWNER TO postgres;
--
-- Name: person; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.person (
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "ownerId" uuid NOT NULL,
- name character varying DEFAULT ''::character varying NOT NULL,
- "thumbnailPath" character varying DEFAULT ''::character varying NOT NULL,
- "isHidden" boolean DEFAULT false NOT NULL,
+CREATE TABLE person (
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "ownerId" text NOT NULL,
+ name text DEFAULT '' NOT NULL,
+ "thumbnailPath" text DEFAULT '' NOT NULL,
+ "isHidden" int DEFAULT false NOT NULL,
"birthDate" date,
- "faceAssetId" uuid,
- "isFavorite" boolean DEFAULT false NOT NULL,
- color character varying,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "personGroupId" uuid NOT NULL,
+ "faceAssetId" text,
+ "isFavorite" int DEFAULT false NOT NULL,
+ color text,
+ "updateId" text NOT NULl,
+ "personGroupId" text NOT NULL,
CONSTRAINT "person_birthDate_chk" CHECK (("birthDate" <= CURRENT_DATE))
-);
+) STRICT;
-ALTER TABLE public.person OWNER TO postgres;
+-- ALTER TABLE person OWNER TO postgres;
--
-- Name: person_audit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.person_audit (
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "ownerId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL,
- "personGroupId" uuid NOT NULL
-);
+CREATE TABLE person_audit (
+ id text NOT NULl,
+ "ownerId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL,
+ "personGroupId" text NOT NULL
+) STRICT;
-ALTER TABLE public.person_audit OWNER TO postgres;
+-- ALTER TABLE person_audit OWNER TO postgres;
--
-- Name: person_group; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.person_group (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "clusterGroupId" uuid NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "createId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL
-);
+CREATE TABLE person_group (
+ id text NOT NULL,
+ "clusterGroupId" text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "createId" text NOT NULl,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "updateId" text NOT NULL
+) STRICT;
-ALTER TABLE public.person_group OWNER TO postgres;
+-- ALTER TABLE person_group OWNER TO postgres;
--
-- Name: person_group_audit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.person_group_audit (
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "personGroupId" uuid NOT NULL,
- "clusterGroupId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL
-);
+CREATE TABLE person_group_audit (
+ id text NOT NULl,
+ "personGroupId" text NOT NULL,
+ "clusterGroupId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.person_group_audit OWNER TO postgres;
+-- ALTER TABLE person_group_audit OWNER TO postgres;
--
-- Name: plugin; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.plugin (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- enabled boolean DEFAULT true NOT NULL,
- name character varying NOT NULL,
- version character varying NOT NULL,
- title character varying NOT NULL,
- description character varying NOT NULL,
- author character varying NOT NULL,
- "wasmBytes" bytea NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- templates jsonb NOT NULL,
- sha256hash bytea NOT NULL
-);
+CREATE TABLE plugin (
+ id text NOT NULL,
+ enabled int DEFAULT true NOT NULL,
+ name text NOT NULL,
+ version text NOT NULL,
+ title text NOT NULL,
+ description text NOT NULL,
+ author text NOT NULL,
+ "wasmBytes" blob NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ templates text NOT NULL,
+ sha256hash blob NOT NULL
+) STRICT;
-ALTER TABLE public.plugin OWNER TO postgres;
+-- ALTER TABLE plugin OWNER TO postgres;
--
-- Name: plugin_method; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.plugin_method (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "pluginId" uuid NOT NULL,
- name character varying NOT NULL,
- title character varying NOT NULL,
- description character varying NOT NULL,
+CREATE TABLE plugin_method (
+ id text NOT NULL,
+ "pluginId" text NOT NULL,
+ name text NOT NULL,
+ title text NOT NULL,
+ description text NOT NULL,
types character varying[] NOT NULL,
- "hostFunctions" boolean DEFAULT false NOT NULL,
+ "hostFunctions" int DEFAULT false NOT NULL,
"uiHints" character varying[] DEFAULT '{}'::character varying[] NOT NULL,
schema jsonb,
"allowedHosts" character varying[] DEFAULT '{}'::character varying[] NOT NULL
-);
+) STRICT;
-ALTER TABLE public.plugin_method OWNER TO postgres;
+-- ALTER TABLE plugin_method OWNER TO postgres;
--
-- Name: session; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.session (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- token bytea NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "userId" uuid NOT NULL,
- "deviceType" character varying DEFAULT ''::character varying NOT NULL,
- "deviceOS" character varying DEFAULT ''::character varying NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "pinExpiresAt" timestamp with time zone,
- "expiresAt" timestamp with time zone,
- "parentId" uuid,
- "isPendingSyncReset" boolean DEFAULT false NOT NULL,
- "appVersion" character varying,
- "oauthSid" character varying,
+CREATE TABLE session (
+ id text NOT NULL,
+ token blob NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "userId" text NOT NULL,
+ "deviceType" text DEFAULT '' NOT NULL,
+ "deviceOS" text DEFAULT '' NOT NULL,
+ "updateId" text NOT NULl,
+ "pinExpiresAt" text,
+ "expiresAt" text,
+ "parentId" text,
+ "isPendingSyncReset" int DEFAULT false NOT NULL,
+ "appVersion" text,
+ "oauthSid" text,
"oauthBearerToken" character varying
-);
+) STRICT;
-ALTER TABLE public.session OWNER TO postgres;
+-- ALTER TABLE session OWNER TO postgres;
--
-- Name: session_sync_checkpoint; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.session_sync_checkpoint (
- "sessionId" uuid NOT NULL,
- type character varying NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- ack character varying NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL
-);
+CREATE TABLE session_sync_checkpoint (
+ "sessionId" text NOT NULL,
+ type text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ ack text NOT NULL,
+ "updateId" text NOT NULL
+) STRICT;
-ALTER TABLE public.session_sync_checkpoint OWNER TO postgres;
+-- ALTER TABLE session_sync_checkpoint OWNER TO postgres;
--
-- Name: shared_link; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.shared_link (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- description character varying,
- "userId" uuid NOT NULL,
- key bytea NOT NULL,
- type character varying NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "expiresAt" timestamp with time zone,
- "allowUpload" boolean DEFAULT false NOT NULL,
- "albumId" uuid,
- "allowDownload" boolean DEFAULT true NOT NULL,
- "showExif" boolean DEFAULT true NOT NULL,
- password character varying,
+CREATE TABLE shared_link (
+ id text NOT NULL,
+ description text,
+ "userId" text NOT NULL,
+ key blob NOT NULL,
+ type text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "expiresAt" text,
+ "allowUpload" int DEFAULT false NOT NULL,
+ "albumId" text,
+ "allowDownload" int DEFAULT true NOT NULL,
+ "showExif" int DEFAULT true NOT NULL,
+ password text,
slug character varying
-);
+) STRICT;
-ALTER TABLE public.shared_link OWNER TO postgres;
+-- ALTER TABLE shared_link OWNER TO postgres;
--
-- Name: shared_link_asset; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.shared_link_asset (
- "assetId" uuid NOT NULL,
- "sharedLinkId" uuid NOT NULL
-);
+CREATE TABLE shared_link_asset (
+ "assetId" text NOT NULL,
+ "sharedLinkId" text NOT NULL
+) STRICT;
-ALTER TABLE public.shared_link_asset OWNER TO postgres;
+-- ALTER TABLE shared_link_asset OWNER TO postgres;
--
-- Name: smart_search; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.smart_search (
- "assetId" uuid NOT NULL,
- embedding public.vector(512) NOT NULL
-);
+CREATE TABLE smart_search (
+ "assetId" text NOT NULL,
+ embedding vector(512) NOT NULL
+) STRICT;
-ALTER TABLE public.smart_search OWNER TO postgres;
+-- ALTER TABLE smart_search OWNER TO postgres;
--
-- Name: stack; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.stack (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "primaryAssetId" uuid NOT NULL,
- "ownerId" uuid NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL
-);
+CREATE TABLE stack (
+ id text NOT NULL,
+ "primaryAssetId" text NOT NULL,
+ "ownerId" text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "updateId" text NOT NULL
+) STRICT;
-ALTER TABLE public.stack OWNER TO postgres;
+-- ALTER TABLE stack OWNER TO postgres;
--
-- Name: stack_audit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.stack_audit (
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "stackId" uuid NOT NULL,
- "userId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL
-);
+CREATE TABLE stack_audit (
+ id text NOT NULl,
+ "stackId" text NOT NULL,
+ "userId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.stack_audit OWNER TO postgres;
+-- ALTER TABLE stack_audit OWNER TO postgres;
--
-- Name: system_metadata; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.system_metadata (
- key character varying NOT NULL,
- value jsonb NOT NULL
-);
+CREATE TABLE system_metadata (
+ key text NOT NULL,
+ value text NOT NULL
+) STRICT;
-ALTER TABLE public.system_metadata OWNER TO postgres;
+-- ALTER TABLE system_metadata OWNER TO postgres;
--
-- Name: tag; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.tag (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "userId" uuid NOT NULL,
- value character varying NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- color character varying,
- "parentId" uuid,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL
-);
+CREATE TABLE tag (
+ id text NOT NULL,
+ "userId" text NOT NULL,
+ value text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ color text,
+ "parentId" text,
+ "updateId" text NOT NULL
+) STRICT;
-ALTER TABLE public.tag OWNER TO postgres;
+-- ALTER TABLE tag OWNER TO postgres;
--
-- Name: tag_asset; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.tag_asset (
- "assetId" uuid NOT NULL,
- "tagId" uuid NOT NULL
-);
+CREATE TABLE tag_asset (
+ "assetId" text NOT NULL,
+ "tagId" text NOT NULL
+) STRICT;
-ALTER TABLE public.tag_asset OWNER TO postgres;
+-- ALTER TABLE tag_asset OWNER TO postgres;
--
-- Name: tag_closure; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.tag_closure (
- id_ancestor uuid NOT NULL,
- id_descendant uuid NOT NULL
-);
+CREATE TABLE tag_closure (
+ id_ancestor text NOT NULL,
+ id_descendant text NOT NULL
+) STRICT;
-ALTER TABLE public.tag_closure OWNER TO postgres;
+-- ALTER TABLE tag_closure OWNER TO postgres;
--
-- Name: user; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public."user" (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- email character varying NOT NULL,
- password character varying,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "profileImagePath" character varying DEFAULT ''::character varying NOT NULL,
- "isAdmin" boolean DEFAULT false NOT NULL,
- "shouldChangePassword" boolean DEFAULT true NOT NULL,
- "deletedAt" timestamp with time zone,
- "oauthId" character varying DEFAULT ''::character varying NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "storageLabel" character varying,
- name character varying DEFAULT ''::character varying NOT NULL,
- "quotaSizeInBytes" bigint,
+CREATE TABLE "user" (
+ id text NOT NULL,
+ email text NOT NULL,
+ password text,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "profileImagePath" text DEFAULT '' NOT NULL,
+ "isAdmin" int DEFAULT false NOT NULL,
+ "shouldChangePassword" int DEFAULT true NOT NULL,
+ "deletedAt" text,
+ "oauthId" text DEFAULT '' NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "storageLabel" text,
+ name text DEFAULT '' NOT NULL,
+ "quotaSizeInBytes" int,
"quotaUsageInBytes" bigint DEFAULT 0 NOT NULL,
- status character varying DEFAULT 'active'::character varying NOT NULL,
- "profileChangedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "avatarColor" character varying,
- "pinCode" character varying,
- "clusterGroupId" uuid NOT NULL
-);
+ status text DEFAULT 'active' NOT NULL,
+ "profileChangedAt" text DEFAULT current_timestamp NOT NULL,
+ "updateId" text NOT NULl,
+ "avatarColor" text,
+ "pinCode" text,
+ "clusterGroupId" text NOT NULL
+) STRICT;
-ALTER TABLE public."user" OWNER TO postgres;
+-- ALTER TABLE "user" OWNER TO postgres;
--
-- Name: user_audit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.user_audit (
- "userId" uuid NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL,
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL
-);
+CREATE TABLE user_audit (
+ "userId" text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL,
+ id text NOT NULL
+) STRICT;
-ALTER TABLE public.user_audit OWNER TO postgres;
+-- ALTER TABLE user_audit OWNER TO postgres;
--
-- Name: user_metadata; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.user_metadata (
- "userId" uuid NOT NULL,
- key character varying NOT NULL,
- value jsonb NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL
-);
+CREATE TABLE user_metadata (
+ "userId" text NOT NULL,
+ key text NOT NULL,
+ value text NOT NULL,
+ "updateId" text NOT NULl,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.user_metadata OWNER TO postgres;
+-- ALTER TABLE user_metadata OWNER TO postgres;
--
-- Name: user_metadata_audit; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.user_metadata_audit (
- id uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- "userId" uuid NOT NULL,
- key character varying NOT NULL,
- "deletedAt" timestamp with time zone DEFAULT clock_timestamp() NOT NULL
-);
+CREATE TABLE user_metadata_audit (
+ id text NOT NULl,
+ "userId" text NOT NULL,
+ key text NOT NULL,
+ "deletedAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.user_metadata_audit OWNER TO postgres;
+-- ALTER TABLE user_metadata_audit OWNER TO postgres;
--
-- Name: version_history; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.version_history (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- version character varying NOT NULL
-);
+CREATE TABLE version_history (
+ id text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ version text NOT NULL
+) STRICT;
-ALTER TABLE public.version_history OWNER TO postgres;
+-- ALTER TABLE version_history OWNER TO postgres;
--
-- Name: video_stream_segment; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.video_stream_segment (
- "variantId" uuid NOT NULL,
+CREATE TABLE video_stream_segment (
+ "variantId" text NOT NULL,
index integer NOT NULL,
"durationUs" integer NOT NULL
-);
+) STRICT;
-ALTER TABLE public.video_stream_segment OWNER TO postgres;
+-- ALTER TABLE video_stream_segment OWNER TO postgres;
--
-- Name: video_stream_session; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.video_stream_session (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "assetId" uuid NOT NULL,
- "expiresAt" timestamp with time zone NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL
-);
+CREATE TABLE video_stream_session (
+ id text NOT NULL,
+ "assetId" text NOT NULL,
+ "expiresAt" text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL
+) STRICT;
-ALTER TABLE public.video_stream_session OWNER TO postgres;
+-- ALTER TABLE video_stream_session OWNER TO postgres;
--
-- Name: video_stream_variant; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.video_stream_variant (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "sessionId" uuid NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
+CREATE TABLE video_stream_variant (
+ id text NOT NULL,
+ "sessionId" text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
bitrate integer NOT NULL,
- codec public.video_stream_variant_codec_enum NOT NULL,
- resolution smallint NOT NULL
-);
+ codec video_stream_variant_codec_enum NOT NULL,
+ resolution int NOT NULL
+) STRICT;
-ALTER TABLE public.video_stream_variant OWNER TO postgres;
+-- ALTER TABLE video_stream_variant OWNER TO postgres;
--
-- Name: workflow; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.workflow (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "ownerId" uuid NOT NULL,
- trigger character varying NOT NULL,
- name character varying,
- description character varying,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updatedAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "updateId" uuid DEFAULT public.immich_uuid_v7() NOT NULL,
- enabled boolean DEFAULT true NOT NULL,
- logging boolean DEFAULT false NOT NULL
-);
+CREATE TABLE workflow (
+ id text NOT NULL,
+ "ownerId" text NOT NULL,
+ trigger text NOT NULL,
+ name text,
+ description text,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "updatedAt" text DEFAULT current_timestamp NOT NULL,
+ "updateId" text NOT NULl,
+ enabled int DEFAULT true NOT NULL,
+ logging int DEFAULT false NOT NULL
+) STRICT;
-ALTER TABLE public.workflow OWNER TO postgres;
+-- ALTER TABLE workflow OWNER TO postgres;
--
-- Name: workflow_log; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.workflow_log (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- "createdAt" timestamp with time zone DEFAULT current_timestamp NOT NULL,
- "workflowId" uuid NOT NULL,
- result character varying NOT NULL,
- "workflowStepId" uuid,
- "triggerDataId" uuid,
- "runId" uuid NOT NULL
-);
+CREATE TABLE workflow_log (
+ id text NOT NULL,
+ "createdAt" text DEFAULT current_timestamp NOT NULL,
+ "workflowId" text NOT NULL,
+ result text NOT NULL,
+ "workflowStepId" text,
+ "triggerDataId" text,
+ "runId" text NOT NULL
+) STRICT;
-ALTER TABLE public.workflow_log OWNER TO postgres;
+-- ALTER TABLE workflow_log OWNER TO postgres;
--
-- Name: workflow_step; Type: TABLE; Schema: public; Owner: postgres
--
-CREATE TABLE public.workflow_step (
- id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
- enabled boolean DEFAULT true NOT NULL,
- "workflowId" uuid NOT NULL,
- "pluginMethodId" uuid NOT NULL,
+CREATE TABLE workflow_step (
+ id text NOT NULL,
+ enabled int DEFAULT true NOT NULL,
+ "workflowId" text NOT NULL,
+ "pluginMethodId" text NOT NULL,
config jsonb,
"order" integer NOT NULL
-);
+) STRICT;
-ALTER TABLE public.workflow_step OWNER TO postgres;
+-- ALTER TABLE workflow_step OWNER TO postgres;
--
-- Name: move_history UQ_entityId_pathType; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.move_history
+ALTER TABLE ONLY move_history
ADD CONSTRAINT "UQ_entityId_pathType" UNIQUE ("entityId", "pathType");
@@ -1879,7 +1908,7 @@ ALTER TABLE ONLY public.move_history
-- Name: move_history UQ_newPath; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.move_history
+ALTER TABLE ONLY move_history
ADD CONSTRAINT "UQ_newPath" UNIQUE ("newPath");
@@ -1887,7 +1916,7 @@ ALTER TABLE ONLY public.move_history
-- Name: activity activity_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.activity
+ALTER TABLE ONLY activity
ADD CONSTRAINT activity_pkey PRIMARY KEY (id);
@@ -1895,7 +1924,7 @@ ALTER TABLE ONLY public.activity
-- Name: album_asset_audit album_asset_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.album_asset_audit
+ALTER TABLE ONLY album_asset_audit
ADD CONSTRAINT album_asset_audit_pkey PRIMARY KEY (id);
@@ -1903,7 +1932,7 @@ ALTER TABLE ONLY public.album_asset_audit
-- Name: album_asset album_asset_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.album_asset
+ALTER TABLE ONLY album_asset
ADD CONSTRAINT album_asset_pkey PRIMARY KEY ("albumId", "assetId");
@@ -1911,7 +1940,7 @@ ALTER TABLE ONLY public.album_asset
-- Name: album_audit album_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.album_audit
+ALTER TABLE ONLY album_audit
ADD CONSTRAINT album_audit_pkey PRIMARY KEY (id);
@@ -1919,7 +1948,7 @@ ALTER TABLE ONLY public.album_audit
-- Name: album album_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.album
+ALTER TABLE ONLY album
ADD CONSTRAINT album_pkey PRIMARY KEY (id);
@@ -1927,7 +1956,7 @@ ALTER TABLE ONLY public.album
-- Name: album_user_audit album_user_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.album_user_audit
+ALTER TABLE ONLY album_user_audit
ADD CONSTRAINT album_user_audit_pkey PRIMARY KEY (id);
@@ -1935,7 +1964,7 @@ ALTER TABLE ONLY public.album_user_audit
-- Name: album_user album_user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.album_user
+ALTER TABLE ONLY album_user
ADD CONSTRAINT album_user_pkey PRIMARY KEY ("albumId", "userId");
@@ -1943,7 +1972,7 @@ ALTER TABLE ONLY public.album_user
-- Name: api_key api_key_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.api_key
+ALTER TABLE ONLY api_key
ADD CONSTRAINT api_key_pkey PRIMARY KEY (id);
@@ -1951,7 +1980,7 @@ ALTER TABLE ONLY public.api_key
-- Name: asset_audio asset_audio_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_audio
+ALTER TABLE ONLY asset_audio
ADD CONSTRAINT asset_audio_pkey PRIMARY KEY ("assetId");
@@ -1959,7 +1988,7 @@ ALTER TABLE ONLY public.asset_audio
-- Name: asset_audit asset_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_audit
+ALTER TABLE ONLY asset_audit
ADD CONSTRAINT asset_audit_pkey PRIMARY KEY (id);
@@ -1967,7 +1996,7 @@ ALTER TABLE ONLY public.asset_audit
-- Name: asset_edit asset_edit_assetId_sequence_uq; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_edit
+ALTER TABLE ONLY asset_edit
ADD CONSTRAINT "asset_edit_assetId_sequence_uq" UNIQUE ("assetId", sequence);
@@ -1975,7 +2004,7 @@ ALTER TABLE ONLY public.asset_edit
-- Name: asset_edit_audit asset_edit_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_edit_audit
+ALTER TABLE ONLY asset_edit_audit
ADD CONSTRAINT asset_edit_audit_pkey PRIMARY KEY (id);
@@ -1983,7 +2012,7 @@ ALTER TABLE ONLY public.asset_edit_audit
-- Name: asset_edit asset_edit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_edit
+ALTER TABLE ONLY asset_edit
ADD CONSTRAINT asset_edit_pkey PRIMARY KEY (id);
@@ -1991,7 +2020,7 @@ ALTER TABLE ONLY public.asset_edit
-- Name: asset_exif asset_exif_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_exif
+ALTER TABLE ONLY asset_exif
ADD CONSTRAINT asset_exif_pkey PRIMARY KEY ("assetId");
@@ -1999,7 +2028,7 @@ ALTER TABLE ONLY public.asset_exif
-- Name: asset_face_audit asset_face_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_face_audit
+ALTER TABLE ONLY asset_face_audit
ADD CONSTRAINT asset_face_audit_pkey PRIMARY KEY (id);
@@ -2007,7 +2036,7 @@ ALTER TABLE ONLY public.asset_face_audit
-- Name: asset_face asset_face_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_face
+ALTER TABLE ONLY asset_face
ADD CONSTRAINT asset_face_pkey PRIMARY KEY (id);
@@ -2015,7 +2044,7 @@ ALTER TABLE ONLY public.asset_face
-- Name: asset_file asset_file_assetId_type_isEdited_uq; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_file
+ALTER TABLE ONLY asset_file
ADD CONSTRAINT "asset_file_assetId_type_isEdited_uq" UNIQUE ("assetId", type, "isEdited");
@@ -2023,7 +2052,7 @@ ALTER TABLE ONLY public.asset_file
-- Name: asset_file asset_file_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_file
+ALTER TABLE ONLY asset_file
ADD CONSTRAINT asset_file_pkey PRIMARY KEY (id);
@@ -2031,7 +2060,7 @@ ALTER TABLE ONLY public.asset_file
-- Name: asset_job_status asset_job_status_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_job_status
+ALTER TABLE ONLY asset_job_status
ADD CONSTRAINT asset_job_status_pkey PRIMARY KEY ("assetId");
@@ -2039,7 +2068,7 @@ ALTER TABLE ONLY public.asset_job_status
-- Name: asset_keyframe asset_keyframe_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_keyframe
+ALTER TABLE ONLY asset_keyframe
ADD CONSTRAINT asset_keyframe_pkey PRIMARY KEY ("assetId");
@@ -2047,7 +2076,7 @@ ALTER TABLE ONLY public.asset_keyframe
-- Name: asset_metadata_audit asset_metadata_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_metadata_audit
+ALTER TABLE ONLY asset_metadata_audit
ADD CONSTRAINT asset_metadata_audit_pkey PRIMARY KEY (id);
@@ -2055,7 +2084,7 @@ ALTER TABLE ONLY public.asset_metadata_audit
-- Name: asset_metadata asset_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_metadata
+ALTER TABLE ONLY asset_metadata
ADD CONSTRAINT asset_metadata_pkey PRIMARY KEY ("assetId", key);
@@ -2063,7 +2092,7 @@ ALTER TABLE ONLY public.asset_metadata
-- Name: asset_ocr_audit asset_ocr_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_ocr_audit
+ALTER TABLE ONLY asset_ocr_audit
ADD CONSTRAINT asset_ocr_audit_pkey PRIMARY KEY (id);
@@ -2071,7 +2100,7 @@ ALTER TABLE ONLY public.asset_ocr_audit
-- Name: asset_ocr asset_ocr_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_ocr
+ALTER TABLE ONLY asset_ocr
ADD CONSTRAINT asset_ocr_pkey PRIMARY KEY (id);
@@ -2079,7 +2108,7 @@ ALTER TABLE ONLY public.asset_ocr
-- Name: asset asset_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset
+ALTER TABLE ONLY asset
ADD CONSTRAINT asset_pkey PRIMARY KEY (id);
@@ -2087,7 +2116,7 @@ ALTER TABLE ONLY public.asset
-- Name: asset_video asset_video_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_video
+ALTER TABLE ONLY asset_video
ADD CONSTRAINT asset_video_pkey PRIMARY KEY ("assetId");
@@ -2095,7 +2124,7 @@ ALTER TABLE ONLY public.asset_video
-- Name: cluster_group cluster_group_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.cluster_group
+ALTER TABLE ONLY cluster_group
ADD CONSTRAINT cluster_group_pkey PRIMARY KEY (id);
@@ -2103,7 +2132,7 @@ ALTER TABLE ONLY public.cluster_group
-- Name: cluster_group_request cluster_group_request_clusterGroupId_userId_uq; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.cluster_group_request
+ALTER TABLE ONLY cluster_group_request
ADD CONSTRAINT "cluster_group_request_clusterGroupId_userId_uq" UNIQUE ("clusterGroupId", "userId");
@@ -2111,7 +2140,7 @@ ALTER TABLE ONLY public.cluster_group_request
-- Name: cluster_group_request cluster_group_request_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.cluster_group_request
+ALTER TABLE ONLY cluster_group_request
ADD CONSTRAINT cluster_group_request_pkey PRIMARY KEY (id);
@@ -2119,7 +2148,7 @@ ALTER TABLE ONLY public.cluster_group_request
-- Name: face_search face_search_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.face_search
+ALTER TABLE ONLY face_search
ADD CONSTRAINT face_search_pkey PRIMARY KEY ("faceId");
@@ -2127,7 +2156,7 @@ ALTER TABLE ONLY public.face_search
-- Name: geodata_places geodata_places_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.geodata_places
+ALTER TABLE ONLY geodata_places
ADD CONSTRAINT geodata_places_pkey PRIMARY KEY (id) WITH (fillfactor='100');
@@ -2135,7 +2164,7 @@ ALTER TABLE ONLY public.geodata_places
-- Name: integrity_report integrity_report_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.integrity_report
+ALTER TABLE ONLY integrity_report
ADD CONSTRAINT integrity_report_pkey PRIMARY KEY (id);
@@ -2143,7 +2172,7 @@ ALTER TABLE ONLY public.integrity_report
-- Name: integrity_report integrity_report_type_path_uq; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.integrity_report
+ALTER TABLE ONLY integrity_report
ADD CONSTRAINT integrity_report_type_path_uq UNIQUE (type, path);
@@ -2151,7 +2180,7 @@ ALTER TABLE ONLY public.integrity_report
-- Name: kysely_migrations_lock kysely_migrations_lock_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.kysely_migrations_lock
+ALTER TABLE ONLY kysely_migrations_lock
ADD CONSTRAINT kysely_migrations_lock_pkey PRIMARY KEY (id);
@@ -2159,7 +2188,7 @@ ALTER TABLE ONLY public.kysely_migrations_lock
-- Name: kysely_migrations kysely_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.kysely_migrations
+ALTER TABLE ONLY kysely_migrations
ADD CONSTRAINT kysely_migrations_pkey PRIMARY KEY (name);
@@ -2167,7 +2196,7 @@ ALTER TABLE ONLY public.kysely_migrations
-- Name: library library_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.library
+ALTER TABLE ONLY library
ADD CONSTRAINT library_pkey PRIMARY KEY (id);
@@ -2175,7 +2204,7 @@ ALTER TABLE ONLY public.library
-- Name: memory_asset_audit memory_asset_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.memory_asset_audit
+ALTER TABLE ONLY memory_asset_audit
ADD CONSTRAINT memory_asset_audit_pkey PRIMARY KEY (id);
@@ -2183,7 +2212,7 @@ ALTER TABLE ONLY public.memory_asset_audit
-- Name: memory_asset memory_asset_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.memory_asset
+ALTER TABLE ONLY memory_asset
ADD CONSTRAINT memory_asset_pkey PRIMARY KEY ("memoriesId", "assetId");
@@ -2191,7 +2220,7 @@ ALTER TABLE ONLY public.memory_asset
-- Name: memory_audit memory_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.memory_audit
+ALTER TABLE ONLY memory_audit
ADD CONSTRAINT memory_audit_pkey PRIMARY KEY (id);
@@ -2199,7 +2228,7 @@ ALTER TABLE ONLY public.memory_audit
-- Name: memory memory_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.memory
+ALTER TABLE ONLY memory
ADD CONSTRAINT memory_pkey PRIMARY KEY (id);
@@ -2207,7 +2236,7 @@ ALTER TABLE ONLY public.memory
-- Name: migration_overrides migration_overrides_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.migration_overrides
+ALTER TABLE ONLY migration_overrides
ADD CONSTRAINT migration_overrides_pkey PRIMARY KEY (name);
@@ -2215,7 +2244,7 @@ ALTER TABLE ONLY public.migration_overrides
-- Name: move_history move_history_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.move_history
+ALTER TABLE ONLY move_history
ADD CONSTRAINT move_history_pkey PRIMARY KEY (id);
@@ -2223,7 +2252,7 @@ ALTER TABLE ONLY public.move_history
-- Name: naturalearth_countries naturalearth_countries_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.naturalearth_countries
+ALTER TABLE ONLY naturalearth_countries
ADD CONSTRAINT naturalearth_countries_pkey PRIMARY KEY (id) WITH (fillfactor='100');
@@ -2231,7 +2260,7 @@ ALTER TABLE ONLY public.naturalearth_countries
-- Name: notification notification_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.notification
+ALTER TABLE ONLY notification
ADD CONSTRAINT notification_pkey PRIMARY KEY (id);
@@ -2239,7 +2268,7 @@ ALTER TABLE ONLY public.notification
-- Name: ocr_search ocr_search_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.ocr_search
+ALTER TABLE ONLY ocr_search
ADD CONSTRAINT ocr_search_pkey PRIMARY KEY ("assetId");
@@ -2247,7 +2276,7 @@ ALTER TABLE ONLY public.ocr_search
-- Name: partner_audit partner_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.partner_audit
+ALTER TABLE ONLY partner_audit
ADD CONSTRAINT partner_audit_pkey PRIMARY KEY (id);
@@ -2255,7 +2284,7 @@ ALTER TABLE ONLY public.partner_audit
-- Name: partner partner_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.partner
+ALTER TABLE ONLY partner
ADD CONSTRAINT partner_pkey PRIMARY KEY ("sharedById", "sharedWithId");
@@ -2263,7 +2292,7 @@ ALTER TABLE ONLY public.partner
-- Name: person_audit person_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.person_audit
+ALTER TABLE ONLY person_audit
ADD CONSTRAINT person_audit_pkey PRIMARY KEY (id);
@@ -2271,7 +2300,7 @@ ALTER TABLE ONLY public.person_audit
-- Name: person_group_audit person_group_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.person_group_audit
+ALTER TABLE ONLY person_group_audit
ADD CONSTRAINT person_group_audit_pkey PRIMARY KEY (id);
@@ -2279,7 +2308,7 @@ ALTER TABLE ONLY public.person_group_audit
-- Name: person_group person_group_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.person_group
+ALTER TABLE ONLY person_group
ADD CONSTRAINT person_group_pkey PRIMARY KEY (id);
@@ -2287,7 +2316,7 @@ ALTER TABLE ONLY public.person_group
-- Name: person person_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.person
+ALTER TABLE ONLY person
ADD CONSTRAINT person_pkey PRIMARY KEY ("ownerId", "personGroupId");
@@ -2295,7 +2324,7 @@ ALTER TABLE ONLY public.person
-- Name: plugin_method plugin_method_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.plugin_method
+ALTER TABLE ONLY plugin_method
ADD CONSTRAINT plugin_method_pkey PRIMARY KEY (id);
@@ -2303,7 +2332,7 @@ ALTER TABLE ONLY public.plugin_method
-- Name: plugin_method plugin_method_pluginId_name_uq; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.plugin_method
+ALTER TABLE ONLY plugin_method
ADD CONSTRAINT "plugin_method_pluginId_name_uq" UNIQUE ("pluginId", name);
@@ -2311,7 +2340,7 @@ ALTER TABLE ONLY public.plugin_method
-- Name: plugin plugin_name_uq; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.plugin
+ALTER TABLE ONLY plugin
ADD CONSTRAINT plugin_name_uq UNIQUE (name);
@@ -2319,7 +2348,7 @@ ALTER TABLE ONLY public.plugin
-- Name: plugin plugin_name_version_uq; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.plugin
+ALTER TABLE ONLY plugin
ADD CONSTRAINT plugin_name_version_uq UNIQUE (name, version);
@@ -2327,7 +2356,7 @@ ALTER TABLE ONLY public.plugin
-- Name: plugin plugin_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.plugin
+ALTER TABLE ONLY plugin
ADD CONSTRAINT plugin_pkey PRIMARY KEY (id);
@@ -2335,7 +2364,7 @@ ALTER TABLE ONLY public.plugin
-- Name: session session_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.session
+ALTER TABLE ONLY session
ADD CONSTRAINT session_pkey PRIMARY KEY (id);
@@ -2343,7 +2372,7 @@ ALTER TABLE ONLY public.session
-- Name: session_sync_checkpoint session_sync_checkpoint_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.session_sync_checkpoint
+ALTER TABLE ONLY session_sync_checkpoint
ADD CONSTRAINT session_sync_checkpoint_pkey PRIMARY KEY ("sessionId", type);
@@ -2351,7 +2380,7 @@ ALTER TABLE ONLY public.session_sync_checkpoint
-- Name: shared_link_asset shared_link_asset_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.shared_link_asset
+ALTER TABLE ONLY shared_link_asset
ADD CONSTRAINT shared_link_asset_pkey PRIMARY KEY ("assetId", "sharedLinkId");
@@ -2359,7 +2388,7 @@ ALTER TABLE ONLY public.shared_link_asset
-- Name: shared_link shared_link_key_uq; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.shared_link
+ALTER TABLE ONLY shared_link
ADD CONSTRAINT shared_link_key_uq UNIQUE (key);
@@ -2367,7 +2396,7 @@ ALTER TABLE ONLY public.shared_link
-- Name: shared_link shared_link_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.shared_link
+ALTER TABLE ONLY shared_link
ADD CONSTRAINT shared_link_pkey PRIMARY KEY (id);
@@ -2375,7 +2404,7 @@ ALTER TABLE ONLY public.shared_link
-- Name: shared_link shared_link_slug_uq; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.shared_link
+ALTER TABLE ONLY shared_link
ADD CONSTRAINT shared_link_slug_uq UNIQUE (slug);
@@ -2383,7 +2412,7 @@ ALTER TABLE ONLY public.shared_link
-- Name: smart_search smart_search_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.smart_search
+ALTER TABLE ONLY smart_search
ADD CONSTRAINT smart_search_pkey PRIMARY KEY ("assetId");
@@ -2391,7 +2420,7 @@ ALTER TABLE ONLY public.smart_search
-- Name: stack_audit stack_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.stack_audit
+ALTER TABLE ONLY stack_audit
ADD CONSTRAINT stack_audit_pkey PRIMARY KEY (id);
@@ -2399,7 +2428,7 @@ ALTER TABLE ONLY public.stack_audit
-- Name: stack stack_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.stack
+ALTER TABLE ONLY stack
ADD CONSTRAINT stack_pkey PRIMARY KEY (id);
@@ -2407,7 +2436,7 @@ ALTER TABLE ONLY public.stack
-- Name: stack stack_primaryAssetId_uq; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.stack
+ALTER TABLE ONLY stack
ADD CONSTRAINT "stack_primaryAssetId_uq" UNIQUE ("primaryAssetId");
@@ -2415,7 +2444,7 @@ ALTER TABLE ONLY public.stack
-- Name: system_metadata system_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.system_metadata
+ALTER TABLE ONLY system_metadata
ADD CONSTRAINT system_metadata_pkey PRIMARY KEY (key);
@@ -2423,7 +2452,7 @@ ALTER TABLE ONLY public.system_metadata
-- Name: tag_asset tag_asset_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.tag_asset
+ALTER TABLE ONLY tag_asset
ADD CONSTRAINT tag_asset_pkey PRIMARY KEY ("assetId", "tagId");
@@ -2431,7 +2460,7 @@ ALTER TABLE ONLY public.tag_asset
-- Name: tag_closure tag_closure_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.tag_closure
+ALTER TABLE ONLY tag_closure
ADD CONSTRAINT tag_closure_pkey PRIMARY KEY (id_ancestor, id_descendant);
@@ -2439,7 +2468,7 @@ ALTER TABLE ONLY public.tag_closure
-- Name: tag tag_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.tag
+ALTER TABLE ONLY tag
ADD CONSTRAINT tag_pkey PRIMARY KEY (id);
@@ -2447,7 +2476,7 @@ ALTER TABLE ONLY public.tag
-- Name: tag tag_userId_value_uq; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.tag
+ALTER TABLE ONLY tag
ADD CONSTRAINT "tag_userId_value_uq" UNIQUE ("userId", value);
@@ -2455,7 +2484,7 @@ ALTER TABLE ONLY public.tag
-- Name: user_audit user_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.user_audit
+ALTER TABLE ONLY user_audit
ADD CONSTRAINT user_audit_pkey PRIMARY KEY (id);
@@ -2463,7 +2492,7 @@ ALTER TABLE ONLY public.user_audit
-- Name: user user_email_uq; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public."user"
+ALTER TABLE ONLY "user"
ADD CONSTRAINT user_email_uq UNIQUE (email);
@@ -2471,7 +2500,7 @@ ALTER TABLE ONLY public."user"
-- Name: user_metadata_audit user_metadata_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.user_metadata_audit
+ALTER TABLE ONLY user_metadata_audit
ADD CONSTRAINT user_metadata_audit_pkey PRIMARY KEY (id);
@@ -2479,7 +2508,7 @@ ALTER TABLE ONLY public.user_metadata_audit
-- Name: user_metadata user_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.user_metadata
+ALTER TABLE ONLY user_metadata
ADD CONSTRAINT user_metadata_pkey PRIMARY KEY ("userId", key);
@@ -2487,7 +2516,7 @@ ALTER TABLE ONLY public.user_metadata
-- Name: user user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public."user"
+ALTER TABLE ONLY "user"
ADD CONSTRAINT user_pkey PRIMARY KEY (id);
@@ -2495,7 +2524,7 @@ ALTER TABLE ONLY public."user"
-- Name: user user_storageLabel_uq; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public."user"
+ALTER TABLE ONLY "user"
ADD CONSTRAINT "user_storageLabel_uq" UNIQUE ("storageLabel");
@@ -2503,7 +2532,7 @@ ALTER TABLE ONLY public."user"
-- Name: version_history version_history_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.version_history
+ALTER TABLE ONLY version_history
ADD CONSTRAINT version_history_pkey PRIMARY KEY (id);
@@ -2511,7 +2540,7 @@ ALTER TABLE ONLY public.version_history
-- Name: video_stream_segment video_stream_segment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.video_stream_segment
+ALTER TABLE ONLY video_stream_segment
ADD CONSTRAINT video_stream_segment_pkey PRIMARY KEY ("variantId", index);
@@ -2519,7 +2548,7 @@ ALTER TABLE ONLY public.video_stream_segment
-- Name: video_stream_session video_stream_session_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.video_stream_session
+ALTER TABLE ONLY video_stream_session
ADD CONSTRAINT video_stream_session_pkey PRIMARY KEY (id);
@@ -2527,7 +2556,7 @@ ALTER TABLE ONLY public.video_stream_session
-- Name: video_stream_variant video_stream_variant_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.video_stream_variant
+ALTER TABLE ONLY video_stream_variant
ADD CONSTRAINT video_stream_variant_pkey PRIMARY KEY (id);
@@ -2535,7 +2564,7 @@ ALTER TABLE ONLY public.video_stream_variant
-- Name: workflow_log workflow_log_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.workflow_log
+ALTER TABLE ONLY workflow_log
ADD CONSTRAINT workflow_log_pkey PRIMARY KEY (id);
@@ -2543,7 +2572,7 @@ ALTER TABLE ONLY public.workflow_log
-- Name: workflow workflow_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.workflow
+ALTER TABLE ONLY workflow
ADD CONSTRAINT workflow_pkey PRIMARY KEY (id);
@@ -2551,7 +2580,7 @@ ALTER TABLE ONLY public.workflow
-- Name: workflow_step workflow_step_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.workflow_step
+ALTER TABLE ONLY workflow_step
ADD CONSTRAINT workflow_step_pkey PRIMARY KEY (id);
@@ -2559,574 +2588,574 @@ ALTER TABLE ONLY public.workflow_step
-- Name: IDX_asset_exif_gist_earthcoord; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "IDX_asset_exif_gist_earthcoord" ON public.asset_exif USING gist (public.ll_to_earth_public(latitude, longitude));
+CREATE INDEX "IDX_asset_exif_gist_earthcoord" ON asset_exif USING gist (public.ll_to_earth_public(latitude, longitude));
--
-- Name: IDX_geodata_gist_earthcoord; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "IDX_geodata_gist_earthcoord" ON public.geodata_places USING gist (public.ll_to_earth_public(latitude, longitude));
+CREATE INDEX "IDX_geodata_gist_earthcoord" ON geodata_places USING gist (public.ll_to_earth_public(latitude, longitude));
--
-- Name: IDX_user_metadata_audit_deleted_at; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "IDX_user_metadata_audit_deleted_at" ON public.user_metadata_audit USING btree ("deletedAt");
+CREATE INDEX "IDX_user_metadata_audit_deleted_at" ON user_metadata_audit USING btree ("deletedAt");
--
-- Name: IDX_user_metadata_audit_key; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "IDX_user_metadata_audit_key" ON public.user_metadata_audit USING btree (key);
+CREATE INDEX "IDX_user_metadata_audit_key" ON user_metadata_audit USING btree (key);
--
-- Name: IDX_user_metadata_audit_user_id; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "IDX_user_metadata_audit_user_id" ON public.user_metadata_audit USING btree ("userId");
+CREATE INDEX "IDX_user_metadata_audit_user_id" ON user_metadata_audit USING btree ("userId");
--
-- Name: IDX_user_metadata_update_id; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "IDX_user_metadata_update_id" ON public.user_metadata USING btree ("updateId");
+CREATE INDEX "IDX_user_metadata_update_id" ON user_metadata USING btree ("updateId");
--
-- Name: IDX_user_metadata_updated_at; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "IDX_user_metadata_updated_at" ON public.user_metadata USING btree ("updatedAt");
+CREATE INDEX "IDX_user_metadata_updated_at" ON user_metadata USING btree ("updatedAt");
--
-- Name: UQ_assets_owner_checksum; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE UNIQUE INDEX "UQ_assets_owner_checksum" ON public.asset USING btree ("ownerId", checksum) WHERE ("libraryId" IS NULL);
+CREATE UNIQUE INDEX "UQ_assets_owner_checksum" ON asset USING btree ("ownerId", checksum) WHERE ("libraryId" IS NULL);
--
-- Name: activity_albumId_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "activity_albumId_assetId_idx" ON public.activity USING btree ("albumId", "assetId");
+CREATE INDEX "activity_albumId_assetId_idx" ON activity USING btree ("albumId", "assetId");
--
-- Name: activity_albumId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "activity_albumId_idx" ON public.activity USING btree ("albumId");
+CREATE INDEX "activity_albumId_idx" ON activity USING btree ("albumId");
--
-- Name: activity_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "activity_assetId_idx" ON public.activity USING btree ("assetId");
+CREATE INDEX "activity_assetId_idx" ON activity USING btree ("assetId");
--
-- Name: activity_like_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE UNIQUE INDEX activity_like_idx ON public.activity USING btree ("assetId", "userId", "albumId") WHERE ("isLiked" = true);
+CREATE UNIQUE INDEX activity_like_idx ON activity USING btree ("assetId", "userId", "albumId") WHERE ("isLiked" = true);
--
-- Name: activity_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "activity_updateId_idx" ON public.activity USING btree ("updateId");
+CREATE INDEX "activity_updateId_idx" ON activity USING btree ("updateId");
--
-- Name: activity_userId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "activity_userId_idx" ON public.activity USING btree ("userId");
+CREATE INDEX "activity_userId_idx" ON activity USING btree ("userId");
--
-- Name: album_albumThumbnailAssetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_albumThumbnailAssetId_idx" ON public.album USING btree ("albumThumbnailAssetId");
+CREATE INDEX "album_albumThumbnailAssetId_idx" ON album USING btree ("albumThumbnailAssetId");
--
-- Name: album_asset_albumId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_asset_albumId_idx" ON public.album_asset USING btree ("albumId");
+CREATE INDEX "album_asset_albumId_idx" ON album_asset USING btree ("albumId");
--
-- Name: album_asset_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_asset_assetId_idx" ON public.album_asset USING btree ("assetId");
+CREATE INDEX "album_asset_assetId_idx" ON album_asset USING btree ("assetId");
--
-- Name: album_asset_audit_albumId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_asset_audit_albumId_idx" ON public.album_asset_audit USING btree ("albumId");
+CREATE INDEX "album_asset_audit_albumId_idx" ON album_asset_audit USING btree ("albumId");
--
-- Name: album_asset_audit_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_asset_audit_assetId_idx" ON public.album_asset_audit USING btree ("assetId");
+CREATE INDEX "album_asset_audit_assetId_idx" ON album_asset_audit USING btree ("assetId");
--
-- Name: album_asset_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_asset_audit_deletedAt_idx" ON public.album_asset_audit USING btree ("deletedAt");
+CREATE INDEX "album_asset_audit_deletedAt_idx" ON album_asset_audit USING btree ("deletedAt");
--
-- Name: album_asset_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_asset_updateId_idx" ON public.album_asset USING btree ("updateId");
+CREATE INDEX "album_asset_updateId_idx" ON album_asset USING btree ("updateId");
--
-- Name: album_audit_albumId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_audit_albumId_idx" ON public.album_audit USING btree ("albumId");
+CREATE INDEX "album_audit_albumId_idx" ON album_audit USING btree ("albumId");
--
-- Name: album_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_audit_deletedAt_idx" ON public.album_audit USING btree ("deletedAt");
+CREATE INDEX "album_audit_deletedAt_idx" ON album_audit USING btree ("deletedAt");
--
-- Name: album_audit_userId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_audit_userId_idx" ON public.album_audit USING btree ("userId");
+CREATE INDEX "album_audit_userId_idx" ON album_audit USING btree ("userId");
--
-- Name: album_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_updateId_idx" ON public.album USING btree ("updateId");
+CREATE INDEX "album_updateId_idx" ON album USING btree ("updateId");
--
-- Name: album_user_albumId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_user_albumId_idx" ON public.album_user USING btree ("albumId");
+CREATE INDEX "album_user_albumId_idx" ON album_user USING btree ("albumId");
--
-- Name: album_user_audit_albumId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_user_audit_albumId_idx" ON public.album_user_audit USING btree ("albumId");
+CREATE INDEX "album_user_audit_albumId_idx" ON album_user_audit USING btree ("albumId");
--
-- Name: album_user_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_user_audit_deletedAt_idx" ON public.album_user_audit USING btree ("deletedAt");
+CREATE INDEX "album_user_audit_deletedAt_idx" ON album_user_audit USING btree ("deletedAt");
--
-- Name: album_user_audit_userId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_user_audit_userId_idx" ON public.album_user_audit USING btree ("userId");
+CREATE INDEX "album_user_audit_userId_idx" ON album_user_audit USING btree ("userId");
--
-- Name: album_user_createId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_user_createId_idx" ON public.album_user USING btree ("createId");
+CREATE INDEX "album_user_createId_idx" ON album_user USING btree ("createId");
--
-- Name: album_user_unique_owner; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE UNIQUE INDEX album_user_unique_owner ON public.album_user USING btree ("albumId") WHERE (role = 'owner'::public.album_user_role_enum);
+CREATE UNIQUE INDEX album_user_unique_owner ON album_user USING btree ("albumId") WHERE (role = 'owner'::public.album_user_role_enum);
--
-- Name: album_user_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_user_updateId_idx" ON public.album_user USING btree ("updateId");
+CREATE INDEX "album_user_updateId_idx" ON album_user USING btree ("updateId");
--
-- Name: album_user_userId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "album_user_userId_idx" ON public.album_user USING btree ("userId");
+CREATE INDEX "album_user_userId_idx" ON album_user USING btree ("userId");
--
-- Name: api_key_key_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX api_key_key_idx ON public.api_key USING btree (key);
+CREATE INDEX api_key_key_idx ON api_key USING btree (key);
--
-- Name: api_key_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "api_key_updateId_idx" ON public.api_key USING btree ("updateId");
+CREATE INDEX "api_key_updateId_idx" ON api_key USING btree ("updateId");
--
-- Name: api_key_userId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "api_key_userId_idx" ON public.api_key USING btree ("userId");
+CREATE INDEX "api_key_userId_idx" ON api_key USING btree ("userId");
--
-- Name: asset_audit_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_audit_assetId_idx" ON public.asset_audit USING btree ("assetId");
+CREATE INDEX "asset_audit_assetId_idx" ON asset_audit USING btree ("assetId");
--
-- Name: asset_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_audit_deletedAt_idx" ON public.asset_audit USING btree ("deletedAt");
+CREATE INDEX "asset_audit_deletedAt_idx" ON asset_audit USING btree ("deletedAt");
--
-- Name: asset_audit_ownerId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_audit_ownerId_idx" ON public.asset_audit USING btree ("ownerId");
+CREATE INDEX "asset_audit_ownerId_idx" ON asset_audit USING btree ("ownerId");
--
-- Name: asset_checksum_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX asset_checksum_idx ON public.asset USING btree (checksum);
+CREATE INDEX asset_checksum_idx ON asset USING btree (checksum);
--
-- Name: asset_createdAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_createdAt_idx" ON public.asset USING btree ("createdAt");
+CREATE INDEX "asset_createdAt_idx" ON asset USING btree ("createdAt");
--
-- Name: asset_duplicateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_duplicateId_idx" ON public.asset USING btree ("duplicateId");
+CREATE INDEX "asset_duplicateId_idx" ON asset USING btree ("duplicateId");
--
-- Name: asset_edit_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_edit_assetId_idx" ON public.asset_edit USING btree ("assetId");
+CREATE INDEX "asset_edit_assetId_idx" ON asset_edit USING btree ("assetId");
--
-- Name: asset_edit_audit_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_edit_audit_assetId_idx" ON public.asset_edit_audit USING btree ("assetId");
+CREATE INDEX "asset_edit_audit_assetId_idx" ON asset_edit_audit USING btree ("assetId");
--
-- Name: asset_edit_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_edit_audit_deletedAt_idx" ON public.asset_edit_audit USING btree ("deletedAt");
+CREATE INDEX "asset_edit_audit_deletedAt_idx" ON asset_edit_audit USING btree ("deletedAt");
--
-- Name: asset_edit_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_edit_updateId_idx" ON public.asset_edit USING btree ("updateId");
+CREATE INDEX "asset_edit_updateId_idx" ON asset_edit USING btree ("updateId");
--
-- Name: asset_exif_autoStackId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_exif_autoStackId_idx" ON public.asset_exif USING btree ("autoStackId");
+CREATE INDEX "asset_exif_autoStackId_idx" ON asset_exif USING btree ("autoStackId");
--
-- Name: asset_exif_city_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX asset_exif_city_idx ON public.asset_exif USING btree (city);
+CREATE INDEX asset_exif_city_idx ON asset_exif USING btree (city);
--
-- Name: asset_exif_livePhotoCID_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_exif_livePhotoCID_idx" ON public.asset_exif USING btree ("livePhotoCID");
+CREATE INDEX "asset_exif_livePhotoCID_idx" ON asset_exif USING btree ("livePhotoCID");
--
-- Name: asset_exif_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_exif_updateId_idx" ON public.asset_exif USING btree ("updateId");
+CREATE INDEX "asset_exif_updateId_idx" ON asset_exif USING btree ("updateId");
--
-- Name: asset_face_assetId_personGroupId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_face_assetId_personGroupId_idx" ON public.asset_face USING btree ("assetId", "personGroupId");
+CREATE INDEX "asset_face_assetId_personGroupId_idx" ON asset_face USING btree ("assetId", "personGroupId");
--
-- Name: asset_face_audit_assetFaceId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_face_audit_assetFaceId_idx" ON public.asset_face_audit USING btree ("assetFaceId");
+CREATE INDEX "asset_face_audit_assetFaceId_idx" ON asset_face_audit USING btree ("assetFaceId");
--
-- Name: asset_face_audit_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_face_audit_assetId_idx" ON public.asset_face_audit USING btree ("assetId");
+CREATE INDEX "asset_face_audit_assetId_idx" ON asset_face_audit USING btree ("assetId");
--
-- Name: asset_face_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_face_audit_deletedAt_idx" ON public.asset_face_audit USING btree ("deletedAt");
+CREATE INDEX "asset_face_audit_deletedAt_idx" ON asset_face_audit USING btree ("deletedAt");
--
-- Name: asset_face_personGroupId_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_face_personGroupId_assetId_idx" ON public.asset_face USING btree ("personGroupId", "assetId");
+CREATE INDEX "asset_face_personGroupId_assetId_idx" ON asset_face USING btree ("personGroupId", "assetId");
--
-- Name: asset_face_personGroupId_assetId_notDeleted_isVisible_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_face_personGroupId_assetId_notDeleted_isVisible_idx" ON public.asset_face USING btree ("personGroupId", "assetId") WHERE (("deletedAt" IS NULL) AND ("isVisible" IS TRUE));
+CREATE INDEX "asset_face_personGroupId_assetId_notDeleted_isVisible_idx" ON asset_face USING btree ("personGroupId", "assetId") WHERE (("deletedAt" IS NULL) AND ("isVisible" IS TRUE));
--
-- Name: asset_fileCreatedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_fileCreatedAt_idx" ON public.asset USING btree ("fileCreatedAt");
+CREATE INDEX "asset_fileCreatedAt_idx" ON asset USING btree ("fileCreatedAt");
--
-- Name: asset_file_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_file_assetId_idx" ON public.asset_file USING btree ("assetId");
+CREATE INDEX "asset_file_assetId_idx" ON asset_file USING btree ("assetId");
--
-- Name: asset_file_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_file_updateId_idx" ON public.asset_file USING btree ("updateId");
+CREATE INDEX "asset_file_updateId_idx" ON asset_file USING btree ("updateId");
--
-- Name: asset_id_stackId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_id_stackId_idx" ON public.asset USING btree (id, "stackId");
+CREATE INDEX "asset_id_stackId_idx" ON asset USING btree (id, "stackId");
--
-- Name: asset_id_timeline_notDeleted_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_id_timeline_notDeleted_idx" ON public.asset USING btree (id) WHERE ((visibility = 'timeline'::public.asset_visibility_enum) AND ("deletedAt" IS NULL));
+CREATE INDEX "asset_id_timeline_notDeleted_idx" ON asset USING btree (id) WHERE ((visibility = 'timeline'::public.asset_visibility_enum) AND ("deletedAt" IS NULL));
--
-- Name: asset_libraryId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_libraryId_idx" ON public.asset USING btree ("libraryId");
+CREATE INDEX "asset_libraryId_idx" ON asset USING btree ("libraryId");
--
-- Name: asset_livePhotoVideoId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_livePhotoVideoId_idx" ON public.asset USING btree ("livePhotoVideoId");
+CREATE INDEX "asset_livePhotoVideoId_idx" ON asset USING btree ("livePhotoVideoId");
--
-- Name: asset_localDateTime_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_localDateTime_idx" ON public.asset USING btree (((("localDateTime" AT TIME ZONE 'UTC'::text))::date));
+CREATE INDEX "asset_localDateTime_idx" ON asset USING btree (((("localDateTime" AT TIME ZONE 'UTC'::text))::date));
--
-- Name: asset_localDateTime_month_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_localDateTime_month_idx" ON public.asset USING btree ((date_trunc('MONTH'::text, ("localDateTime" AT TIME ZONE 'UTC'::text)) AT TIME ZONE 'UTC'::text));
+CREATE INDEX "asset_localDateTime_month_idx" ON asset USING btree ((date_trunc('MONTH'::text, ("localDateTime" AT TIME ZONE 'UTC'::text)) AT TIME ZONE 'UTC'::text));
--
-- Name: asset_metadata_audit_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_metadata_audit_assetId_idx" ON public.asset_metadata_audit USING btree ("assetId");
+CREATE INDEX "asset_metadata_audit_assetId_idx" ON asset_metadata_audit USING btree ("assetId");
--
-- Name: asset_metadata_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_metadata_audit_deletedAt_idx" ON public.asset_metadata_audit USING btree ("deletedAt");
+CREATE INDEX "asset_metadata_audit_deletedAt_idx" ON asset_metadata_audit USING btree ("deletedAt");
--
-- Name: asset_metadata_audit_key_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX asset_metadata_audit_key_idx ON public.asset_metadata_audit USING btree (key);
+CREATE INDEX asset_metadata_audit_key_idx ON asset_metadata_audit USING btree (key);
--
-- Name: asset_metadata_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_metadata_updateId_idx" ON public.asset_metadata USING btree ("updateId");
+CREATE INDEX "asset_metadata_updateId_idx" ON asset_metadata USING btree ("updateId");
--
-- Name: asset_metadata_updatedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_metadata_updatedAt_idx" ON public.asset_metadata USING btree ("updatedAt");
+CREATE INDEX "asset_metadata_updatedAt_idx" ON asset_metadata USING btree ("updatedAt");
--
-- Name: asset_ocr_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_ocr_assetId_idx" ON public.asset_ocr USING btree ("assetId");
+CREATE INDEX "asset_ocr_assetId_idx" ON asset_ocr USING btree ("assetId");
--
-- Name: asset_ocr_audit_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_ocr_audit_assetId_idx" ON public.asset_ocr_audit USING btree ("assetId");
+CREATE INDEX "asset_ocr_audit_assetId_idx" ON asset_ocr_audit USING btree ("assetId");
--
-- Name: asset_ocr_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_ocr_audit_deletedAt_idx" ON public.asset_ocr_audit USING btree ("deletedAt");
+CREATE INDEX "asset_ocr_audit_deletedAt_idx" ON asset_ocr_audit USING btree ("deletedAt");
--
-- Name: asset_ocr_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_ocr_updateId_idx" ON public.asset_ocr USING btree ("updateId");
+CREATE INDEX "asset_ocr_updateId_idx" ON asset_ocr USING btree ("updateId");
--
-- Name: asset_originalFileName_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_originalFileName_idx" ON public.asset USING btree ("originalFileName");
+CREATE INDEX "asset_originalFileName_idx" ON asset USING btree ("originalFileName");
--
-- Name: asset_originalFilename_trigram_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_originalFilename_trigram_idx" ON public.asset USING gin (public.f_unaccent(("originalFileName")::text) public.gin_trgm_ops);
+CREATE INDEX "asset_originalFilename_trigram_idx" ON asset USING gin (public.f_unaccent(("originalFileName")::text) gin_trgm_ops);
--
-- Name: asset_originalPath_libraryId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_originalPath_libraryId_idx" ON public.asset USING btree ("originalPath", "libraryId");
+CREATE INDEX "asset_originalPath_libraryId_idx" ON asset USING btree ("originalPath", "libraryId");
--
-- Name: asset_ownerId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_ownerId_idx" ON public.asset USING btree ("ownerId");
+CREATE INDEX "asset_ownerId_idx" ON asset USING btree ("ownerId");
--
-- Name: asset_ownerId_libraryId_checksum_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE UNIQUE INDEX "asset_ownerId_libraryId_checksum_idx" ON public.asset USING btree ("ownerId", "libraryId", checksum) WHERE ("libraryId" IS NOT NULL);
+CREATE UNIQUE INDEX "asset_ownerId_libraryId_checksum_idx" ON asset USING btree ("ownerId", "libraryId", checksum) WHERE ("libraryId" IS NOT NULL);
--
-- Name: asset_stackId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_stackId_idx" ON public.asset USING btree ("stackId");
+CREATE INDEX "asset_stackId_idx" ON asset USING btree ("stackId");
--
-- Name: asset_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "asset_updateId_idx" ON public.asset USING btree ("updateId");
+CREATE INDEX "asset_updateId_idx" ON asset USING btree ("updateId");
--
-- Name: clip_index; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX clip_index ON public.smart_search USING vchordrq (embedding public.vector_cosine_ops) WITH (options='
+CREATE INDEX clip_index ON smart_search USING vchordrq (embedding vector_cosine_ops) WITH (options='
residual_quantization = false
[build.internal]
lists = [1]
@@ -3140,28 +3169,28 @@ CREATE INDEX clip_index ON public.smart_search USING vchordrq (embedding public.
-- Name: cluster_group_request_clusterGroupId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "cluster_group_request_clusterGroupId_idx" ON public.cluster_group_request USING btree ("clusterGroupId");
+CREATE INDEX "cluster_group_request_clusterGroupId_idx" ON cluster_group_request USING btree ("clusterGroupId");
--
-- Name: cluster_group_request_userId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "cluster_group_request_userId_idx" ON public.cluster_group_request USING btree ("userId");
+CREATE INDEX "cluster_group_request_userId_idx" ON cluster_group_request USING btree ("userId");
--
-- Name: cluster_group_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "cluster_group_updateId_idx" ON public.cluster_group USING btree ("updateId");
+CREATE INDEX "cluster_group_updateId_idx" ON cluster_group USING btree ("updateId");
--
-- Name: face_index; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX face_index ON public.face_search USING vchordrq (embedding public.vector_cosine_ops) WITH (options='
+CREATE INDEX face_index ON face_search USING vchordrq (embedding vector_cosine_ops) WITH (options='
residual_quantization = false
[build.internal]
lists = [1]
@@ -3175,1434 +3204,1434 @@ CREATE INDEX face_index ON public.face_search USING vchordrq (embedding public.v
-- Name: idx_geodata_places_admin1_name; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX idx_geodata_places_admin1_name ON public.geodata_places USING gin (public.f_unaccent(("admin1Name")::text) public.gin_trgm_ops);
+CREATE INDEX idx_geodata_places_admin1_name ON geodata_places USING gin (public.f_unaccent(("admin1Name")::text) gin_trgm_ops);
--
-- Name: idx_geodata_places_admin2_name; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX idx_geodata_places_admin2_name ON public.geodata_places USING gin (public.f_unaccent(("admin2Name")::text) public.gin_trgm_ops);
+CREATE INDEX idx_geodata_places_admin2_name ON geodata_places USING gin (public.f_unaccent(("admin2Name")::text) gin_trgm_ops);
--
-- Name: idx_geodata_places_alternate_names; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX idx_geodata_places_alternate_names ON public.geodata_places USING gin (public.f_unaccent(("alternateNames")::text) public.gin_trgm_ops);
+CREATE INDEX idx_geodata_places_alternate_names ON geodata_places USING gin (public.f_unaccent(("alternateNames")::text) gin_trgm_ops);
--
-- Name: idx_geodata_places_name; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX idx_geodata_places_name ON public.geodata_places USING gin (public.f_unaccent((name)::text) public.gin_trgm_ops);
+CREATE INDEX idx_geodata_places_name ON geodata_places USING gin (public.f_unaccent((name)::text) gin_trgm_ops);
--
-- Name: idx_ocr_search_text; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX idx_ocr_search_text ON public.ocr_search USING gin (public.f_unaccent(text) public.gin_trgm_ops);
+CREATE INDEX idx_ocr_search_text ON ocr_search USING gin (public.f_unaccent(text) gin_trgm_ops);
--
-- Name: idx_person_name_trigram; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX idx_person_name_trigram ON public.person USING gin (public.f_unaccent((name)::text) public.gin_trgm_ops);
+CREATE INDEX idx_person_name_trigram ON person USING gin (public.f_unaccent((name)::text) gin_trgm_ops);
--
-- Name: integrity_report_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "integrity_report_assetId_idx" ON public.integrity_report USING btree ("assetId");
+CREATE INDEX "integrity_report_assetId_idx" ON integrity_report USING btree ("assetId");
--
-- Name: integrity_report_fileAssetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "integrity_report_fileAssetId_idx" ON public.integrity_report USING btree ("fileAssetId");
+CREATE INDEX "integrity_report_fileAssetId_idx" ON integrity_report USING btree ("fileAssetId");
--
-- Name: library_ownerId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "library_ownerId_idx" ON public.library USING btree ("ownerId");
+CREATE INDEX "library_ownerId_idx" ON library USING btree ("ownerId");
--
-- Name: library_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "library_updateId_idx" ON public.library USING btree ("updateId");
+CREATE INDEX "library_updateId_idx" ON library USING btree ("updateId");
--
-- Name: memory_asset_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "memory_asset_assetId_idx" ON public.memory_asset USING btree ("assetId");
+CREATE INDEX "memory_asset_assetId_idx" ON memory_asset USING btree ("assetId");
--
-- Name: memory_asset_audit_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "memory_asset_audit_assetId_idx" ON public.memory_asset_audit USING btree ("assetId");
+CREATE INDEX "memory_asset_audit_assetId_idx" ON memory_asset_audit USING btree ("assetId");
--
-- Name: memory_asset_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "memory_asset_audit_deletedAt_idx" ON public.memory_asset_audit USING btree ("deletedAt");
+CREATE INDEX "memory_asset_audit_deletedAt_idx" ON memory_asset_audit USING btree ("deletedAt");
--
-- Name: memory_asset_audit_memoryId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "memory_asset_audit_memoryId_idx" ON public.memory_asset_audit USING btree ("memoryId");
+CREATE INDEX "memory_asset_audit_memoryId_idx" ON memory_asset_audit USING btree ("memoryId");
--
-- Name: memory_asset_memoriesId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "memory_asset_memoriesId_idx" ON public.memory_asset USING btree ("memoriesId");
+CREATE INDEX "memory_asset_memoriesId_idx" ON memory_asset USING btree ("memoriesId");
--
-- Name: memory_asset_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "memory_asset_updateId_idx" ON public.memory_asset USING btree ("updateId");
+CREATE INDEX "memory_asset_updateId_idx" ON memory_asset USING btree ("updateId");
--
-- Name: memory_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "memory_audit_deletedAt_idx" ON public.memory_audit USING btree ("deletedAt");
+CREATE INDEX "memory_audit_deletedAt_idx" ON memory_audit USING btree ("deletedAt");
--
-- Name: memory_audit_memoryId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "memory_audit_memoryId_idx" ON public.memory_audit USING btree ("memoryId");
+CREATE INDEX "memory_audit_memoryId_idx" ON memory_audit USING btree ("memoryId");
--
-- Name: memory_audit_userId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "memory_audit_userId_idx" ON public.memory_audit USING btree ("userId");
+CREATE INDEX "memory_audit_userId_idx" ON memory_audit USING btree ("userId");
--
-- Name: memory_ownerId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "memory_ownerId_idx" ON public.memory USING btree ("ownerId");
+CREATE INDEX "memory_ownerId_idx" ON memory USING btree ("ownerId");
--
-- Name: memory_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "memory_updateId_idx" ON public.memory USING btree ("updateId");
+CREATE INDEX "memory_updateId_idx" ON memory USING btree ("updateId");
--
-- Name: notification_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "notification_updateId_idx" ON public.notification USING btree ("updateId");
+CREATE INDEX "notification_updateId_idx" ON notification USING btree ("updateId");
--
-- Name: notification_userId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "notification_userId_idx" ON public.notification USING btree ("userId");
+CREATE INDEX "notification_userId_idx" ON notification USING btree ("userId");
--
-- Name: partner_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "partner_audit_deletedAt_idx" ON public.partner_audit USING btree ("deletedAt");
+CREATE INDEX "partner_audit_deletedAt_idx" ON partner_audit USING btree ("deletedAt");
--
-- Name: partner_audit_sharedById_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "partner_audit_sharedById_idx" ON public.partner_audit USING btree ("sharedById");
+CREATE INDEX "partner_audit_sharedById_idx" ON partner_audit USING btree ("sharedById");
--
-- Name: partner_audit_sharedWithId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "partner_audit_sharedWithId_idx" ON public.partner_audit USING btree ("sharedWithId");
+CREATE INDEX "partner_audit_sharedWithId_idx" ON partner_audit USING btree ("sharedWithId");
--
-- Name: partner_createId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "partner_createId_idx" ON public.partner USING btree ("createId");
+CREATE INDEX "partner_createId_idx" ON partner USING btree ("createId");
--
-- Name: partner_sharedWithId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "partner_sharedWithId_idx" ON public.partner USING btree ("sharedWithId");
+CREATE INDEX "partner_sharedWithId_idx" ON partner USING btree ("sharedWithId");
--
-- Name: partner_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "partner_updateId_idx" ON public.partner USING btree ("updateId");
+CREATE INDEX "partner_updateId_idx" ON partner USING btree ("updateId");
--
-- Name: person_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "person_audit_deletedAt_idx" ON public.person_audit USING btree ("deletedAt");
+CREATE INDEX "person_audit_deletedAt_idx" ON person_audit USING btree ("deletedAt");
--
-- Name: person_audit_ownerId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "person_audit_ownerId_idx" ON public.person_audit USING btree ("ownerId");
+CREATE INDEX "person_audit_ownerId_idx" ON person_audit USING btree ("ownerId");
--
-- Name: person_audit_personGroupId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "person_audit_personGroupId_idx" ON public.person_audit USING btree ("personGroupId");
+CREATE INDEX "person_audit_personGroupId_idx" ON person_audit USING btree ("personGroupId");
--
-- Name: person_faceAssetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "person_faceAssetId_idx" ON public.person USING btree ("faceAssetId");
+CREATE INDEX "person_faceAssetId_idx" ON person USING btree ("faceAssetId");
--
-- Name: person_group_audit_clusterGroupId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "person_group_audit_clusterGroupId_idx" ON public.person_group_audit USING btree ("clusterGroupId");
+CREATE INDEX "person_group_audit_clusterGroupId_idx" ON person_group_audit USING btree ("clusterGroupId");
--
-- Name: person_group_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "person_group_audit_deletedAt_idx" ON public.person_group_audit USING btree ("deletedAt");
+CREATE INDEX "person_group_audit_deletedAt_idx" ON person_group_audit USING btree ("deletedAt");
--
-- Name: person_group_audit_personGroupId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "person_group_audit_personGroupId_idx" ON public.person_group_audit USING btree ("personGroupId");
+CREATE INDEX "person_group_audit_personGroupId_idx" ON person_group_audit USING btree ("personGroupId");
--
-- Name: person_group_clusterGroupId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "person_group_clusterGroupId_idx" ON public.person_group USING btree ("clusterGroupId");
+CREATE INDEX "person_group_clusterGroupId_idx" ON person_group USING btree ("clusterGroupId");
--
-- Name: person_group_createId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "person_group_createId_idx" ON public.person_group USING btree ("createId");
+CREATE INDEX "person_group_createId_idx" ON person_group USING btree ("createId");
--
-- Name: person_group_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "person_group_updateId_idx" ON public.person_group USING btree ("updateId");
+CREATE INDEX "person_group_updateId_idx" ON person_group USING btree ("updateId");
--
-- Name: person_personGroupId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "person_personGroupId_idx" ON public.person USING btree ("personGroupId");
+CREATE INDEX "person_personGroupId_idx" ON person USING btree ("personGroupId");
--
-- Name: person_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "person_updateId_idx" ON public.person USING btree ("updateId");
+CREATE INDEX "person_updateId_idx" ON person USING btree ("updateId");
--
-- Name: plugin_method_pluginId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "plugin_method_pluginId_idx" ON public.plugin_method USING btree ("pluginId");
+CREATE INDEX "plugin_method_pluginId_idx" ON plugin_method USING btree ("pluginId");
--
-- Name: plugin_name_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX plugin_name_idx ON public.plugin USING btree (name);
+CREATE INDEX plugin_name_idx ON plugin USING btree (name);
--
-- Name: session_oauthSid_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "session_oauthSid_idx" ON public.session USING btree ("oauthSid");
+CREATE INDEX "session_oauthSid_idx" ON session USING btree ("oauthSid");
--
-- Name: session_parentId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "session_parentId_idx" ON public.session USING btree ("parentId");
+CREATE INDEX "session_parentId_idx" ON session USING btree ("parentId");
--
-- Name: session_sync_checkpoint_sessionId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "session_sync_checkpoint_sessionId_idx" ON public.session_sync_checkpoint USING btree ("sessionId");
+CREATE INDEX "session_sync_checkpoint_sessionId_idx" ON session_sync_checkpoint USING btree ("sessionId");
--
-- Name: session_sync_checkpoint_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "session_sync_checkpoint_updateId_idx" ON public.session_sync_checkpoint USING btree ("updateId");
+CREATE INDEX "session_sync_checkpoint_updateId_idx" ON session_sync_checkpoint USING btree ("updateId");
--
-- Name: session_token_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX session_token_idx ON public.session USING btree (token);
+CREATE INDEX session_token_idx ON session USING btree (token);
--
-- Name: session_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "session_updateId_idx" ON public.session USING btree ("updateId");
+CREATE INDEX "session_updateId_idx" ON session USING btree ("updateId");
--
-- Name: session_userId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "session_userId_idx" ON public.session USING btree ("userId");
+CREATE INDEX "session_userId_idx" ON session USING btree ("userId");
--
-- Name: shared_link_albumId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "shared_link_albumId_idx" ON public.shared_link USING btree ("albumId");
+CREATE INDEX "shared_link_albumId_idx" ON shared_link USING btree ("albumId");
--
-- Name: shared_link_asset_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "shared_link_asset_assetId_idx" ON public.shared_link_asset USING btree ("assetId");
+CREATE INDEX "shared_link_asset_assetId_idx" ON shared_link_asset USING btree ("assetId");
--
-- Name: shared_link_asset_sharedLinkId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "shared_link_asset_sharedLinkId_idx" ON public.shared_link_asset USING btree ("sharedLinkId");
+CREATE INDEX "shared_link_asset_sharedLinkId_idx" ON shared_link_asset USING btree ("sharedLinkId");
--
-- Name: shared_link_key_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX shared_link_key_idx ON public.shared_link USING btree (key);
+CREATE INDEX shared_link_key_idx ON shared_link USING btree (key);
--
-- Name: shared_link_userId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "shared_link_userId_idx" ON public.shared_link USING btree ("userId");
+CREATE INDEX "shared_link_userId_idx" ON shared_link USING btree ("userId");
--
-- Name: stack_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "stack_audit_deletedAt_idx" ON public.stack_audit USING btree ("deletedAt");
+CREATE INDEX "stack_audit_deletedAt_idx" ON stack_audit USING btree ("deletedAt");
--
-- Name: stack_ownerId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "stack_ownerId_idx" ON public.stack USING btree ("ownerId");
+CREATE INDEX "stack_ownerId_idx" ON stack USING btree ("ownerId");
--
-- Name: stack_primaryAssetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "stack_primaryAssetId_idx" ON public.stack USING btree ("primaryAssetId");
+CREATE INDEX "stack_primaryAssetId_idx" ON stack USING btree ("primaryAssetId");
--
-- Name: tag_asset_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "tag_asset_assetId_idx" ON public.tag_asset USING btree ("assetId");
+CREATE INDEX "tag_asset_assetId_idx" ON tag_asset USING btree ("assetId");
--
-- Name: tag_asset_assetId_tagId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "tag_asset_assetId_tagId_idx" ON public.tag_asset USING btree ("assetId", "tagId");
+CREATE INDEX "tag_asset_assetId_tagId_idx" ON tag_asset USING btree ("assetId", "tagId");
--
-- Name: tag_asset_tagId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "tag_asset_tagId_idx" ON public.tag_asset USING btree ("tagId");
+CREATE INDEX "tag_asset_tagId_idx" ON tag_asset USING btree ("tagId");
--
-- Name: tag_closure_id_ancestor_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX tag_closure_id_ancestor_idx ON public.tag_closure USING btree (id_ancestor);
+CREATE INDEX tag_closure_id_ancestor_idx ON tag_closure USING btree (id_ancestor);
--
-- Name: tag_closure_id_descendant_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX tag_closure_id_descendant_idx ON public.tag_closure USING btree (id_descendant);
+CREATE INDEX tag_closure_id_descendant_idx ON tag_closure USING btree (id_descendant);
--
-- Name: tag_parentId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "tag_parentId_idx" ON public.tag USING btree ("parentId");
+CREATE INDEX "tag_parentId_idx" ON tag USING btree ("parentId");
--
-- Name: tag_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "tag_updateId_idx" ON public.tag USING btree ("updateId");
+CREATE INDEX "tag_updateId_idx" ON tag USING btree ("updateId");
--
-- Name: user_audit_deletedAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "user_audit_deletedAt_idx" ON public.user_audit USING btree ("deletedAt");
+CREATE INDEX "user_audit_deletedAt_idx" ON user_audit USING btree ("deletedAt");
--
-- Name: user_clusterGroupId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "user_clusterGroupId_idx" ON public."user" USING btree ("clusterGroupId");
+CREATE INDEX "user_clusterGroupId_idx" ON "user" USING btree ("clusterGroupId");
--
-- Name: user_updateId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "user_updateId_idx" ON public."user" USING btree ("updateId");
+CREATE INDEX "user_updateId_idx" ON "user" USING btree ("updateId");
--
-- Name: user_updatedAt_id_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "user_updatedAt_id_idx" ON public."user" USING btree ("updatedAt", id);
+CREATE INDEX "user_updatedAt_id_idx" ON "user" USING btree ("updatedAt", id);
--
-- Name: video_stream_session_assetId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "video_stream_session_assetId_idx" ON public.video_stream_session USING btree ("assetId");
+CREATE INDEX "video_stream_session_assetId_idx" ON video_stream_session USING btree ("assetId");
--
-- Name: video_stream_session_expiresAt_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "video_stream_session_expiresAt_idx" ON public.video_stream_session USING btree ("expiresAt");
+CREATE INDEX "video_stream_session_expiresAt_idx" ON video_stream_session USING btree ("expiresAt");
--
-- Name: video_stream_variant_sessionId_bitrate_resolution_codec_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE UNIQUE INDEX "video_stream_variant_sessionId_bitrate_resolution_codec_idx" ON public.video_stream_variant USING btree ("sessionId", bitrate, resolution, codec);
+CREATE UNIQUE INDEX "video_stream_variant_sessionId_bitrate_resolution_codec_idx" ON video_stream_variant USING btree ("sessionId", bitrate, resolution, codec);
--
-- Name: workflow_log_workflowId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "workflow_log_workflowId_idx" ON public.workflow_log USING btree ("workflowId");
+CREATE INDEX "workflow_log_workflowId_idx" ON workflow_log USING btree ("workflowId");
--
-- Name: workflow_log_workflowStepId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "workflow_log_workflowStepId_idx" ON public.workflow_log USING btree ("workflowStepId");
+CREATE INDEX "workflow_log_workflowStepId_idx" ON workflow_log USING btree ("workflowStepId");
--
-- Name: workflow_ownerId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "workflow_ownerId_idx" ON public.workflow USING btree ("ownerId");
+CREATE INDEX "workflow_ownerId_idx" ON workflow USING btree ("ownerId");
--
-- Name: workflow_step_pluginMethodId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "workflow_step_pluginMethodId_idx" ON public.workflow_step USING btree ("pluginMethodId");
+CREATE INDEX "workflow_step_pluginMethodId_idx" ON workflow_step USING btree ("pluginMethodId");
--
-- Name: workflow_step_workflowId_idx; Type: INDEX; Schema: public; Owner: postgres
--
-CREATE INDEX "workflow_step_workflowId_idx" ON public.workflow_step USING btree ("workflowId");
+CREATE INDEX "workflow_step_workflowId_idx" ON workflow_step USING btree ("workflowId");
--
-- Name: activity activity_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "activity_updatedAt" BEFORE UPDATE ON public.activity FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "activity_updatedAt" BEFORE UPDATE ON activity FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: album_asset album_asset_delete_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER album_asset_delete_audit AFTER DELETE ON public.album_asset REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() <= 1)) EXECUTE FUNCTION public.album_asset_delete_audit();
+CREATE TRIGGER album_asset_delete_audit AFTER DELETE ON album_asset REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() <= 1)) EXECUTE FUNCTION album_asset_delete_audit();
--
-- Name: album_asset album_asset_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "album_asset_updatedAt" BEFORE UPDATE ON public.album_asset FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "album_asset_updatedAt" BEFORE UPDATE ON album_asset FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: album album_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "album_updatedAt" BEFORE UPDATE ON public.album FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "album_updatedAt" BEFORE UPDATE ON album FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: album_user album_user_after_insert; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER album_user_after_insert AFTER INSERT ON public.album_user REFERENCING NEW TABLE AS inserted_rows FOR EACH STATEMENT EXECUTE FUNCTION public.album_user_after_insert();
+CREATE TRIGGER album_user_after_insert AFTER INSERT ON album_user REFERENCING NEW TABLE AS inserted_rows FOR EACH STATEMENT EXECUTE FUNCTION album_user_after_insert();
--
-- Name: album_user album_user_delete; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER album_user_delete AFTER DELETE ON public.album_user REFERENCING OLD TABLE AS old FOR EACH ROW EXECUTE FUNCTION public.album_user_delete();
+CREATE TRIGGER album_user_delete AFTER DELETE ON album_user REFERENCING OLD TABLE AS old FOR EACH ROW EXECUTE FUNCTION album_user_delete();
--
-- Name: album_user album_user_delete_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER album_user_delete_audit AFTER DELETE ON public.album_user REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() <= 1)) EXECUTE FUNCTION public.album_user_delete_audit();
+CREATE TRIGGER album_user_delete_audit AFTER DELETE ON album_user REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() <= 1)) EXECUTE FUNCTION album_user_delete_audit();
--
-- Name: album_user album_user_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "album_user_updatedAt" BEFORE UPDATE ON public.album_user FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "album_user_updatedAt" BEFORE UPDATE ON album_user FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: api_key api_key_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "api_key_updatedAt" BEFORE UPDATE ON public.api_key FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "api_key_updatedAt" BEFORE UPDATE ON api_key FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: asset asset_delete_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER asset_delete_audit AFTER DELETE ON public.asset REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION public.asset_delete_audit();
+CREATE TRIGGER asset_delete_audit AFTER DELETE ON asset REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION asset_delete_audit();
--
-- Name: asset_edit asset_edit_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER asset_edit_audit AFTER DELETE ON public.asset_edit REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION public.asset_edit_audit();
+CREATE TRIGGER asset_edit_audit AFTER DELETE ON asset_edit REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION asset_edit_audit();
--
-- Name: asset_edit asset_edit_delete; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER asset_edit_delete AFTER DELETE ON public.asset_edit REFERENCING OLD TABLE AS deleted_edit FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION public.asset_edit_delete();
+CREATE TRIGGER asset_edit_delete AFTER DELETE ON asset_edit REFERENCING OLD TABLE AS deleted_edit FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION asset_edit_delete();
--
-- Name: asset_edit asset_edit_insert; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER asset_edit_insert AFTER INSERT ON public.asset_edit REFERENCING NEW TABLE AS inserted_edit FOR EACH STATEMENT EXECUTE FUNCTION public.asset_edit_insert();
+CREATE TRIGGER asset_edit_insert AFTER INSERT ON asset_edit REFERENCING NEW TABLE AS inserted_edit FOR EACH STATEMENT EXECUTE FUNCTION asset_edit_insert();
--
-- Name: asset_edit asset_edit_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "asset_edit_updatedAt" BEFORE UPDATE ON public.asset_edit FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "asset_edit_updatedAt" BEFORE UPDATE ON asset_edit FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: asset_exif asset_exif_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "asset_exif_updatedAt" BEFORE UPDATE ON public.asset_exif FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "asset_exif_updatedAt" BEFORE UPDATE ON asset_exif FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: asset_face asset_face_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER asset_face_audit AFTER DELETE ON public.asset_face REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION public.asset_face_audit();
+CREATE TRIGGER asset_face_audit AFTER DELETE ON asset_face REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION asset_face_audit();
--
-- Name: asset_face asset_face_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "asset_face_updatedAt" BEFORE UPDATE ON public.asset_face FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "asset_face_updatedAt" BEFORE UPDATE ON asset_face FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: asset_file asset_file_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "asset_file_updatedAt" BEFORE UPDATE ON public.asset_file FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "asset_file_updatedAt" BEFORE UPDATE ON asset_file FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: asset_metadata asset_metadata_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER asset_metadata_audit AFTER DELETE ON public.asset_metadata REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION public.asset_metadata_audit();
+CREATE TRIGGER asset_metadata_audit AFTER DELETE ON asset_metadata REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION asset_metadata_audit();
--
-- Name: asset_metadata asset_metadata_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER asset_metadata_updated_at BEFORE UPDATE ON public.asset_metadata FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER asset_metadata_updated_at BEFORE UPDATE ON asset_metadata FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: asset_ocr asset_ocr_delete_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER asset_ocr_delete_audit AFTER DELETE ON public.asset_ocr REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION public.asset_ocr_delete_audit();
+CREATE TRIGGER asset_ocr_delete_audit AFTER DELETE ON asset_ocr REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION asset_ocr_delete_audit();
--
-- Name: asset_ocr asset_ocr_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "asset_ocr_updatedAt" BEFORE UPDATE ON public.asset_ocr FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "asset_ocr_updatedAt" BEFORE UPDATE ON asset_ocr FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: asset asset_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "asset_updatedAt" BEFORE UPDATE ON public.asset FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "asset_updatedAt" BEFORE UPDATE ON asset FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: cluster_group cluster_group_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "cluster_group_updatedAt" BEFORE UPDATE ON public.cluster_group FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "cluster_group_updatedAt" BEFORE UPDATE ON cluster_group FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: library library_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "library_updatedAt" BEFORE UPDATE ON public.library FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "library_updatedAt" BEFORE UPDATE ON library FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: memory_asset memory_asset_delete_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER memory_asset_delete_audit AFTER DELETE ON public.memory_asset REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() <= 1)) EXECUTE FUNCTION public.memory_asset_delete_audit();
+CREATE TRIGGER memory_asset_delete_audit AFTER DELETE ON memory_asset REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() <= 1)) EXECUTE FUNCTION memory_asset_delete_audit();
--
-- Name: memory_asset memory_asset_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "memory_asset_updatedAt" BEFORE UPDATE ON public.memory_asset FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "memory_asset_updatedAt" BEFORE UPDATE ON memory_asset FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: memory memory_delete_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER memory_delete_audit AFTER DELETE ON public.memory REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION public.memory_delete_audit();
+CREATE TRIGGER memory_delete_audit AFTER DELETE ON memory REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION memory_delete_audit();
--
-- Name: memory memory_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "memory_updatedAt" BEFORE UPDATE ON public.memory FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "memory_updatedAt" BEFORE UPDATE ON memory FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: notification notification_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "notification_updatedAt" BEFORE UPDATE ON public.notification FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "notification_updatedAt" BEFORE UPDATE ON notification FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: partner partner_delete_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER partner_delete_audit AFTER DELETE ON public.partner REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION public.partner_delete_audit();
+CREATE TRIGGER partner_delete_audit AFTER DELETE ON partner REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION partner_delete_audit();
--
-- Name: partner partner_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "partner_updatedAt" BEFORE UPDATE ON public.partner FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "partner_updatedAt" BEFORE UPDATE ON partner FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: person person_delete_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER person_delete_audit AFTER DELETE ON public.person REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() <= 1)) EXECUTE FUNCTION public.person_delete_audit();
+CREATE TRIGGER person_delete_audit AFTER DELETE ON person REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() <= 1)) EXECUTE FUNCTION person_delete_audit();
--
-- Name: person_group person_group_delete_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER person_group_delete_audit AFTER DELETE ON public.person_group REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION public.person_group_delete_audit();
+CREATE TRIGGER person_group_delete_audit AFTER DELETE ON person_group REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION person_group_delete_audit();
--
-- Name: person_group person_group_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "person_group_updatedAt" BEFORE UPDATE ON public.person_group FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "person_group_updatedAt" BEFORE UPDATE ON person_group FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: person person_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "person_updatedAt" BEFORE UPDATE ON public.person FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "person_updatedAt" BEFORE UPDATE ON person FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: session_sync_checkpoint session_sync_checkpoint_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "session_sync_checkpoint_updatedAt" BEFORE UPDATE ON public.session_sync_checkpoint FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "session_sync_checkpoint_updatedAt" BEFORE UPDATE ON session_sync_checkpoint FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: session session_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "session_updatedAt" BEFORE UPDATE ON public.session FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "session_updatedAt" BEFORE UPDATE ON session FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: stack stack_delete_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER stack_delete_audit AFTER DELETE ON public.stack REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION public.stack_delete_audit();
+CREATE TRIGGER stack_delete_audit AFTER DELETE ON stack REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION stack_delete_audit();
--
-- Name: stack stack_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "stack_updatedAt" BEFORE UPDATE ON public.stack FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "stack_updatedAt" BEFORE UPDATE ON stack FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: tag tag_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "tag_updatedAt" BEFORE UPDATE ON public.tag FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "tag_updatedAt" BEFORE UPDATE ON tag FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: user user_delete_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER user_delete_audit AFTER DELETE ON public."user" REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION public.user_delete_audit();
+CREATE TRIGGER user_delete_audit AFTER DELETE ON "user" REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION user_delete_audit();
--
-- Name: user_metadata user_metadata_audit; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER user_metadata_audit AFTER DELETE ON public.user_metadata REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION public.user_metadata_audit();
+CREATE TRIGGER user_metadata_audit AFTER DELETE ON user_metadata REFERENCING OLD TABLE AS old FOR EACH STATEMENT WHEN ((pg_trigger_depth() = 0)) EXECUTE FUNCTION user_metadata_audit();
--
-- Name: user_metadata user_metadata_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER user_metadata_updated_at BEFORE UPDATE ON public.user_metadata FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER user_metadata_updated_at BEFORE UPDATE ON user_metadata FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: user user_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "user_updatedAt" BEFORE UPDATE ON public."user" FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "user_updatedAt" BEFORE UPDATE ON "user" FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: workflow workflow_updatedAt; Type: TRIGGER; Schema: public; Owner: postgres
--
-CREATE TRIGGER "workflow_updatedAt" BEFORE UPDATE ON public.workflow FOR EACH ROW EXECUTE FUNCTION public.updated_at();
+CREATE TRIGGER "workflow_updatedAt" BEFORE UPDATE ON workflow FOR EACH ROW EXECUTE FUNCTION updated_at();
--
-- Name: activity activity_albumId_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.activity
- ADD CONSTRAINT "activity_albumId_assetId_fkey" FOREIGN KEY ("albumId", "assetId") REFERENCES public.album_asset("albumId", "assetId") ON DELETE CASCADE;
+ALTER TABLE ONLY activity
+ ADD CONSTRAINT "activity_albumId_assetId_fkey" FOREIGN KEY ("albumId", "assetId") REFERENCES album_asset("albumId", "assetId") ON DELETE CASCADE;
--
-- Name: activity activity_albumId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.activity
- ADD CONSTRAINT "activity_albumId_fkey" FOREIGN KEY ("albumId") REFERENCES public.album(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY activity
+ ADD CONSTRAINT "activity_albumId_fkey" FOREIGN KEY ("albumId") REFERENCES album(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: activity activity_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.activity
- ADD CONSTRAINT "activity_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY activity
+ ADD CONSTRAINT "activity_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: activity activity_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.activity
- ADD CONSTRAINT "activity_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY activity
+ ADD CONSTRAINT "activity_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: album album_albumThumbnailAssetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.album
- ADD CONSTRAINT "album_albumThumbnailAssetId_fkey" FOREIGN KEY ("albumThumbnailAssetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE SET NULL;
+ALTER TABLE ONLY album
+ ADD CONSTRAINT "album_albumThumbnailAssetId_fkey" FOREIGN KEY ("albumThumbnailAssetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: album_asset album_asset_albumId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.album_asset
- ADD CONSTRAINT "album_asset_albumId_fkey" FOREIGN KEY ("albumId") REFERENCES public.album(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY album_asset
+ ADD CONSTRAINT "album_asset_albumId_fkey" FOREIGN KEY ("albumId") REFERENCES album(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: album_asset album_asset_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.album_asset
- ADD CONSTRAINT "album_asset_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY album_asset
+ ADD CONSTRAINT "album_asset_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: album_asset_audit album_asset_audit_albumId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.album_asset_audit
- ADD CONSTRAINT "album_asset_audit_albumId_fkey" FOREIGN KEY ("albumId") REFERENCES public.album(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY album_asset_audit
+ ADD CONSTRAINT "album_asset_audit_albumId_fkey" FOREIGN KEY ("albumId") REFERENCES album(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: album_user album_user_albumId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.album_user
- ADD CONSTRAINT "album_user_albumId_fkey" FOREIGN KEY ("albumId") REFERENCES public.album(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY album_user
+ ADD CONSTRAINT "album_user_albumId_fkey" FOREIGN KEY ("albumId") REFERENCES album(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: album_user album_user_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.album_user
- ADD CONSTRAINT "album_user_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY album_user
+ ADD CONSTRAINT "album_user_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: api_key api_key_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.api_key
- ADD CONSTRAINT "api_key_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY api_key
+ ADD CONSTRAINT "api_key_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: asset_audio asset_audio_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_audio
- ADD CONSTRAINT "asset_audio_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON DELETE CASCADE;
+ALTER TABLE ONLY asset_audio
+ ADD CONSTRAINT "asset_audio_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON DELETE CASCADE;
--
-- Name: asset_edit asset_edit_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_edit
- ADD CONSTRAINT "asset_edit_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY asset_edit
+ ADD CONSTRAINT "asset_edit_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: asset_exif asset_exif_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_exif
- ADD CONSTRAINT "asset_exif_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON DELETE CASCADE;
+ALTER TABLE ONLY asset_exif
+ ADD CONSTRAINT "asset_exif_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON DELETE CASCADE;
--
-- Name: asset_face asset_face_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_face
- ADD CONSTRAINT "asset_face_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY asset_face
+ ADD CONSTRAINT "asset_face_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: asset_face asset_face_personGroupId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_face
- ADD CONSTRAINT "asset_face_personGroupId_fkey" FOREIGN KEY ("personGroupId") REFERENCES public.person_group(id) ON UPDATE CASCADE ON DELETE SET NULL;
+ALTER TABLE ONLY asset_face
+ ADD CONSTRAINT "asset_face_personGroupId_fkey" FOREIGN KEY ("personGroupId") REFERENCES person_group(id) ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: asset_file asset_file_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_file
- ADD CONSTRAINT "asset_file_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY asset_file
+ ADD CONSTRAINT "asset_file_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: asset_job_status asset_job_status_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_job_status
- ADD CONSTRAINT "asset_job_status_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY asset_job_status
+ ADD CONSTRAINT "asset_job_status_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: asset_keyframe asset_keyframe_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_keyframe
- ADD CONSTRAINT "asset_keyframe_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON DELETE CASCADE;
+ALTER TABLE ONLY asset_keyframe
+ ADD CONSTRAINT "asset_keyframe_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON DELETE CASCADE;
--
-- Name: asset asset_libraryId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset
- ADD CONSTRAINT "asset_libraryId_fkey" FOREIGN KEY ("libraryId") REFERENCES public.library(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY asset
+ ADD CONSTRAINT "asset_libraryId_fkey" FOREIGN KEY ("libraryId") REFERENCES library(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: asset asset_livePhotoVideoId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset
- ADD CONSTRAINT "asset_livePhotoVideoId_fkey" FOREIGN KEY ("livePhotoVideoId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE SET NULL;
+ALTER TABLE ONLY asset
+ ADD CONSTRAINT "asset_livePhotoVideoId_fkey" FOREIGN KEY ("livePhotoVideoId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: asset_metadata asset_metadata_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_metadata
- ADD CONSTRAINT "asset_metadata_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY asset_metadata
+ ADD CONSTRAINT "asset_metadata_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: asset_ocr asset_ocr_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_ocr
- ADD CONSTRAINT "asset_ocr_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY asset_ocr
+ ADD CONSTRAINT "asset_ocr_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: asset asset_ownerId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset
- ADD CONSTRAINT "asset_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY asset
+ ADD CONSTRAINT "asset_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: asset asset_stackId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset
- ADD CONSTRAINT "asset_stackId_fkey" FOREIGN KEY ("stackId") REFERENCES public.stack(id) ON UPDATE CASCADE ON DELETE SET NULL;
+ALTER TABLE ONLY asset
+ ADD CONSTRAINT "asset_stackId_fkey" FOREIGN KEY ("stackId") REFERENCES stack(id) ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: asset_video asset_video_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.asset_video
- ADD CONSTRAINT "asset_video_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON DELETE CASCADE;
+ALTER TABLE ONLY asset_video
+ ADD CONSTRAINT "asset_video_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON DELETE CASCADE;
--
-- Name: cluster_group_request cluster_group_request_clusterGroupId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.cluster_group_request
- ADD CONSTRAINT "cluster_group_request_clusterGroupId_fkey" FOREIGN KEY ("clusterGroupId") REFERENCES public.cluster_group(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY cluster_group_request
+ ADD CONSTRAINT "cluster_group_request_clusterGroupId_fkey" FOREIGN KEY ("clusterGroupId") REFERENCES cluster_group(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: cluster_group_request cluster_group_request_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.cluster_group_request
- ADD CONSTRAINT "cluster_group_request_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY cluster_group_request
+ ADD CONSTRAINT "cluster_group_request_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: face_search face_search_faceId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.face_search
- ADD CONSTRAINT "face_search_faceId_fkey" FOREIGN KEY ("faceId") REFERENCES public.asset_face(id) ON DELETE CASCADE;
+ALTER TABLE ONLY face_search
+ ADD CONSTRAINT "face_search_faceId_fkey" FOREIGN KEY ("faceId") REFERENCES asset_face(id) ON DELETE CASCADE;
--
-- Name: integrity_report integrity_report_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.integrity_report
- ADD CONSTRAINT "integrity_report_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY integrity_report
+ ADD CONSTRAINT "integrity_report_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: integrity_report integrity_report_fileAssetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.integrity_report
- ADD CONSTRAINT "integrity_report_fileAssetId_fkey" FOREIGN KEY ("fileAssetId") REFERENCES public.asset_file(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY integrity_report
+ ADD CONSTRAINT "integrity_report_fileAssetId_fkey" FOREIGN KEY ("fileAssetId") REFERENCES asset_file(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: library library_ownerId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.library
- ADD CONSTRAINT "library_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY library
+ ADD CONSTRAINT "library_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: memory_asset memory_asset_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.memory_asset
- ADD CONSTRAINT "memory_asset_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY memory_asset
+ ADD CONSTRAINT "memory_asset_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: memory_asset_audit memory_asset_audit_memoryId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.memory_asset_audit
- ADD CONSTRAINT "memory_asset_audit_memoryId_fkey" FOREIGN KEY ("memoryId") REFERENCES public.memory(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY memory_asset_audit
+ ADD CONSTRAINT "memory_asset_audit_memoryId_fkey" FOREIGN KEY ("memoryId") REFERENCES memory(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: memory_asset memory_asset_memoriesId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.memory_asset
- ADD CONSTRAINT "memory_asset_memoriesId_fkey" FOREIGN KEY ("memoriesId") REFERENCES public.memory(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY memory_asset
+ ADD CONSTRAINT "memory_asset_memoriesId_fkey" FOREIGN KEY ("memoriesId") REFERENCES memory(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: memory memory_ownerId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.memory
- ADD CONSTRAINT "memory_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY memory
+ ADD CONSTRAINT "memory_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: notification notification_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.notification
- ADD CONSTRAINT "notification_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY notification
+ ADD CONSTRAINT "notification_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: ocr_search ocr_search_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.ocr_search
- ADD CONSTRAINT "ocr_search_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY ocr_search
+ ADD CONSTRAINT "ocr_search_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: partner partner_sharedById_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.partner
- ADD CONSTRAINT "partner_sharedById_fkey" FOREIGN KEY ("sharedById") REFERENCES public."user"(id) ON DELETE CASCADE;
+ALTER TABLE ONLY partner
+ ADD CONSTRAINT "partner_sharedById_fkey" FOREIGN KEY ("sharedById") REFERENCES "user"(id) ON DELETE CASCADE;
--
-- Name: partner partner_sharedWithId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.partner
- ADD CONSTRAINT "partner_sharedWithId_fkey" FOREIGN KEY ("sharedWithId") REFERENCES public."user"(id) ON DELETE CASCADE;
+ALTER TABLE ONLY partner
+ ADD CONSTRAINT "partner_sharedWithId_fkey" FOREIGN KEY ("sharedWithId") REFERENCES "user"(id) ON DELETE CASCADE;
--
-- Name: person person_faceAssetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.person
- ADD CONSTRAINT "person_faceAssetId_fkey" FOREIGN KEY ("faceAssetId") REFERENCES public.asset_face(id) ON DELETE SET NULL;
+ALTER TABLE ONLY person
+ ADD CONSTRAINT "person_faceAssetId_fkey" FOREIGN KEY ("faceAssetId") REFERENCES asset_face(id) ON DELETE SET NULL;
--
-- Name: person_group person_group_clusterGroupId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.person_group
- ADD CONSTRAINT "person_group_clusterGroupId_fkey" FOREIGN KEY ("clusterGroupId") REFERENCES public.cluster_group(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY person_group
+ ADD CONSTRAINT "person_group_clusterGroupId_fkey" FOREIGN KEY ("clusterGroupId") REFERENCES cluster_group(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: person person_ownerId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.person
- ADD CONSTRAINT "person_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY person
+ ADD CONSTRAINT "person_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: person person_personGroupId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.person
- ADD CONSTRAINT "person_personGroupId_fkey" FOREIGN KEY ("personGroupId") REFERENCES public.person_group(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY person
+ ADD CONSTRAINT "person_personGroupId_fkey" FOREIGN KEY ("personGroupId") REFERENCES person_group(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: plugin_method plugin_method_pluginId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.plugin_method
- ADD CONSTRAINT "plugin_method_pluginId_fkey" FOREIGN KEY ("pluginId") REFERENCES public.plugin(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY plugin_method
+ ADD CONSTRAINT "plugin_method_pluginId_fkey" FOREIGN KEY ("pluginId") REFERENCES plugin(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: session session_parentId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.session
- ADD CONSTRAINT "session_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES public.session(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY session
+ ADD CONSTRAINT "session_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES session(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: session_sync_checkpoint session_sync_checkpoint_sessionId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.session_sync_checkpoint
- ADD CONSTRAINT "session_sync_checkpoint_sessionId_fkey" FOREIGN KEY ("sessionId") REFERENCES public.session(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY session_sync_checkpoint
+ ADD CONSTRAINT "session_sync_checkpoint_sessionId_fkey" FOREIGN KEY ("sessionId") REFERENCES session(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: session session_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.session
- ADD CONSTRAINT "session_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY session
+ ADD CONSTRAINT "session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: shared_link shared_link_albumId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.shared_link
- ADD CONSTRAINT "shared_link_albumId_fkey" FOREIGN KEY ("albumId") REFERENCES public.album(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY shared_link
+ ADD CONSTRAINT "shared_link_albumId_fkey" FOREIGN KEY ("albumId") REFERENCES album(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: shared_link_asset shared_link_asset_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.shared_link_asset
- ADD CONSTRAINT "shared_link_asset_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY shared_link_asset
+ ADD CONSTRAINT "shared_link_asset_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: shared_link_asset shared_link_asset_sharedLinkId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.shared_link_asset
- ADD CONSTRAINT "shared_link_asset_sharedLinkId_fkey" FOREIGN KEY ("sharedLinkId") REFERENCES public.shared_link(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY shared_link_asset
+ ADD CONSTRAINT "shared_link_asset_sharedLinkId_fkey" FOREIGN KEY ("sharedLinkId") REFERENCES shared_link(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: shared_link shared_link_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.shared_link
- ADD CONSTRAINT "shared_link_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY shared_link
+ ADD CONSTRAINT "shared_link_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: smart_search smart_search_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.smart_search
- ADD CONSTRAINT "smart_search_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON DELETE CASCADE;
+ALTER TABLE ONLY smart_search
+ ADD CONSTRAINT "smart_search_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON DELETE CASCADE;
--
-- Name: stack stack_ownerId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.stack
- ADD CONSTRAINT "stack_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY stack
+ ADD CONSTRAINT "stack_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: stack stack_primaryAssetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.stack
- ADD CONSTRAINT "stack_primaryAssetId_fkey" FOREIGN KEY ("primaryAssetId") REFERENCES public.asset(id);
+ALTER TABLE ONLY stack
+ ADD CONSTRAINT "stack_primaryAssetId_fkey" FOREIGN KEY ("primaryAssetId") REFERENCES asset(id);
--
-- Name: tag_asset tag_asset_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.tag_asset
- ADD CONSTRAINT "tag_asset_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY tag_asset
+ ADD CONSTRAINT "tag_asset_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: tag_asset tag_asset_tagId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.tag_asset
- ADD CONSTRAINT "tag_asset_tagId_fkey" FOREIGN KEY ("tagId") REFERENCES public.tag(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY tag_asset
+ ADD CONSTRAINT "tag_asset_tagId_fkey" FOREIGN KEY ("tagId") REFERENCES tag(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: tag_closure tag_closure_id_ancestor_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.tag_closure
- ADD CONSTRAINT tag_closure_id_ancestor_fkey FOREIGN KEY (id_ancestor) REFERENCES public.tag(id) ON DELETE CASCADE;
+ALTER TABLE ONLY tag_closure
+ ADD CONSTRAINT tag_closure_id_ancestor_fkey FOREIGN KEY (id_ancestor) REFERENCES tag(id) ON DELETE CASCADE;
--
-- Name: tag_closure tag_closure_id_descendant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.tag_closure
- ADD CONSTRAINT tag_closure_id_descendant_fkey FOREIGN KEY (id_descendant) REFERENCES public.tag(id) ON DELETE CASCADE;
+ALTER TABLE ONLY tag_closure
+ ADD CONSTRAINT tag_closure_id_descendant_fkey FOREIGN KEY (id_descendant) REFERENCES tag(id) ON DELETE CASCADE;
--
-- Name: tag tag_parentId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.tag
- ADD CONSTRAINT "tag_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES public.tag(id) ON DELETE CASCADE;
+ALTER TABLE ONLY tag
+ ADD CONSTRAINT "tag_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES tag(id) ON DELETE CASCADE;
--
-- Name: tag tag_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.tag
- ADD CONSTRAINT "tag_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY tag
+ ADD CONSTRAINT "tag_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: user user_clusterGroupId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public."user"
- ADD CONSTRAINT "user_clusterGroupId_fkey" FOREIGN KEY ("clusterGroupId") REFERENCES public.cluster_group(id) ON UPDATE CASCADE;
+ALTER TABLE ONLY "user"
+ ADD CONSTRAINT "user_clusterGroupId_fkey" FOREIGN KEY ("clusterGroupId") REFERENCES cluster_group(id) ON UPDATE CASCADE;
--
-- Name: user_metadata user_metadata_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.user_metadata
- ADD CONSTRAINT "user_metadata_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY user_metadata
+ ADD CONSTRAINT "user_metadata_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: video_stream_segment video_stream_segment_variantId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.video_stream_segment
- ADD CONSTRAINT "video_stream_segment_variantId_fkey" FOREIGN KEY ("variantId") REFERENCES public.video_stream_variant(id) ON DELETE CASCADE;
+ALTER TABLE ONLY video_stream_segment
+ ADD CONSTRAINT "video_stream_segment_variantId_fkey" FOREIGN KEY ("variantId") REFERENCES video_stream_variant(id) ON DELETE CASCADE;
--
-- Name: video_stream_session video_stream_session_assetId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.video_stream_session
- ADD CONSTRAINT "video_stream_session_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES public.asset(id) ON DELETE CASCADE;
+ALTER TABLE ONLY video_stream_session
+ ADD CONSTRAINT "video_stream_session_assetId_fkey" FOREIGN KEY ("assetId") REFERENCES asset(id) ON DELETE CASCADE;
--
-- Name: video_stream_variant video_stream_variant_sessionId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.video_stream_variant
- ADD CONSTRAINT "video_stream_variant_sessionId_fkey" FOREIGN KEY ("sessionId") REFERENCES public.video_stream_session(id) ON DELETE CASCADE;
+ALTER TABLE ONLY video_stream_variant
+ ADD CONSTRAINT "video_stream_variant_sessionId_fkey" FOREIGN KEY ("sessionId") REFERENCES video_stream_session(id) ON DELETE CASCADE;
--
-- Name: workflow_log workflow_log_workflowId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.workflow_log
- ADD CONSTRAINT "workflow_log_workflowId_fkey" FOREIGN KEY ("workflowId") REFERENCES public.workflow(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY workflow_log
+ ADD CONSTRAINT "workflow_log_workflowId_fkey" FOREIGN KEY ("workflowId") REFERENCES workflow(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: workflow_log workflow_log_workflowStepId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.workflow_log
- ADD CONSTRAINT "workflow_log_workflowStepId_fkey" FOREIGN KEY ("workflowStepId") REFERENCES public.workflow_step(id) ON UPDATE CASCADE ON DELETE SET NULL;
+ALTER TABLE ONLY workflow_log
+ ADD CONSTRAINT "workflow_log_workflowStepId_fkey" FOREIGN KEY ("workflowStepId") REFERENCES workflow_step(id) ON UPDATE CASCADE ON DELETE SET NULL;
--
-- Name: workflow workflow_ownerId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.workflow
- ADD CONSTRAINT "workflow_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES public."user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY workflow
+ ADD CONSTRAINT "workflow_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: workflow_step workflow_step_pluginMethodId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.workflow_step
- ADD CONSTRAINT "workflow_step_pluginMethodId_fkey" FOREIGN KEY ("pluginMethodId") REFERENCES public.plugin_method(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY workflow_step
+ ADD CONSTRAINT "workflow_step_pluginMethodId_fkey" FOREIGN KEY ("pluginMethodId") REFERENCES plugin_method(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- Name: workflow_step workflow_step_workflowId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
-ALTER TABLE ONLY public.workflow_step
- ADD CONSTRAINT "workflow_step_workflowId_fkey" FOREIGN KEY ("workflowId") REFERENCES public.workflow(id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY workflow_step
+ ADD CONSTRAINT "workflow_step_workflowId_fkey" FOREIGN KEY ("workflowId") REFERENCES workflow(id) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- PostgreSQL database dump complete
--
-\unrestrict mjMyY2YEVBfWGabnjdRqEcQmimigWbvovifIDg4VxfkA30tCaxYDjnokejkP5XZ
+-- \unrestrict mjMyY2YEVBfWGabnjdRqEcQmimigWbvovifIDg4VxfkA30tCaxYDjnokejkP5XZ