diff --git a/openspec/changes/postgres-migration-mithome-136/design.md b/openspec/changes/postgres-migration-mithome-136/design.md index 492a030..31a89f4 100644 --- a/openspec/changes/postgres-migration-mithome-136/design.md +++ b/openspec/changes/postgres-migration-mithome-136/design.md @@ -39,6 +39,9 @@ - A kiinduló migráció a teljes jelenlegi config sémája: `payload migrate:create initial`. A `src/migrations/index.ts` ezzel indul újra. - **A parancssori eszköz hibájának valódi oka** (az 1.1-es feladatban derült ki): nem a Node-verzió. A `proto/package.json`-ban nem volt `"type": "module"`, ezért a Payload parancssori eszköze a configot CommonJS-ként töltötte be, és nem tudta behúzni az ESM-es, top-level await-es `@payloadcms/richtext-lexical`-t. Node 22 alatt is ugyanez a hiba jött. - **Megoldás:** `"type": "module"`, ahogy a Payload hivatalos sablonja is csinálja. A CommonJS jest-fájlok és a `src/content/schema.js` `.cjs` kiterjesztést kaptak. Ellenőrizve: a parancssori eszköz Node 26-on is betölti a configot; a Next `standalone` `server.js` ESM-es, és elindul. A `--input-type=module` kerülőút megszűnik. +- A generált migráció (`src/migrations/_*.ts`, a kiinduló 1548 soros) kivétel a 400 soros fájlkorlát és a lint alól: generált kód, kézzel nem szerkesztjük. +- **Közös config:** a `src/payload.shared.ts` mindent tartalmaz az adatbázis-illesztő kivételével. A `payload.config.ts` ebből épül PostgreSQL-lel, az átviteli script MongoDB-vel, így a tartalommodell nem térhet el. +- **Seed-konstansok:** a referenciák és a tárhelycsomagok szövegei a `src/content/seeds/` alá költöztek. - A Mongo-adatmigrációk (8 fájl) és a segédfüggvényeik törlődnek. Az általuk elért állapot a stagingadatban van, és azt a D3 hozza át. ### D3: Egyszeri adatmigráció (`proto/scripts/migrate-mongo-to-postgres.ts`) diff --git a/openspec/changes/postgres-migration-mithome-136/tasks.md b/openspec/changes/postgres-migration-mithome-136/tasks.md index 594f865..ded5cf7 100644 --- a/openspec/changes/postgres-migration-mithome-136/tasks.md +++ b/openspec/changes/postgres-migration-mithome-136/tasks.md @@ -3,8 +3,8 @@ ## 1. Eszközök és illesztő - [x] 1.1 `"type": "module"`, a CommonJS jest-fájlok és a `schema` `.cjs`-re nevezve, az ESLint-globok frissítve (D2). Ellenőrzés: a `payload migrate:status` betölti a configot; 516 unit teszt, tsc, lint, build és a `standalone` `server.js` indítása zöld. -- [ ] 1.2 `@payloadcms/db-postgres` (Payload-verzióval azonos), `postgresAdapter({ idType: 'uuid', push: false })`, `DATABASE_URI`. Ellenőrzés: `tsc`, `npm test`. -- [ ] 1.3 Kiinduló migráció (`migrate:create initial`), új `src/migrations/index.ts`; a 8 Mongo-migráció, a `migrate-global-docs`, a `localize-paths`, a `mongodb.ts` és a fake-Mongo tesztek törlése. Ellenőrzés: eldobható PostgreSQL-en a migráció kétszer fut, a második 0 lépés. +- [x] 1.2 `@payloadcms/db-postgres` (Payload-verzióval azonos), `postgresAdapter({ idType: 'uuid', push: false })`, `DATABASE_URI`. Ellenőrzés: `tsc`, `npm test`. +- [x] 1.3 Kiinduló migráció (`migrate:create initial`), új `src/migrations/index.ts`; a 8 Mongo-migráció, a `migrate-global-docs`, a `localize-paths`, a `mongodb.ts` és a fake-Mongo tesztek törlése. Ellenőrzés: eldobható PostgreSQL-en a migráció kétszer fut, a második 0 lépés. ## 2. Adatmigráció diff --git a/proto/eslint.config.mjs b/proto/eslint.config.mjs index 17663f6..6466831 100755 --- a/proto/eslint.config.mjs +++ b/proto/eslint.config.mjs @@ -20,6 +20,8 @@ const eslintConfig = [ "playwright-report/**", "test-results/**", "coverage/**", + // MITHOME-136: generated by `payload migrate:create` — not edited by hand. + "src/migrations/2*.ts", ], }, { diff --git a/proto/package-lock.json b/proto/package-lock.json index e0acdbe..6d277ea 100755 --- a/proto/package-lock.json +++ b/proto/package-lock.json @@ -9,6 +9,7 @@ "version": "0.1.0", "dependencies": { "@payloadcms/db-mongodb": "^3.88.0", + "@payloadcms/db-postgres": "^3.88.0", "@payloadcms/next": "^3.88.0", "@payloadcms/richtext-lexical": "^3.88.0", "graphql": "^16.14.2", @@ -713,10 +714,17 @@ "react": ">=16.8.0" } }, + "node_modules/@drizzle-team/brocli": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@drizzle-team/brocli/-/brocli-0.10.2.tgz", + "integrity": "sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==", + "license": "Apache-2.0" + }, "node_modules/@emnapi/core": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.5.0.tgz", "integrity": "sha512-sbP8GzB1WDzacS8fgNPpHlp6C9VZe+SJP3F90W9rLemaQj2PzIuTEl1qDOYQf58YIpyjViI24y9aPWCjEzY2cg==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -738,6 +746,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz", "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -873,6 +882,427 @@ "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==", "license": "MIT" }, + "node_modules/@esbuild-kit/core-utils": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@esbuild-kit/core-utils/-/core-utils-3.3.2.tgz", + "integrity": "sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==", + "deprecated": "Merged into tsx: https://tsx.hirok.io", + "license": "MIT", + "dependencies": { + "esbuild": "~0.18.20", + "source-map-support": "^0.5.21" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "node_modules/@esbuild-kit/core-utils/node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/@esbuild-kit/esm-loader": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/@esbuild-kit/esm-loader/-/esm-loader-2.6.5.tgz", + "integrity": "sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==", + "deprecated": "Merged into tsx: https://tsx.hirok.io", + "license": "MIT", + "dependencies": { + "@esbuild-kit/core-utils": "^3.3.2", + "get-tsconfig": "^4.7.0" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.28.2", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", @@ -3216,6 +3646,293 @@ "url": "https://opencollective.com/mongoose" } }, + "node_modules/@payloadcms/db-postgres": { + "version": "3.88.0", + "resolved": "https://registry.npmjs.org/@payloadcms/db-postgres/-/db-postgres-3.88.0.tgz", + "integrity": "sha512-uP2b3yH8MulguWSH7j8vJaFX3ols4fVKPtsvZ49XQvDsafBAAUZjc1aCldo1ozoVfhC46tx4pv0ovtHQc8zdcA==", + "license": "MIT", + "dependencies": { + "@payloadcms/drizzle": "3.88.0", + "@types/pg": "8.20.0", + "console-table-printer": "2.12.1", + "drizzle-kit": "0.31.7", + "drizzle-orm": "0.45.2", + "pg": "8.20.0", + "prompts": "2.4.2", + "to-snake-case": "1.0.0", + "uuid": "13.0.2" + }, + "peerDependencies": { + "payload": "3.88.0" + } + }, + "node_modules/@payloadcms/db-postgres/node_modules/drizzle-orm": { + "version": "0.45.2", + "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.45.2.tgz", + "integrity": "sha512-kY0BSaTNYWnoDMVoyY8uxmyHjpJW1geOmBMdSSicKo9CIIWkSxMIj2rkeSR51b8KAPB7m+qysjuHme5nKP+E5Q==", + "license": "Apache-2.0", + "peerDependencies": { + "@aws-sdk/client-rds-data": ">=3", + "@cloudflare/workers-types": ">=4", + "@electric-sql/pglite": ">=0.2.0", + "@libsql/client": ">=0.10.0", + "@libsql/client-wasm": ">=0.10.0", + "@neondatabase/serverless": ">=0.10.0", + "@op-engineering/op-sqlite": ">=2", + "@opentelemetry/api": "^1.4.1", + "@planetscale/database": ">=1.13", + "@prisma/client": "*", + "@tidbcloud/serverless": "*", + "@types/better-sqlite3": "*", + "@types/pg": "*", + "@types/sql.js": "*", + "@upstash/redis": ">=1.34.7", + "@vercel/postgres": ">=0.8.0", + "@xata.io/client": "*", + "better-sqlite3": ">=7", + "bun-types": "*", + "expo-sqlite": ">=14.0.0", + "gel": ">=2", + "knex": "*", + "kysely": "*", + "mysql2": ">=2", + "pg": ">=8", + "postgres": ">=3", + "sql.js": ">=1", + "sqlite3": ">=5" + }, + "peerDependenciesMeta": { + "@aws-sdk/client-rds-data": { + "optional": true + }, + "@cloudflare/workers-types": { + "optional": true + }, + "@electric-sql/pglite": { + "optional": true + }, + "@libsql/client": { + "optional": true + }, + "@libsql/client-wasm": { + "optional": true + }, + "@neondatabase/serverless": { + "optional": true + }, + "@op-engineering/op-sqlite": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@planetscale/database": { + "optional": true + }, + "@prisma/client": { + "optional": true + }, + "@tidbcloud/serverless": { + "optional": true + }, + "@types/better-sqlite3": { + "optional": true + }, + "@types/pg": { + "optional": true + }, + "@types/sql.js": { + "optional": true + }, + "@upstash/redis": { + "optional": true + }, + "@vercel/postgres": { + "optional": true + }, + "@xata.io/client": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "bun-types": { + "optional": true + }, + "expo-sqlite": { + "optional": true + }, + "gel": { + "optional": true + }, + "knex": { + "optional": true + }, + "kysely": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "pg": { + "optional": true + }, + "postgres": { + "optional": true + }, + "prisma": { + "optional": true + }, + "sql.js": { + "optional": true + }, + "sqlite3": { + "optional": true + } + } + }, + "node_modules/@payloadcms/drizzle": { + "version": "3.88.0", + "resolved": "https://registry.npmjs.org/@payloadcms/drizzle/-/drizzle-3.88.0.tgz", + "integrity": "sha512-qtPVSLjAFnQl1GwaQPhmnYTwCCWgTnRm4ps5yJxmN3RPdLF6S77gvqZMnC4HTeH7YADQJW3nFgQCVYExxWE6hA==", + "license": "MIT", + "dependencies": { + "console-table-printer": "2.12.1", + "dequal": "2.0.3", + "drizzle-orm": "0.45.2", + "prompts": "2.4.2", + "to-snake-case": "1.0.0", + "uuid": "13.0.2" + }, + "peerDependencies": { + "payload": "3.88.0" + } + }, + "node_modules/@payloadcms/drizzle/node_modules/drizzle-orm": { + "version": "0.45.2", + "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.45.2.tgz", + "integrity": "sha512-kY0BSaTNYWnoDMVoyY8uxmyHjpJW1geOmBMdSSicKo9CIIWkSxMIj2rkeSR51b8KAPB7m+qysjuHme5nKP+E5Q==", + "license": "Apache-2.0", + "peerDependencies": { + "@aws-sdk/client-rds-data": ">=3", + "@cloudflare/workers-types": ">=4", + "@electric-sql/pglite": ">=0.2.0", + "@libsql/client": ">=0.10.0", + "@libsql/client-wasm": ">=0.10.0", + "@neondatabase/serverless": ">=0.10.0", + "@op-engineering/op-sqlite": ">=2", + "@opentelemetry/api": "^1.4.1", + "@planetscale/database": ">=1.13", + "@prisma/client": "*", + "@tidbcloud/serverless": "*", + "@types/better-sqlite3": "*", + "@types/pg": "*", + "@types/sql.js": "*", + "@upstash/redis": ">=1.34.7", + "@vercel/postgres": ">=0.8.0", + "@xata.io/client": "*", + "better-sqlite3": ">=7", + "bun-types": "*", + "expo-sqlite": ">=14.0.0", + "gel": ">=2", + "knex": "*", + "kysely": "*", + "mysql2": ">=2", + "pg": ">=8", + "postgres": ">=3", + "sql.js": ">=1", + "sqlite3": ">=5" + }, + "peerDependenciesMeta": { + "@aws-sdk/client-rds-data": { + "optional": true + }, + "@cloudflare/workers-types": { + "optional": true + }, + "@electric-sql/pglite": { + "optional": true + }, + "@libsql/client": { + "optional": true + }, + "@libsql/client-wasm": { + "optional": true + }, + "@neondatabase/serverless": { + "optional": true + }, + "@op-engineering/op-sqlite": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@planetscale/database": { + "optional": true + }, + "@prisma/client": { + "optional": true + }, + "@tidbcloud/serverless": { + "optional": true + }, + "@types/better-sqlite3": { + "optional": true + }, + "@types/pg": { + "optional": true + }, + "@types/sql.js": { + "optional": true + }, + "@upstash/redis": { + "optional": true + }, + "@vercel/postgres": { + "optional": true + }, + "@xata.io/client": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "bun-types": { + "optional": true + }, + "expo-sqlite": { + "optional": true + }, + "gel": { + "optional": true + }, + "knex": { + "optional": true + }, + "kysely": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "pg": { + "optional": true + }, + "postgres": { + "optional": true + }, + "prisma": { + "optional": true + }, + "sql.js": { + "optional": true + }, + "sqlite3": { + "optional": true + } + } + }, "node_modules/@payloadcms/graphql": { "version": "3.88.0", "resolved": "https://registry.npmjs.org/@payloadcms/graphql/-/graphql-3.88.0.tgz", @@ -3875,6 +4592,7 @@ "version": "0.10.0", "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.0.tgz", "integrity": "sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -4129,6 +4847,17 @@ "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", "license": "MIT" }, + "node_modules/@types/pg": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.20.0.tgz", + "integrity": "sha512-bEPFOaMAHTEP1EzpvHTbmwR8UsFyHSKsRisLIHVMXnpNefSbGA1bD6CVy+qKjGSqmZqNqBDV2azOBo8TgkcVow==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "pg-protocol": "*", + "pg-types": "^2.2.0" + } + }, "node_modules/@types/react": { "version": "19.1.12", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.12.tgz", @@ -5456,7 +6185,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, "license": "MIT" }, "node_modules/buffer-image-size": { @@ -6421,6 +7149,478 @@ "@types/trusted-types": "^2.0.7" } }, + "node_modules/drizzle-kit": { + "version": "0.31.7", + "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.31.7.tgz", + "integrity": "sha512-hOzRGSdyKIU4FcTSFYGKdXEjFsncVwHZ43gY3WU5Bz9j5Iadp6Rh6hxLSQ1IWXpKLBKt/d5y1cpSPcV+FcoQ1A==", + "license": "MIT", + "dependencies": { + "@drizzle-team/brocli": "^0.10.2", + "@esbuild-kit/esm-loader": "^2.5.5", + "esbuild": "^0.25.4", + "esbuild-register": "^3.5.0" + }, + "bin": { + "drizzle-kit": "bin.cjs" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/drizzle-kit/node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -6739,6 +7939,18 @@ "@esbuild/win32-x64": "0.28.2" } }, + "node_modules/esbuild-register": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.6.0.tgz", + "integrity": "sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==", + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "peerDependencies": { + "esbuild": ">=0.12 <1" + } + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -7728,7 +8940,6 @@ "version": "4.10.1", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", - "dev": true, "license": "MIT", "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -12112,6 +13323,95 @@ "fsevents": "~2.3.3" } }, + "node_modules/pg": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.20.0.tgz", + "integrity": "sha512-ldhMxz2r8fl/6QkXnBD3CR9/xg694oT6DZQ2s6c/RI28OjtSOpxnPrUCGOBJ46RCUxcWdx3p6kw/xnDHjKvaRA==", + "license": "MIT", + "dependencies": { + "pg-connection-string": "^2.12.0", + "pg-pool": "^3.13.0", + "pg-protocol": "^1.13.0", + "pg-types": "2.2.0", + "pgpass": "1.0.5" + }, + "engines": { + "node": ">= 16.0.0" + }, + "optionalDependencies": { + "pg-cloudflare": "^1.3.0" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-cloudflare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.4.0.tgz", + "integrity": "sha512-Vo7z/6rrQYxpNRylp4Tlob2elzbh+N/MOQbxFVWCxS7oEx6jF53GTJFxK2WWpKuBRkmiin4Mt+xofFDjx09R0A==", + "license": "MIT", + "optional": true + }, + "node_modules/pg-connection-string": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.14.0.tgz", + "integrity": "sha512-XwWDGcLRGCXAR8F/AM5bG7Q+A3Wm2s6QeEjlOKZLlH3UYcguiqCWKyWXVag5TLTIjR7oOJUY8kcADaZgWPyLeg==", + "license": "MIT" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "license": "ISC", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-pool": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.14.0.tgz", + "integrity": "sha512-gKtPkFdQPU3DksooVLi9LsjZxrsBUZIpa+7aVx+LV5pNh0KzP4Zleud2po+ConrxbuXGBJ6Hfer6hdgpIBpBaw==", + "license": "MIT", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.16.0.tgz", + "integrity": "sha512-sILXutLVjCLjcDuOmvhX5e2Z4cS5qG/6Bu3VkpFwdf/633ElGLpEh9bgmuI5I4sqKqkifQiGyiCcx1HdtrK7tg==", + "license": "MIT" + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "license": "MIT", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "license": "MIT", + "dependencies": { + "split2": "^4.1.0" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -12376,6 +13676,45 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz", + "integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "license": "MIT", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -13358,7 +14697,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -13913,6 +15251,12 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/to-no-case": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-1.0.2.tgz", + "integrity": "sha512-Z3g735FxuZY8rodxV4gH7LxClE4H0hTIyHNIHdk+vpQxjLm0cwnKXq/OFVZ76SOQmto7txVcwSCwkU5kqp+FKg==", + "license": "MIT" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -13925,6 +15269,24 @@ "node": ">=8.0" } }, + "node_modules/to-snake-case": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-snake-case/-/to-snake-case-1.0.0.tgz", + "integrity": "sha512-joRpzBAk1Bhi2eGEYBjukEWHOe/IvclOkiJl3DtA91jV6NwQ3MwXA4FHYeqk8BNp/D8bmi9tcNbRu/SozP0jbQ==", + "license": "MIT", + "dependencies": { + "to-space-case": "^1.0.0" + } + }, + "node_modules/to-space-case": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-space-case/-/to-space-case-1.0.0.tgz", + "integrity": "sha512-rLdvwXZ39VOn1IxGL3V6ZstoTbwLRckQmn/U8ZDLuWwIXNpuZDhQ3AiRUlhTbOXFVE9C+dR51wM0CBDhk31VcA==", + "license": "MIT", + "dependencies": { + "to-no-case": "^1.0.0" + } + }, "node_modules/token-types": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/token-types/-/token-types-6.1.2.tgz", @@ -14811,6 +16173,15 @@ "node": ">= 0.10.0" } }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/proto/package.json b/proto/package.json index 3a13794..4d8cd36 100755 --- a/proto/package.json +++ b/proto/package.json @@ -31,10 +31,16 @@ "docker:build": "docker build -t mozdit-app .", "docker:run": "docker run -p 3000:3000 --env-file .env.local mozdit-app", "migrate:content": "node --env-file=.env.local --import tsx scripts/migrate-content-to-payload.ts", - "test:payload": "node --env-file=.env.local --import tsx scripts/test-payload-local-api.ts" + "test:payload": "node --env-file=.env.local --import tsx scripts/test-payload-local-api.ts", + "payload": "payload", + "generate:types": "payload generate:types", + "generate:importmap": "payload generate:importmap", + "migrate:create": "payload migrate:create", + "migrate:status": "payload migrate:status" }, "dependencies": { "@payloadcms/db-mongodb": "^3.88.0", + "@payloadcms/db-postgres": "^3.88.0", "@payloadcms/next": "^3.88.0", "@payloadcms/richtext-lexical": "^3.88.0", "graphql": "^16.14.2", diff --git a/proto/scripts/migrate-content-to-payload.ts b/proto/scripts/migrate-content-to-payload.ts index 95208b9..a4bea4d 100644 --- a/proto/scripts/migrate-content-to-payload.ts +++ b/proto/scripts/migrate-content-to-payload.ts @@ -35,7 +35,7 @@ import { fileURLToPath } from 'url' import { getPayload, type Payload } from 'payload' import config from '../src/payload.config' import { internalPathToPageKey } from '../src/lib/cta-link' -import { CONFIRMED_CLIENT_REFERENCES, REFERENCES_SECTION_COPY } from '../src/migrations/20260929_partner_references' +import { CONFIRMED_CLIENT_REFERENCES, REFERENCES_SECTION_COPY } from '../src/content/seeds/references' import homeJson from '../src/content/pages/home.json' import aboutJson from '../src/content/pages/about.json' diff --git a/proto/src/__tests__/cta-links-migration.test.ts b/proto/src/__tests__/cta-links-migration.test.ts deleted file mode 100644 index a18793e..0000000 --- a/proto/src/__tests__/cta-links-migration.test.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { down, toPageLink, up } from '../migrations/20260929_cta_page_links' -import { up as localizeUp } from '../migrations/20260929_localize_globals' - -import { fakeArgs, fakeCollection } from './helpers/fake-mongo' - -type Doc = Record - - -const heroWith = (primaryHref: unknown, secondaryHref: unknown) => ({ - title: 'Cím', - cta: { - primary: { text: { hu: 'Kapcsolat' }, href: primaryHref, external: false }, - secondary: { text: { hu: 'Webmail' }, href: secondaryHref, external: true }, - }, -}) - -function setup(primaryHref: unknown = { hu: '/kapcsolat' }, secondaryHref: unknown = { hu: 'https://mail.mozdit.hu' }) { - const home: Doc = { _id: 'g-home', globalType: 'home', hero: heroWith(primaryHref, secondaryHref) } - const version: Doc = { _id: 'v1', version: { hero: heroWith({ hu: '/hu/kapcsolat' }, 'https://mail.mozdit.hu') } } - const globals = fakeCollection([home]) - const versions = fakeCollection([version]) - const { args, payload } = fakeArgs({ globals, versions: { home: versions } }) - return { args, home, version, payload } -} - -const cta = (doc: Doc) => (doc.hero as { cta: Record }).cta - -describe('20260929_cta_page_links migration (MITHOME-123)', () => { - it('should turn the legacy internal path into a page link and drop the href', async () => { - const { args, home } = setup() - await up(args) - expect(cta(home).primary).toEqual({ text: { hu: 'Kapcsolat' }, linkType: 'page', page: 'contact', external: false }) - }) - - it('should keep external URLs as URL links', async () => { - const { args, home } = setup() - await up(args) - expect(cta(home).secondary).toMatchObject({ linkType: 'url', href: { hu: 'https://mail.mozdit.hu' } }) - }) - - it('should migrate version records, including legacy string hrefs', async () => { - const { args, version } = setup() - await up(args) - const versionCta = cta(version.version as Doc) - expect(versionCta.primary).toMatchObject({ linkType: 'page', page: 'contact' }) - expect(versionCta.secondary).toMatchObject({ linkType: 'url', href: 'https://mail.mozdit.hu' }) - }) - - it('should be idempotent', async () => { - const { args, home, payload } = setup() - await up(args) - const snapshot = JSON.stringify(home) - await up(args) - expect(JSON.stringify(home)).toBe(snapshot) - expect(payload.logger.info).toHaveBeenLastCalledWith('MITHOME-123 CTA link migration: home — 0 CTA(s) rewritten') - }) - - it('should give the same result regardless of order with the locale migration', async () => { - const localeFirst = setup('/kapcsolat', 'https://mail.mozdit.hu') - await localizeUp(localeFirst.args) - await up(localeFirst.args) - - const ctaFirst = setup('/kapcsolat', 'https://mail.mozdit.hu') - await up(ctaFirst.args) - await localizeUp(ctaFirst.args) - - expect(cta(ctaFirst.home)).toEqual(cta(localeFirst.home)) - }) - - it('should treat a missing href as a URL link without inventing a target', () => { - const link: Doc = { text: { hu: 'x' } } - expect(toPageLink(link)).toBe(1) - expect(link).toEqual({ text: { hu: 'x' }, linkType: 'url' }) - }) - - it('should restore a hu href on down', async () => { - const { args, home } = setup() - await up(args) - await down(args) - expect(cta(home).primary).toEqual({ text: { hu: 'Kapcsolat' }, href: { hu: '/hu/kapcsolat' }, external: false }) - expect(cta(home).secondary).toEqual({ text: { hu: 'Webmail' }, href: { hu: 'https://mail.mozdit.hu' }, external: true }) - }) -}) diff --git a/proto/src/__tests__/en-ai-draft-migration.test.ts b/proto/src/__tests__/en-ai-draft-migration.test.ts deleted file mode 100644 index b9ae048..0000000 --- a/proto/src/__tests__/en-ai-draft-migration.test.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { up } from '../migrations/20260929_en_ai_draft' -import { fakeArgs, fakeCollection } from './helpers/fake-mongo' - -type Doc = Record - -// Texts taken from the real translation memory (en.json). -const homeData = (title: unknown): Doc => ({ - hero: { title, trustBullets: { hu: [{ value: 'Saját dedikált infrastruktúra', id: 'b1' }] } }, -}) - -function setup() { - const globals = fakeCollection([{ _id: 'g-home', globalType: 'home', ...homeData({ hu: 'Webtárhely, üzleti e-mail és domainkezelés egy helyen' }) }]) - const homeVersions = fakeCollection([ - { _id: 'old', latest: false, version: homeData({ hu: 'Régi cím' }) }, - { _id: 'cur', latest: true, version: homeData({ hu: 'Webtárhely, üzleti e-mail és domainkezelés egy helyen' }) }, - ]) - const legal = fakeCollection([ - // legacy (unwrapped) shape: the migration must not depend on running after 20260929_localize_legal_pages - { _id: 'lp', slug: 'adatvedelem', title: 'Adatvédelmi Tájékoztató', lastUpdated: '2026. augusztus 22.', sections: [{ id: 's1', title: 'Ismeretlen fejezet', content: '1. Bevezetés' }] }, - ]) - return { - globals, - homeVersions, - legal, - ...fakeArgs({ globals, collections: { 'legal-pages': legal }, versions: { home: homeVersions } }), - } -} - -describe('20260929_en_ai_draft migration (MITHOME-113)', () => { - it('should fill English values on the published global and mark it as AI draft', async () => { - const { args, globals } = setup() - await up(args) - const home = globals.docs[0] as { hero: { title: Doc; trustBullets: { en: { value: string }[] } }; enTranslationStatus: string } - expect(home.hero.title.en).toBe('Web hosting, business email and domain management in one place') - expect(home.hero.trustBullets.en.map((r) => r.value)).toEqual(['Our own dedicated infrastructure']) - expect(home.enTranslationStatus).toBe('ai-draft') - expect(globals.updateOne.mock.calls[0][1].$set).toHaveProperty('enTranslationStatus', 'ai-draft') - }) - - it('should only fill the latest version, not history', async () => { - const { args, homeVersions } = setup() - await up(args) - expect(homeVersions.updateOne).toHaveBeenCalledTimes(1) - expect(homeVersions.updateOne.mock.calls[0][0]).toEqual({ _id: 'cur' }) - }) - - it('should wrap legacy legal page values first and report untranslated Hungarian texts', async () => { - const { args, legal, payload } = setup() - await up(args) - expect(legal.docs[0]).toMatchObject({ - slug: 'adatvedelem', - title: { hu: 'Adatvédelmi Tájékoztató', en: 'Privacy Notice' }, - sections: [{ id: 's1', title: { hu: 'Ismeretlen fejezet' }, content: { hu: '1. Bevezetés', en: '1. Introduction' } }], - enTranslationStatus: 'ai-draft', - }) - expect(payload.logger.warn).toHaveBeenCalledWith('MITHOME-113 no translation (legal-pages): Ismeretlen fejezet') - }) - - it('should be idempotent', async () => { - const { args, globals, legal } = setup() - await up(args) - const snapshot = JSON.stringify([globals.docs, legal.docs]) - await up(args) - expect(JSON.stringify([globals.docs, legal.docs])).toBe(snapshot) - }) -}) diff --git a/proto/src/__tests__/helpers/fake-mongo.ts b/proto/src/__tests__/helpers/fake-mongo.ts deleted file mode 100644 index 0b87aa9..0000000 --- a/proto/src/__tests__/helpers/fake-mongo.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** Minimal in-memory stand-in for a Mongo collection used by migration tests. */ -type Doc = Record - -const matches = (doc: Doc, filter: Doc) => Object.entries(filter).every(([key, value]) => doc[key] === value) - -export function fakeCollection(docs: Doc[]) { - return { - docs, - find: jest.fn((filter: Doc = {}) => ({ - async *[Symbol.asyncIterator]() { - yield* docs.filter((doc) => matches(doc, filter)) - }, - })), - updateOne: jest.fn, [filter: Doc, update: { $set: Doc }, options?: unknown]>(async () => ({})), - } -} - -export type FakeCollection = ReturnType - -export function fakeArgs(db: { globals?: FakeCollection; collections?: Record; versions?: Record }) { - const payload = { - db: { - globals: { collection: db.globals ?? fakeCollection([]) }, - collections: Object.fromEntries(Object.entries(db.collections ?? {}).map(([k, c]) => [k, { collection: c }])), - versions: Object.fromEntries(Object.entries(db.versions ?? {}).map(([k, c]) => [k, { collection: c }])), - }, - logger: { info: jest.fn(), warn: jest.fn() }, - } - return { payload, args: { payload, session: undefined, req: {} } as never } -} diff --git a/proto/src/__tests__/hosting-plans-migration.test.ts b/proto/src/__tests__/hosting-plans-migration.test.ts deleted file mode 100644 index be37b35..0000000 --- a/proto/src/__tests__/hosting-plans-migration.test.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { HOSTING_PLAN_SEEDS, productData, up } from '../migrations/20260929_hosting_plans' - -type Doc = Record - -/** Minimal Local API stand-in: products by slug + one global. */ -function fakePayload(products: Doc[] = [], page: Doc = {}) { - const payload = { - find: jest.fn(async ({ where }: { where: { slug: { equals: string } } }) => ({ - docs: products.filter((p) => p.slug === where.slug.equals), - })), - create: jest.fn(async ({ data }: { data: Doc }) => { - const doc = { id: `id-${products.length}`, ...data } - products.push(doc) - return doc - }), - update: jest.fn(async () => ({})), - findGlobal: jest.fn(async () => page), - updateGlobal: jest.fn(async ({ data, locale }: { data: Doc; locale: string }) => { - if (locale === 'hu') Object.assign(page, data) - return page - }), - logger: { info: jest.fn(), warn: jest.fn() }, - } - return { payload, args: { payload, req: {} } as never } -} - -describe('20260929_hosting_plans migration (MITHOME-130)', () => { - it('should seed the catalogue figures and prices as a draft, with an English AI draft', () => { - const start = productData(HOSTING_PLAN_SEEDS[0], 'hu') - expect(start).toMatchObject({ - slug: 'mit-start', - productType: 'hosting', - status: 'draft', - enTranslationStatus: 'ai-draft', - pricing: { netAmount: 14900, billingPeriod: 'yearly' }, - serviceDefinition: { storageGb: 3, mailStorageGb: 1, databases: 1, mailboxes: 5, ssl: true, spamFilter: true }, - _status: 'published', - }) - expect(productData(HOSTING_PLAN_SEEDS[1], 'hu')).toMatchObject({ - highlighted: true, - pricing: { netAmount: 23900 }, - serviceDefinition: { storageGb: 8, mailStorageGb: 4, domainAliases: 2, databases: 2, mailboxes: 10 }, - }) - }) - - it('should write only localized fields in English', () => { - const en = productData(HOSTING_PLAN_SEEDS[0], 'en') - expect(Object.keys(en).sort()).toEqual(['_status', 'public', 'serviceDefinition']) - expect(en.serviceDefinition).toEqual({ backup: 'Daily, with 7-day restore' }) - }) - - it('should create the missing products and page copy once', async () => { - const products: Doc[] = [] - const { args, payload } = fakePayload(products) - await up(args) - expect(payload.create).toHaveBeenCalledTimes(2) - expect(payload.update).toHaveBeenCalledWith(expect.objectContaining({ locale: 'en' })) - expect(payload.updateGlobal).toHaveBeenCalledWith( - expect.objectContaining({ locale: 'hu', data: expect.objectContaining({ vatRatePercent: 27, hero: expect.objectContaining({ title: 'Tárhelycsomagok' }) }) }), - ) - expect(payload.logger.info).toHaveBeenLastCalledWith('MITHOME-130 hosting plans: 2 product(s) created, 1 page copy seeded') - - await up(args) - expect(payload.create).toHaveBeenCalledTimes(2) - expect(payload.logger.info).toHaveBeenLastCalledWith('MITHOME-130 hosting plans: 0 product(s) created, 0 page copy seeded') - }) - - it('should not overwrite an existing product or edited page copy', async () => { - const { args, payload } = fakePayload([{ id: 'x', slug: 'mit-start', pricing: { netAmount: 1 } }], { hero: { title: 'Saját cím' } }) - await up(args) - expect(payload.create).toHaveBeenCalledTimes(1) - expect(payload.updateGlobal).not.toHaveBeenCalled() - }) -}) diff --git a/proto/src/__tests__/localize-globals-migration.test.ts b/proto/src/__tests__/localize-globals-migration.test.ts deleted file mode 100644 index b64dd2d..0000000 --- a/proto/src/__tests__/localize-globals-migration.test.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { down, up } from '../migrations/20260929_localize_globals' - -import { fakeArgs, fakeCollection } from './helpers/fake-mongo' - -type Doc = Record - - -function setup() { - const globals = fakeCollection([ - { _id: 'g-home', globalType: 'home', hero: { title: 'Cím', trustBullets: [{ value: 'Egy' }] }, cta: { title: 'CTA' } }, - { _id: 'g-common', globalType: 'common', buttons: { contact: { hu: 'Kapcsolat', en: 'Contact' } } }, - ]) - const homeVersions = fakeCollection([ - { _id: 'v1', version: { hero: { title: 'Régi cím' } } }, - { _id: 'v2', version: { hero: { title: { hu: 'Már migrált' } } } }, - ]) - const { args, payload } = fakeArgs({ globals, versions: { home: homeVersions } }) - return { args, globals, homeVersions, payload } -} - -describe('20260929_localize_globals migration', () => { - it('should wrap legacy values of the published global under hu and $set only touched keys', async () => { - const { args, globals } = setup() - await up(args) - - const homeCall = globals.updateOne.mock.calls.find(([filter]) => filter._id === 'g-home') - expect(homeCall).toBeDefined() - const [, update] = homeCall! - expect(update.$set.hero).toEqual({ title: { hu: 'Cím' }, trustBullets: { hu: [{ value: 'Egy' }] } }) - expect(update.$set.cta).toEqual({ title: { hu: 'CTA' } }) - expect(update.$set).not.toHaveProperty('_id') - expect(update.$set).not.toHaveProperty('globalType') - }) - - it('should not rewrite a global whose values are already localized', async () => { - const { args, globals } = setup() - await up(args) - const ids = globals.updateOne.mock.calls.map(([filter]) => filter._id) - expect(ids).not.toContain('g-common') - }) - - it('should migrate legacy version records and skip migrated ones', async () => { - const { args, homeVersions } = setup() - await up(args) - - expect(homeVersions.updateOne).toHaveBeenCalledTimes(1) - expect(homeVersions.updateOne).toHaveBeenCalledWith( - { _id: 'v1' }, - { $set: { version: { hero: { title: { hu: 'Régi cím' } } } } }, - { session: undefined }, - ) - }) - - it('should log a per-global summary', async () => { - const { args, payload } = setup() - await up(args) - expect(payload.logger.info).toHaveBeenCalledWith('MITHOME-111 locale migration: home — 4 value(s) rewritten') - }) - - it('should restore the hu value on down', async () => { - const { args, globals } = setup() - await down(args) - const commonCall = globals.updateOne.mock.calls.find(([filter]) => filter._id === 'g-common') - const [, update] = commonCall! - expect(update.$set.buttons).toEqual({ contact: 'Kapcsolat' }) - }) -}) diff --git a/proto/src/__tests__/localize-legal-pages-migration.test.ts b/proto/src/__tests__/localize-legal-pages-migration.test.ts deleted file mode 100644 index 4a541c7..0000000 --- a/proto/src/__tests__/localize-legal-pages-migration.test.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { down, up } from '../migrations/20260929_localize_legal_pages' -import { fakeArgs, fakeCollection } from './helpers/fake-mongo' - -const legacyPage = () => ({ - _id: 'p1', - slug: 'adatvedelem', - title: 'Adatvédelmi tájékoztató', - lastUpdated: '2026. augusztus 22.', - sections: [{ id: 'bevezetes', title: 'Bevezetés', content: 'Szöveg' }], - _status: 'published', -}) - -function setup() { - const pages = fakeCollection([legacyPage()]) - const versions = fakeCollection([{ _id: 'v1', latest: true, version: legacyPage() }]) - return { pages, versions, ...fakeArgs({ collections: { 'legal-pages': pages }, versions: { 'legal-pages': versions } }) } -} - -describe('20260929_localize_legal_pages migration (MITHOME-112)', () => { - it('should wrap title, date and section texts under hu, keeping slug and section ids shared', async () => { - const { args, pages } = setup() - await up(args) - expect(pages.docs[0]).toMatchObject({ - slug: 'adatvedelem', - title: { hu: 'Adatvédelmi tájékoztató' }, - lastUpdated: { hu: '2026. augusztus 22.' }, - sections: [{ id: 'bevezetes', title: { hu: 'Bevezetés' }, content: { hu: 'Szöveg' } }], - }) - expect(pages.updateOne.mock.calls[0][1].$set).not.toHaveProperty('slug') - }) - - it('should migrate version records and be idempotent', async () => { - const { args, versions, payload } = setup() - await up(args) - expect((versions.docs[0].version as { title: unknown }).title).toEqual({ hu: 'Adatvédelmi tájékoztató' }) - await up(args) - expect(payload.logger.info).toHaveBeenLastCalledWith('MITHOME-112 locale migration: legal-pages — 0 value(s) rewritten') - }) - - it('should restore the legacy shape on down', async () => { - const { args, pages } = setup() - await up(args) - await down(args) - expect(pages.docs[0]).toEqual(legacyPage()) - }) -}) diff --git a/proto/src/__tests__/migrate-docs.test.ts b/proto/src/__tests__/migrate-docs.test.ts deleted file mode 100644 index 9a7a7fd..0000000 --- a/proto/src/__tests__/migrate-docs.test.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { rewriteDocs } from '../lib/migrate-global-docs' -import { fakeArgs, fakeCollection } from './helpers/fake-mongo' - -type Doc = Record -const upper = (data: Doc) => { - if (typeof data.title !== 'string') return 0 - data.title = data.title.toUpperCase() - return 1 -} - -describe('rewriteDocs (MITHOME-112)', () => { - it('should rewrite every document of a collection and all its versions by default', async () => { - const docs = fakeCollection([ - { _id: 'a', slug: 'adatvedelem', title: 'a' }, - { _id: 'b', slug: 'hasznalati-feltetelek', title: 'b' }, - ]) - const versions = fakeCollection([ - { _id: 'v1', latest: false, version: { title: 'old' } }, - { _id: 'v2', latest: true, version: { title: 'new' } }, - ]) - const { args } = fakeArgs({ collections: { 'legal-pages': docs }, versions: { 'legal-pages': versions } }) - - const changed = await rewriteDocs(args, { kind: 'collection', slug: 'legal-pages' }, ['title'], upper) - - expect(changed).toBe(4) - expect(docs.updateOne).toHaveBeenCalledWith({ _id: 'a' }, { $set: { title: 'A' } }, { session: undefined }) - expect(versions.updateOne).toHaveBeenCalledTimes(2) - }) - - it('should only touch the latest version when scoped to latest', async () => { - const versions = fakeCollection([ - { _id: 'v1', latest: false, version: { title: 'old' } }, - { _id: 'v2', latest: true, version: { title: 'new' } }, - ]) - const { args } = fakeArgs({ collections: { 'legal-pages': fakeCollection([]) }, versions: { 'legal-pages': versions } }) - - await rewriteDocs(args, { kind: 'collection', slug: 'legal-pages' }, ['title'], upper, { versions: 'latest' }) - - expect(versions.updateOne).toHaveBeenCalledTimes(1) - expect(versions.updateOne).toHaveBeenCalledWith({ _id: 'v2' }, { $set: { version: { title: 'NEW' } } }, { session: undefined }) - }) - - it('should only read the targeted global', async () => { - const globals = fakeCollection([ - { _id: 'h', globalType: 'home', title: 'home' }, - { _id: 'c', globalType: 'common', title: 'common' }, - ]) - const { args } = fakeArgs({ globals }) - - expect(await rewriteDocs(args, { kind: 'global', slug: 'home' }, ['title'], upper)).toBe(1) - expect(globals.docs[1].title).toBe('common') - }) - - it('should skip a collection that does not exist and version records without data', async () => { - const versions = fakeCollection([{ _id: 'v', version: null }]) - const { args } = fakeArgs({ versions: { nope: versions } }) - expect(await rewriteDocs(args, { kind: 'collection', slug: 'nope' }, ['title'], upper)).toBe(0) - }) -}) diff --git a/proto/src/__tests__/partner-references-migration.test.ts b/proto/src/__tests__/partner-references-migration.test.ts deleted file mode 100644 index 4aae561..0000000 --- a/proto/src/__tests__/partner-references-migration.test.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { classifyPartner, seedReferencesSection, up } from '../migrations/20260929_partner_references' -import { markAtlantiszPending, PENDING_REFERENCE } from '../migrations/20260929_atlantisz_pending' -import { fakeArgs, fakeCollection } from './helpers/fake-mongo' - -type Doc = Record - -describe('20260929_partner_references migration (MITHOME-131)', () => { - it('should mark the confirmed client as a client reference with written permission', () => { - const doc: Doc = { name: 'Angele Pihenőház', url: 'https://angelepihenohaz.hu' } - expect(classifyPartner(doc)).toBe(1) - expect(doc).toMatchObject({ relationship: 'client-reference', publicationPermission: 'granted' }) - expect(doc.permissionReference).toMatch(/Írásos engedély/) - }) - - it('should mark the Atlantisz contracted client as a client reference, pending until its logo is settled', () => { - const doc: Doc = { name: 'Atlantisz Horgászüdülő és Halásztanya' } - classifyPartner(doc) - expect(doc).toMatchObject({ relationship: 'client-reference', publicationPermission: 'pending' }) - }) - - it('should move an already granted Atlantisz entry to pending, but respect later admin decisions', () => { - const auto: Doc = { - name: 'Atlantisz Horgászüdülő és Halásztanya', - publicationPermission: 'granted', - permissionReference: 'Írásos engedély megvan (tulajdonosi megerősítés, 2026-09-29)', - } - expect(markAtlantiszPending(auto)).toBe(1) - expect(auto).toMatchObject({ publicationPermission: 'pending', permissionReference: PENDING_REFERENCE }) - expect(markAtlantiszPending(auto)).toBe(0) - const admin: Doc = { name: 'Atlantisz Horgászüdülő és Halásztanya', publicationPermission: 'granted', permissionReference: 'E-mail, 2026-10-05' } - expect(markAtlantiszPending(admin)).toBe(0) - const angele: Doc = { name: 'Angele Pihenőház', publicationPermission: 'granted', permissionReference: 'Írásos engedély megvan (tulajdonosi megerősítés, 2026-09-29)' } - expect(markAtlantiszPending(angele)).toBe(0) - }) - - it('should hide any other uncategorised entry until someone classifies it', () => { - const doc: Doc = { name: 'Ismeretlen Kft.' } - classifyPartner(doc) - expect(doc).toEqual({ name: 'Ismeretlen Kft.', publicationPermission: 'none' }) - }) - - it('should not touch an already categorised entry', () => { - const doc: Doc = { name: 'Angele Pihenőház', relationship: 'supplier', publicationPermission: 'pending' } - expect(classifyPartner(doc)).toBe(0) - expect(doc.relationship).toBe('supplier') - }) - - it('should seed the section copy in both languages only when missing', () => { - const doc: Doc = {} - seedReferencesSection(doc) - expect(doc.referencesSection).toMatchObject({ - clientsTitle: { hu: 'Akik már minket választottak', en: 'Clients who chose us' }, - relationshipLabels: { infrastructure: { hu: 'Technológiai háttér', en: 'Infrastructure provider' } }, - }) - const edited: Doc = { referencesSection: { clientsTitle: { hu: 'Saját cím' } } } - expect(seedReferencesSection(edited)).toBe(0) - }) - - it('should update the partners collection and the home global, idempotently', async () => { - const partners = fakeCollection([{ _id: 'p1', name: 'Angele Pihenőház' }]) - const globals = fakeCollection([{ _id: 'h', globalType: 'home' }]) - const { args, payload } = fakeArgs({ globals, collections: { partners } }) - await up(args) - expect(payload.logger.info).toHaveBeenLastCalledWith('MITHOME-131 references: 1 partner record(s) classified, 1 home record(s) seeded') - await up(args) - expect(payload.logger.info).toHaveBeenLastCalledWith('MITHOME-131 references: 0 partner record(s) classified, 0 home record(s) seeded') - }) -}) diff --git a/proto/src/__tests__/service-claims-migration.test.ts b/proto/src/__tests__/service-claims-migration.test.ts deleted file mode 100644 index 043cde1..0000000 --- a/proto/src/__tests__/service-claims-migration.test.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { SERVICE_CLAIM_INSERTIONS, SERVICE_CLAIM_REVISIONS, up } from '../migrations/20260929_service_claims' -import translations from '../content/translations/en.json' -import { fakeArgs, fakeCollection } from './helpers/fake-mongo' - -type Doc = Record -const memory: Record = translations - -describe('20260929_service_claims migration (MITHOME-129)', () => { - it('should know the old AI-draft English of every revised text', () => { - for (const revision of SERVICE_CLAIM_REVISIONS) { - expect(revision.enWas).toBe(memory[revision.from]) - expect(revision.enWas).toBeTruthy() - } - }) - - it('should keep the translation memory in sync with the new texts', () => { - for (const revision of SERVICE_CLAIM_REVISIONS) expect(memory[revision.to]).toBe(revision.enTo) - for (const insertion of SERVICE_CLAIM_INSERTIONS) expect(memory[insertion.hu]).toBe(insertion.en) - }) - - it('should not promise 99.9%, unlimited traffic, Python/Node/PostgreSQL or immediate response any more', () => { - const newTexts = SERVICE_CLAIM_REVISIONS.flatMap((r) => [r.to, r.enTo]).join('\n') - expect(newTexts).not.toMatch(/99,9|99\.9|korlátlan|unlimited|Python|Node\.js|PostgreSQL|Azonnali|világszerte|100GB|20GB/i) - }) - - it('should revise the services global: text, list items, inserted e-mail feature', async () => { - const services: Doc = { - _id: 's', - globalType: 'services', - details: { - services: [ - { - icon: '📧', - description: { hu: 'Más leírás' }, - specs: { - items: { - hu: [{ value: 'Mobilalkalmazás szinkronizáció', id: 'a' }, { value: 'Backup és archiválás ', id: 'b' }], - en: [{ value: memory['Mobilalkalmazás szinkronizáció'], id: 'c' }, { value: memory['Backup és archiválás '], id: 'd' }], - }, - }, - }, - ], - }, - support: { channels: [{ icon: '🚨', title: { hu: 'Sürgős esetek' }, description: { hu: 'Azonnali beavatkozás', en: memory['Azonnali beavatkozás'] } }] }, - enTranslationStatus: 'ai-draft', - } - const globals = fakeCollection([services]) - const { args, payload } = fakeArgs({ globals }) - await up(args) - - const items = (services.details as { services: { specs: { items: { hu: { value: string }[]; en: { value: string }[] } } }[] }).services[0].specs.items - expect(items.hu.map((r) => r.value)).toEqual([ - 'Mobilalkalmazás szinkronizáció', - 'Napi mentés, 7 napos visszaállítással', - 'Automatikus figyelmeztetés 90%-os postafiók-telítettségnél', - ]) - expect(items.en.map((r) => r.value)).toEqual(['Mobile app synchronisation', 'Daily backup with 7-day restore', 'Automatic warning when a mailbox is 90% full']) - expect((services.support as { channels: { description: Doc }[] }).channels[0].description).toEqual({ - hu: '0–24 órás riasztás, a beavatkozás tipikusan 2–4 órán belül megkezdődik', - en: '24/7 alerting; work typically starts within 2–4 hours', - }) - expect(payload.logger.info).toHaveBeenCalledWith('MITHOME-129 service claims: services — 3 text(s) revised') - - await up(args) - expect(payload.logger.info).toHaveBeenLastCalledWith('MITHOME-129 service claims: contact — 0 text(s) revised') - expect(items.hu).toHaveLength(3) - }) -}) diff --git a/proto/src/components/views/HostingPlansView.test.tsx b/proto/src/components/views/HostingPlansView.test.tsx index 64225bf..4daf914 100644 --- a/proto/src/components/views/HostingPlansView.test.tsx +++ b/proto/src/components/views/HostingPlansView.test.tsx @@ -1,7 +1,7 @@ import { render, screen, within } from '@testing-library/react' import '@testing-library/jest-dom' import HostingPlansView from './HostingPlansView' -import { HOSTING_PLANS_PAGE_COPY, pickLanguage } from '@/migrations/20260929_hosting_plans' +import { HOSTING_PLANS_PAGE_COPY, pickLanguage } from '@/content/seeds/hosting-plans' import type { HostingPlanView } from '@/lib/products' type Content = Parameters[0]['content'] diff --git a/proto/src/content/seeds/hosting-plans.test.ts b/proto/src/content/seeds/hosting-plans.test.ts new file mode 100644 index 0000000..34eeb2e --- /dev/null +++ b/proto/src/content/seeds/hosting-plans.test.ts @@ -0,0 +1,27 @@ +import { HOSTING_PLAN_SEEDS, productData } from './hosting-plans' + +describe('hosting plans seed (MITHOME-130)', () => { + it('should seed the catalogue figures and prices as a draft, with an English AI draft', () => { + const start = productData(HOSTING_PLAN_SEEDS[0], 'hu') + expect(start).toMatchObject({ + slug: 'mit-start', + productType: 'hosting', + status: 'draft', + enTranslationStatus: 'ai-draft', + pricing: { netAmount: 14900, billingPeriod: 'yearly' }, + serviceDefinition: { storageGb: 3, mailStorageGb: 1, databases: 1, mailboxes: 5, ssl: true, spamFilter: true }, + _status: 'published', + }) + expect(productData(HOSTING_PLAN_SEEDS[1], 'hu')).toMatchObject({ + highlighted: true, + pricing: { netAmount: 23900 }, + serviceDefinition: { storageGb: 8, mailStorageGb: 4, domainAliases: 2, databases: 2, mailboxes: 10 }, + }) + }) + + it('should write only localized fields in English', () => { + const en = productData(HOSTING_PLAN_SEEDS[0], 'en') + expect(Object.keys(en).sort()).toEqual(['_status', 'public', 'serviceDefinition']) + expect(en.serviceDefinition).toEqual({ backup: 'Daily, with 7-day restore' }) + }) +}) diff --git a/proto/src/migrations/20260929_hosting_plans.ts b/proto/src/content/seeds/hosting-plans.ts similarity index 69% rename from proto/src/migrations/20260929_hosting_plans.ts rename to proto/src/content/seeds/hosting-plans.ts index 2d6f96c..7af6c9c 100644 --- a/proto/src/migrations/20260929_hosting_plans.ts +++ b/proto/src/content/seeds/hosting-plans.ts @@ -1,21 +1,10 @@ /** - * MITHOME-130: seed the hosting plans (mIT Start, mIT Mid) and the copy of - * the hosting plans page. - * - * Figures and prices come from the central catalogue — mitplatform - * docs/plans/PLATFM-14-products-v0.json, catalogVersion 0.1.1 (owner - * decision 2026-09-29: variant B, yearly billing, net + 27% VAT). - * - * - Products are created in the "draft" lifecycle status: staging shows - * them for review, production does not (src/lib/products.ts). - * - English is an AI draft (enTranslationStatus "ai-draft"). - * - Only creates what is missing (product by slug, page copy when empty); - * never touches existing data. Idempotent. - * - * WHY the Local API (not rewriteDocs): these are new documents, and the - * Local API writes the version records and the Payload `_status` for us. + * MITHOME-130: hosting plans (mIT Start, mIT Mid) and the hosting plans page + * copy, hu + en. Figures and prices from the central catalogue — mitplatform + * docs/plans/PLATFM-14-products-v0.json (owner decision 2026-09-29: variant B, + * yearly billing, net + 27% VAT). Seed data for a fresh database; moved here + * from the MongoDB data migration (MITHOME-136). */ -import type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/db-mongodb' type Copy = { hu: string; en: string } type ListCopy = { hu: string[]; en: string[] } @@ -146,31 +135,3 @@ export function productData(seed: Seed, lang: Lang): Record { _status: 'published', } } - -export async function up({ payload, req }: MigrateUpArgs): Promise { - let created = 0 - for (const seed of HOSTING_PLAN_SEEDS) { - const existing = await payload.find({ collection: 'products', where: { slug: { equals: seed.slug } }, limit: 1, depth: 0, req }) - if (existing.docs.length > 0) continue - const doc = await payload.create({ collection: 'products', data: productData(seed, 'hu') as never, locale: 'hu', req }) - await payload.update({ collection: 'products', id: doc.id, data: productData(seed, 'en') as never, locale: 'en', req }) - created += 1 - } - - let pageSeeded = 0 - const page = await payload.findGlobal({ slug: 'hosting-plans', locale: 'hu', depth: 0, req }) - if (!page?.hero?.title) { - const copy = HOSTING_PLANS_PAGE_COPY as unknown as Tree - const hu = { ...pickLanguage(copy, 'hu'), vatRatePercent: 27, enTranslationStatus: 'ai-draft', _status: 'published' } - await payload.updateGlobal({ slug: 'hosting-plans', data: hu as never, locale: 'hu', req }) - await payload.updateGlobal({ slug: 'hosting-plans', data: { ...pickLanguage(copy, 'en'), _status: 'published' } as never, locale: 'en', req }) - pageSeeded = 1 - } - - payload.logger.info(`MITHOME-130 hosting plans: ${created} product(s) created, ${pageSeeded} page copy seeded`) -} - -/** DECISION: no automatic down — restore the pre-deploy dump instead. */ -export async function down({ payload }: MigrateDownArgs): Promise { - payload.logger.warn('MITHOME-130 hosting plans: down is a no-op — restore the pre-deploy dump instead') -} diff --git a/proto/src/content/seeds/references.ts b/proto/src/content/seeds/references.ts new file mode 100644 index 0000000..2bf92df --- /dev/null +++ b/proto/src/content/seeds/references.ts @@ -0,0 +1,44 @@ +/** + * MITHOME-131/133: confirmed client references and the references section + * copy (hu + en). Seed data for a fresh database; the live values are edited + * in the Payload admin. Moved here from the MongoDB data migration when the + * site switched to PostgreSQL (MITHOME-136). + */ +export const CONFIRMED_CLIENT_REFERENCES = [ + { + name: 'Angele Pihenőház', + permission: 'granted', + permissionReference: 'Írásos engedély megvan (tulajdonosi megerősítés, 2026-09-29)', + }, + { + // Contracted client (its site runs on our infrastructure) — a client + // reference, not a partner, per the research's categories. + // Kept "pending" until the logo (white text, unreadable on a light + // background) and the official name are settled (MITHOME-133). + name: 'Atlantisz Horgászüdülő és Halásztanya', + permission: 'pending', + permissionReference: 'Írásos engedély megvan; logó és hivatalos név egyeztetés alatt (MITHOME-133)', + }, +] as const + +type Copy = Record<'hu' | 'en', string> + +export const REFERENCES_SECTION_COPY: { + clientsTitle: Copy + clientsSubtitle: Copy + partnersTitle: Copy + partnersSubtitle: Copy + relationshipLabels: Record<'technologyPartner' | 'infrastructure' | 'supplier' | 'technologyUsed' | 'professionalPartner', Copy> +} = { + clientsTitle: { hu: 'Akik már minket választottak', en: 'Clients who chose us' }, + clientsSubtitle: { hu: 'Ügyfeleink, akik hozzájárultak a bemutatásukhoz', en: 'Clients who agreed to be featured' }, + partnersTitle: { hu: 'Partnereink és technológiai hátterünk', en: 'Our partners and technology' }, + partnersSubtitle: { hu: 'Szervezetek, amelyek közreműködnek a szolgáltatásainkban', en: 'Organisations that contribute to our services' }, + relationshipLabels: { + technologyPartner: { hu: 'Technológiai partner', en: 'Technology partner' }, + infrastructure: { hu: 'Technológiai háttér', en: 'Infrastructure provider' }, + supplier: { hu: 'Beszállító', en: 'Supplier' }, + technologyUsed: { hu: 'Általunk használt technológia', en: 'Technology we use' }, + professionalPartner: { hu: 'Szakmai partner', en: 'Professional partner' }, + }, +} diff --git a/proto/src/lib/content-revision.test.ts b/proto/src/lib/content-revision.test.ts deleted file mode 100644 index ab17381..0000000 --- a/proto/src/lib/content-revision.test.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { reviseContent, type ListInsertion, type TextRevision } from './content-revision' -import { collectLocalizedPaths } from './localize-paths' - -type Doc = Record - -const FIELDS = [ - { name: 'title', type: 'text', localized: true }, - { name: 'items', type: 'array', localized: true, fields: [{ name: 'value', type: 'text' }] }, -] -const PATHS = collectLocalizedPaths(FIELDS) - -const REVISIONS: TextRevision[] = [ - { from: 'Régi cím', to: 'Új cím', enWas: 'Old title', enTo: 'New title' }, - { from: 'Régi elem', to: 'Új elem', enWas: 'Old item', enTo: 'New item' }, -] -const INSERTIONS: ListInsertion[] = [{ afterHu: 'Új elem', hu: 'Beszúrt', afterEn: 'New item', en: 'Inserted' }] - -let seq = 0 -const newId = () => `id-${++seq}` -beforeEach(() => { - seq = 0 -}) - -const doc = (): Doc => ({ - title: { hu: 'Régi cím', en: 'Old title' }, - items: { - hu: [{ value: 'Régi elem', id: 'h1' }, { value: 'Marad', id: 'h2' }], - en: [{ value: 'Old item', id: 'e1' }, { value: 'Stays', id: 'e2' }], - }, - enTranslationStatus: 'ai-draft', -}) - -describe('reviseContent (MITHOME-129)', () => { - it('should replace exact Hungarian matches and their AI-draft English', () => { - const d = doc() - const report = reviseContent(d, PATHS, REVISIONS, [], newId) - expect(d.title).toEqual({ hu: 'Új cím', en: 'New title' }) - expect(d.items).toEqual({ - hu: [{ value: 'Új elem', id: 'h1' }, { value: 'Marad', id: 'h2' }], - en: [{ value: 'New item', id: 'e1' }, { value: 'Stays', id: 'e2' }], - }) - expect(report).toEqual({ changed: 2, enKept: [] }) - }) - - it('should leave text an editor already rewrote untouched', () => { - const d: Doc = { title: { hu: 'Szerkesztett cím', en: 'Edited title' } } - expect(reviseContent(d, PATHS, REVISIONS, [], newId)).toEqual({ changed: 0, enKept: [] }) - expect(d.title).toEqual({ hu: 'Szerkesztett cím', en: 'Edited title' }) - }) - - it('should keep and report a human English edit', () => { - const d: Doc = { title: { hu: 'Régi cím', en: 'Human title' } } - const report = reviseContent(d, PATHS, REVISIONS, [], newId) - expect(d.title).toEqual({ hu: 'Új cím', en: 'Human title' }) - expect(report.enKept).toEqual(['Régi cím']) - }) - - it('should report a list item whose English row was edited by a person', () => { - const d = doc() - ;(d.items as { en: { value: string }[] }).en[0].value = 'Human item' - const report = reviseContent(d, PATHS, REVISIONS, [], newId) - expect(report.enKept).toEqual(['Régi elem']) - expect((d.items as { en: { value: string }[] }).en[0].value).toBe('Human item') - }) - - it('should fill an empty English value', () => { - const d: Doc = { title: { hu: 'Régi cím' } } - reviseContent(d, PATHS, REVISIONS, [], newId) - expect(d.title).toEqual({ hu: 'Új cím', en: 'New title' }) - }) - - it('should insert a list item after its anchor in both languages, once', () => { - const d = doc() - reviseContent(d, PATHS, REVISIONS, INSERTIONS, newId) - reviseContent(d, PATHS, REVISIONS, INSERTIONS, newId) - const items = d.items as { hu: { value: string }[]; en: { value: string }[] } - expect(items.hu.map((r) => r.value)).toEqual(['Új elem', 'Beszúrt', 'Marad']) - expect(items.en.map((r) => r.value)).toEqual(['New item', 'Inserted', 'Stays']) - }) - - it('should be idempotent', () => { - const d = doc() - reviseContent(d, PATHS, REVISIONS, INSERTIONS, newId) - const snapshot = JSON.stringify(d) - expect(reviseContent(d, PATHS, REVISIONS, INSERTIONS, newId)).toEqual({ changed: 0, enKept: [] }) - expect(JSON.stringify(d)).toBe(snapshot) - }) - - it('should send an approved page back to AI draft when its English changed', () => { - const d = { ...doc(), enTranslationStatus: 'approved' } - reviseContent(d, PATHS, REVISIONS, [], newId) - expect(d.enTranslationStatus).toBe('ai-draft') - }) - - it('should keep an approved status when only Hungarian changed', () => { - const d: Doc = { title: { hu: 'Régi cím', en: 'Human title' }, enTranslationStatus: 'approved' } - reviseContent(d, PATHS, REVISIONS, [], newId) - expect(d.enTranslationStatus).toBe('approved') - }) - - it('should ignore legacy unwrapped values and lists without an anchor', () => { - const d: Doc = { title: 'Régi cím', items: { hu: [{ value: 'Más', id: 'x' }] } } - expect(reviseContent(d, PATHS, REVISIONS, INSERTIONS, newId)).toEqual({ changed: 0, enKept: [] }) - }) -}) diff --git a/proto/src/lib/content-revision.ts b/proto/src/lib/content-revision.ts deleted file mode 100644 index d8ca098..0000000 --- a/proto/src/lib/content-revision.ts +++ /dev/null @@ -1,96 +0,0 @@ -/** - * MITHOME-129: exact-match content revision on localized fields, in place. - * - * Used by data migrations that correct published copy (e.g. service claims - * aligned with the real product range). Rules: - * - a value changes only when its current Hungarian text is EXACTLY the - * expected old text — anything an editor already rewrote is left alone; - * - English is replaced only when it is empty or still the old AI draft - * (`enWas`) — a human English edit is kept and reported instead; - * - if English changed on a page whose translation was approved, the page - * goes back to "ai-draft": the new English has not been reviewed yet. - * Works for localized text leaves and whole-array localized string lists - * ({ value } rows), where it can also insert a new item after an anchor. - */ -import { applyAll, isPlainObject, type LocalizedPath } from './localize-paths' - -export type TextRevision = { from: string; to: string; enWas?: string; enTo: string } -export type ListInsertion = { afterHu: string; hu: string; afterEn: string; en: string } -export type RevisionReport = { changed: number; enKept: string[] } - -type Row = { value?: unknown; id?: unknown } - -const isEmpty = (value: unknown) => value === undefined || value === null || value === '' - -function reviseText(value: Record, revisions: readonly TextRevision[], report: RevisionReport) { - const revision = revisions.find((r) => r.from === value.hu) - if (!revision) return { hu: false, en: false } - value.hu = revision.to - if (isEmpty(value.en) || value.en === revision.enWas) { - value.en = revision.enTo - return { hu: true, en: true } - } - report.enKept.push(revision.from) - return { hu: true, en: false } -} - -function reviseRows(rows: Row[], match: (text: string) => string | undefined): number { - let count = 0 - for (const row of rows) { - const next = typeof row.value === 'string' ? match(row.value) : undefined - if (next !== undefined) { - row.value = next - count += 1 - } - } - return count -} - -function insertRow(rows: Row[], after: string, text: string, newId: () => string): boolean { - if (rows.some((row) => row.value === text)) return false - const index = rows.findIndex((row) => row.value === after) - if (index === -1) return false - rows.splice(index + 1, 0, { value: text, id: newId() }) - return true -} - -export function reviseContent( - doc: Record, - paths: readonly LocalizedPath[], - revisions: readonly TextRevision[], - insertions: readonly ListInsertion[], - newId: () => string, -): RevisionReport { - const report: RevisionReport = { changed: 0, enKept: [] } - let enChanged = false - - applyAll(doc, paths, (value) => { - if (!isPlainObject(value)) return { value, changed: false } - - if (typeof value.hu === 'string') { - const result = reviseText(value, revisions, report) - enChanged ||= result.en - if (result.hu) report.changed += 1 - return { value, changed: result.hu } - } - - if (!Array.isArray(value.hu)) return { value, changed: false } - const hu = value.hu as Row[] - const en = Array.isArray(value.en) ? (value.en as Row[]) : undefined - const huMatched = revisions.filter((r) => hu.some((row) => row.value === r.from)) - let count = reviseRows(hu, (text) => revisions.find((r) => r.from === text)?.to) - const enCount = en ? reviseRows(en, (text) => revisions.find((r) => r.enWas !== undefined && r.enWas === text)?.enTo) : 0 - // A Hungarian row changed but its English row was not the old AI draft. - if (en && enCount < huMatched.length) report.enKept.push(...huMatched.map((r) => r.from).slice(enCount)) - for (const insertion of insertions) { - if (insertRow(hu, insertion.afterHu, insertion.hu, newId)) count += 1 - if (en && insertRow(en, insertion.afterEn, insertion.en, newId)) enChanged = true - } - enChanged ||= enCount > 0 - report.changed += count - return { value, changed: count > 0 || enCount > 0 } - }) - - if (enChanged && doc.enTranslationStatus === 'approved') doc.enTranslationStatus = 'ai-draft' - return report -} diff --git a/proto/src/lib/english-draft.test.ts b/proto/src/lib/english-draft.test.ts deleted file mode 100644 index 8496068..0000000 --- a/proto/src/lib/english-draft.test.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { fillEnglishDraft } from './english-draft' -import { collectLocalizedPaths } from './localize-paths' - -type Doc = Record - -const FIELDS = [ - { name: 'title', type: 'text', localized: true }, - { name: 'paragraphs', type: 'array', localized: true, fields: [{ name: 'value', type: 'text' }] }, - { name: 'items', type: 'array', fields: [{ name: 'icon', type: 'text' }, { name: 'label', type: 'text', localized: true }] }, -] -const PATHS = collectLocalizedPaths(FIELDS) -const MEMORY = { Cím: 'Title', Egy: 'One', Kettő: 'Two', Címke: 'Label' } - -let seq = 0 -const newId = () => `new-${++seq}` -beforeEach(() => { - seq = 0 -}) - -const doc = (): Doc => ({ - title: { hu: 'Cím' }, - paragraphs: { hu: [{ value: 'Egy', id: 'p1' }, { value: 'Kettő', id: 'p2' }] }, - items: [{ id: 'r1', icon: 'star', label: { hu: 'Címke' } }], -}) - -describe('fillEnglishDraft (MITHOME-113)', () => { - it('should fill empty English values from the memory and mark the page as AI draft', () => { - const d = doc() - const report = fillEnglishDraft(d, PATHS, MEMORY, newId) - - expect(report).toEqual({ filled: 3, unmatched: [] }) - expect(d.title).toEqual({ hu: 'Cím', en: 'Title' }) - expect(d.paragraphs).toEqual({ - hu: [{ value: 'Egy', id: 'p1' }, { value: 'Kettő', id: 'p2' }], - en: [{ value: 'One', id: 'new-1' }, { value: 'Two', id: 'new-2' }], - }) - expect(d.items).toEqual([{ id: 'r1', icon: 'star', label: { hu: 'Címke', en: 'Label' } }]) - expect(d.enTranslationStatus).toBe('ai-draft') - }) - - it('should leave an edited Hungarian text without English and report it', () => { - const d = doc() - d.title = { hu: 'Új cím' } - const report = fillEnglishDraft(d, PATHS, MEMORY, newId) - expect(d.title).toEqual({ hu: 'Új cím' }) - expect(report.unmatched).toEqual(['Új cím']) - }) - - it('should never overwrite an existing English value', () => { - const d = doc() - d.title = { hu: 'Cím', en: 'Human title' } - fillEnglishDraft(d, PATHS, MEMORY, newId) - expect(d.title).toEqual({ hu: 'Cím', en: 'Human title' }) - }) - - it('should not fill a list partially', () => { - const d = doc() - d.paragraphs = { hu: [{ value: 'Egy', id: 'p1' }, { value: 'Ismeretlen', id: 'p2' }] } - const report = fillEnglishDraft(d, PATHS, MEMORY, newId) - expect(d.paragraphs).not.toHaveProperty('en') - expect(report.unmatched).toHaveLength(1) - }) - - it('should treat an empty English list as empty', () => { - const d = doc() - d.paragraphs = { hu: [{ value: 'Egy', id: 'p1' }], en: [] } - fillEnglishDraft(d, PATHS, MEMORY, newId) - expect((d.paragraphs as { en: unknown[] }).en).toHaveLength(1) - }) - - it('should be idempotent', () => { - const d = doc() - fillEnglishDraft(d, PATHS, MEMORY, newId) - const snapshot = JSON.stringify(d) - expect(fillEnglishDraft(d, PATHS, MEMORY, newId)).toEqual({ filled: 0, unmatched: [] }) - expect(JSON.stringify(d)).toBe(snapshot) - }) - - it.each(['approved', 'ai-draft'])('should keep an existing "%s" status', (status) => { - const d = { ...doc(), enTranslationStatus: status } - fillEnglishDraft(d, PATHS, MEMORY, newId) - expect(d.enTranslationStatus).toBe(status) - }) - - it('should not change the status when nothing was filled', () => { - const d: Doc = { title: { hu: 'Ismeretlen' }, enTranslationStatus: 'none' } - fillEnglishDraft(d, PATHS, MEMORY, newId) - expect(d.enTranslationStatus).toBe('none') - }) - - it('should skip empty Hungarian values and legacy (unwrapped) strings', () => { - const d: Doc = { title: 'Cím', paragraphs: { hu: [] } } - expect(fillEnglishDraft(d, PATHS, MEMORY, newId)).toEqual({ filled: 0, unmatched: [] }) - }) -}) diff --git a/proto/src/lib/english-draft.ts b/proto/src/lib/english-draft.ts deleted file mode 100644 index 634de24..0000000 --- a/proto/src/lib/english-draft.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * MITHOME-113: fills empty English values from the hu -> en translation - * memory (src/content/translations/en.json), in place. - * - * Rules (design D5): - * - only an EMPTY `en` is filled — human English edits are never touched; - * - only when the current `hu` text is EXACTLY a memory key — a Hungarian - * text edited after translation gets no (stale) English; - * - a whole-array localized list is filled all-or-nothing, so a list is - * never half English; - * - `enTranslationStatus` goes none -> ai-draft when something was filled; - * "approved" is never set here. - */ -import { applyAll, isPlainObject, type LocalizedPath } from './localize-paths' - -type Row = { value?: unknown; id?: unknown } -export type DraftReport = { filled: number; unmatched: string[] } - -const isEmpty = (value: unknown) => - value === undefined || value === null || value === '' || (Array.isArray(value) && value.length === 0) - -function translateList(rows: Row[], memory: Record, newId: () => string): Row[] | undefined { - const values = rows.map((row) => row.value) - if (!values.every((v): v is string => typeof v === 'string' && v in memory)) return undefined - return values.map((v) => ({ value: memory[v], id: newId() })) -} - -export function fillEnglishDraft( - doc: Record, - paths: readonly LocalizedPath[], - memory: Record, - newId: () => string, -): DraftReport { - const report: DraftReport = { filled: 0, unmatched: [] } - - applyAll(doc, paths, (value) => { - if (!isPlainObject(value) || !isEmpty(value.en) || isEmpty(value.hu)) return { value, changed: false } - const hu = value.hu - const en = - typeof hu === 'string' ? memory[hu] : Array.isArray(hu) ? translateList(hu as Row[], memory, newId) : undefined - if (en === undefined) { - report.unmatched.push(typeof hu === 'string' ? hu : JSON.stringify(hu)) - return { value, changed: false } - } - value.en = en - report.filled += 1 - return { value, changed: true } - }) - - if (report.filled > 0 && (isEmpty(doc.enTranslationStatus) || doc.enTranslationStatus === 'none')) { - doc.enTranslationStatus = 'ai-draft' - } - return report -} diff --git a/proto/src/lib/localize-paths.test.ts b/proto/src/lib/localize-paths.test.ts deleted file mode 100644 index 6b375f5..0000000 --- a/proto/src/lib/localize-paths.test.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { collectLocalizedPaths, topLevelKeys, unwrapLocalized, wrapLocalized } from './localize-paths' -import { Home } from '../globals/Home' -import { Common } from '../globals/Common' - -type Doc = Record - -const FIELDS = [ - { - name: 'hero', - type: 'group', - fields: [ - { name: 'title', type: 'text', localized: true }, - { name: 'bullets', type: 'array', localized: true, fields: [{ name: 'value', type: 'text' }] }, - ], - }, - { - name: 'items', - type: 'array', - fields: [ - { name: 'icon', type: 'text' }, - { name: 'title', type: 'text', localized: true }, - { name: 'features', type: 'array', localized: true, fields: [{ name: 'value', type: 'text' }] }, - ], - }, - { name: 'address', type: 'text' }, - { name: 'external', type: 'checkbox' }, -] - -function legacyDoc(): Doc { - return { - hero: { title: 'Cím', bullets: [{ id: 'b1', value: 'Egy' }] }, - items: [ - { id: 'r1', icon: 'star', title: 'Első', features: [{ id: 'f1', value: 'A' }] }, - { id: 'r2', icon: 'bolt', title: 'Második', features: [] }, - ], - address: 'Budapest', - external: false, - } -} - -describe('collectLocalizedPaths', () => { - it('should collect localized leaves through groups and shared array rows', () => { - expect(collectLocalizedPaths(FIELDS)).toEqual([ - ['hero', 'title'], - ['hero', 'bullets'], - ['items', '[]', 'title'], - ['items', '[]', 'features'], - ]) - }) - - it('should look through unnamed row/collapsible wrappers', () => { - expect( - collectLocalizedPaths([ - { name: 'g', type: 'group', fields: [{ type: 'row', fields: [{ name: 't', type: 'text', localized: true }] }] }, - { type: 'collapsible', fields: [{ name: 'u', type: 'text', localized: true }] }, - ]), - ).toEqual([['g', 't'], ['u']]) - }) - - it('should throw on layout fields that could hide localized data', () => { - expect(() => collectLocalizedPaths([{ type: 'tabs' }])).toThrow('unsupported field type "tabs"') - }) - - it('should derive paths from the real Global configs', () => { - const homePaths = collectLocalizedPaths(Home.fields as never) - expect(homePaths).toContainEqual(['hero', 'trustBullets']) - expect(homePaths).toContainEqual(['services', 'items', '[]', 'features']) - expect(homePaths).not.toContainEqual(['about', 'usps', '[]', 'icon']) - expect(collectLocalizedPaths(Common.fields as never)).not.toContainEqual(['footer', 'address']) - }) -}) - -describe('wrapLocalized', () => { - const paths = collectLocalizedPaths(FIELDS) - - it('should wrap strings and arrays under the hu locale and keep shared values', () => { - const doc = legacyDoc() - const changed = wrapLocalized(doc, paths) - - expect(changed).toBe(6) - expect(doc.hero).toEqual({ title: { hu: 'Cím' }, bullets: { hu: [{ id: 'b1', value: 'Egy' }] } }) - expect(doc.items).toEqual([ - { id: 'r1', icon: 'star', title: { hu: 'Első' }, features: { hu: [{ id: 'f1', value: 'A' }] } }, - { id: 'r2', icon: 'bolt', title: { hu: 'Második' }, features: { hu: [] } }, - ]) - expect(doc.address).toBe('Budapest') - expect(doc.external).toBe(false) - }) - - it('should be idempotent on already migrated data', () => { - const doc = legacyDoc() - wrapLocalized(doc, paths) - const snapshot = JSON.stringify(doc) - - expect(wrapLocalized(doc, paths)).toBe(0) - expect(JSON.stringify(doc)).toBe(snapshot) - }) - - it('should leave existing locale maps (e.g. Common.buttons) untouched', () => { - const doc: Doc = { hero: { title: { hu: 'Cím', en: 'Title' } } } - expect(wrapLocalized(doc, paths)).toBe(0) - expect(doc).toEqual({ hero: { title: { hu: 'Cím', en: 'Title' } } }) - }) - - it('should skip missing branches and null values', () => { - const doc: Doc = { hero: { title: null }, items: null } - expect(wrapLocalized(doc, paths)).toBe(0) - expect(doc).toEqual({ hero: { title: null }, items: null }) - }) - - it('should not descend into a row path when the stored value is not an array', () => { - const doc: Doc = { items: { unexpected: true } } - expect(wrapLocalized(doc, paths)).toBe(0) - }) -}) - -describe('unwrapLocalized', () => { - const paths = collectLocalizedPaths(FIELDS) - - it('should restore the legacy shape from the hu value', () => { - const doc = legacyDoc() - wrapLocalized(doc, paths) - ;(doc.hero as Doc).title = { hu: 'Cím', en: 'Title' } - - expect(unwrapLocalized(doc, paths)).toBe(6) - expect(doc).toEqual(legacyDoc()) - }) - - it('should fall back to null when the hu value is missing', () => { - const doc: Doc = { hero: { title: { en: 'Title' } } } - unwrapLocalized(doc, paths) - expect(doc).toEqual({ hero: { title: null } }) - }) -}) - -describe('topLevelKeys', () => { - it('should return unique first segments', () => { - expect(topLevelKeys(collectLocalizedPaths(FIELDS))).toEqual(['hero', 'items']) - }) -}) diff --git a/proto/src/lib/localize-paths.ts b/proto/src/lib/localize-paths.ts deleted file mode 100644 index 51e88a6..0000000 --- a/proto/src/lib/localize-paths.ts +++ /dev/null @@ -1,119 +0,0 @@ -/** - * MITHOME-111: pure helpers for the "field became `localized: true`" - * data migration (design D4). - * - * WHY config-driven paths: the Global configs are the single source of - * truth for which fields are localized — deriving the migration paths from - * them means the migration can never drift from the schema. - * - * Storage shapes (Payload mongooseAdapter): - * non-localized text -> "szöveg" localized -> { hu: "szöveg" } - * non-localized array -> [{ value }] localized -> { hu: [{ value }] } - * A path segment `[]` means "every row of this (shared) array". - */ - -type FieldNode = { name?: string; type: string; localized?: boolean; fields?: FieldNode[] } - -export type LocalizedPath = readonly string[] - -const ARRAY_ROWS = '[]' - -/** Layout fields that could hide localized children — not traversed here. */ -const UNSUPPORTED_CONTAINERS = new Set(['tabs', 'blocks']) - -/** Unnamed layout wrappers: their children are stored at the same level. */ -const TRANSPARENT_CONTAINERS = new Set(['row', 'collapsible']) - -export function collectLocalizedPaths( - fields: readonly FieldNode[], - prefix: LocalizedPath = [], -): LocalizedPath[] { - const paths: LocalizedPath[] = [] - for (const field of fields) { - if (UNSUPPORTED_CONTAINERS.has(field.type)) { - // DECISION: fail fast rather than silently skip localized data. - throw new Error(`collectLocalizedPaths: unsupported field type "${field.type}"`) - } - if (TRANSPARENT_CONTAINERS.has(field.type)) { - paths.push(...collectLocalizedPaths(field.fields ?? [], prefix)) - continue - } - if (!field.name) continue - const path = [...prefix, field.name] - if (field.localized) { - paths.push(path) - } else if (field.type === 'group') { - paths.push(...collectLocalizedPaths(field.fields ?? [], path)) - } else if (field.type === 'array') { - paths.push(...collectLocalizedPaths(field.fields ?? [], [...path, ARRAY_ROWS])) - } - } - return paths -} - -export type Transform = (value: unknown) => { value: unknown; changed: boolean } - -export function isPlainObject(value: unknown): value is Record { - return typeof value === 'object' && value !== null && !Array.isArray(value) -} - -function applyAtPath(node: unknown, path: LocalizedPath, transform: Transform): number { - if (typeof node !== 'object' || node === null) return 0 - const [head, ...rest] = path - if (head === ARRAY_ROWS) { - if (!Array.isArray(node)) return 0 - return node.reduce((sum, row) => sum + applyAtPath(row, rest, transform), 0) - } - if (!isPlainObject(node)) return 0 - if (rest.length > 0) return applyAtPath(node[head], rest, transform) - - const result = transform(node[head]) - if (result.changed) node[head] = result.value - return result.changed ? 1 : 0 -} - -// WHY in-place mutation instead of structuredClone: raw Mongo documents -// carry BSON class instances (ObjectId) that a structured clone would -// silently turn into plain objects. Callers pass freshly read documents. -/** Applies `transform` to every value at `paths`, in place; returns the change count. */ -export function applyAll(doc: Record, paths: readonly LocalizedPath[], transform: Transform) { - return paths.reduce((sum, path) => sum + applyAtPath(doc, path, transform), 0) -} - -/** Top-level document keys touched by `paths` — the `$set` scope of a write. */ -export function topLevelKeys(paths: readonly LocalizedPath[]): string[] { - return [...new Set(paths.map((path) => path[0]))] -} - -/** - * Wraps legacy (non-localized) values into `{ [locale]: value }`, in place. - * Idempotent: values already stored as a locale map are left untouched, - * null/undefined are skipped (nothing to preserve). Returns the number of - * values changed. - */ -export function wrapLocalized( - doc: Record, - paths: readonly LocalizedPath[], - locale = 'hu', -) { - return applyAll(doc, paths, (value) => - typeof value === 'string' || Array.isArray(value) - ? { value: { [locale]: value }, changed: true } - : { value, changed: false }, - ) -} - -/** - * Inverse of wrapLocalized (down migration), in place: keeps only - * `locale`'s value. - * TRADEOFF: every other locale's value is dropped — take a DB dump first. - */ -export function unwrapLocalized( - doc: Record, - paths: readonly LocalizedPath[], - locale = 'hu', -) { - return applyAll(doc, paths, (value) => - isPlainObject(value) ? { value: value[locale] ?? null, changed: true } : { value, changed: false }, - ) -} diff --git a/proto/src/lib/migrate-global-docs.ts b/proto/src/lib/migrate-global-docs.ts deleted file mode 100644 index 2d3c446..0000000 --- a/proto/src/lib/migrate-global-docs.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Shared plumbing for Payload data migrations (MITHOME-111/112/113/123). - * - * Applies `transform` in place to a global's or collection's field data — - * the stored document(s) AND the draft/version records (`version` - * sub-document) — and writes back only what changed. - * - * DECISION: direct Mongo `updateOne` instead of the Local API — no new - * version is created, no hooks run, `updatedAt` stays untouched. - */ -import type { MigrateDownArgs, MigrateUpArgs, MongooseAdapter } from '@payloadcms/db-mongodb' - -type Args = MigrateUpArgs | MigrateDownArgs -type Data = Record - -export type DocTarget = { kind: 'global' | 'collection'; slug: string } - -type RewriteOptions = { - /** - * 'all' rewrites the whole history (shape changes must reach every - * version); 'latest' only the working copy the admin form loads (content - * imports should not rewrite history). - */ - versions?: 'all' | 'latest' -} - -function pick(doc: Data, keys: readonly string[]) { - return Object.fromEntries(keys.filter((key) => key in doc).map((key) => [key, doc[key]])) -} - -/** - * @param keys top-level field names `transform` may touch (the `$set` scope) - * @returns the number of values `transform` reported as changed - */ -export async function rewriteDocs( - { payload, session }: Args, - target: DocTarget, - keys: readonly string[], - transform: (data: Data) => number, - { versions: scope = 'all' }: RewriteOptions = {}, -): Promise { - const db = payload.db as unknown as MongooseAdapter - let changed = 0 - - const main = - target.kind === 'global' ? db.globals.collection : db.collections[target.slug]?.collection - const mainFilter = target.kind === 'global' ? { globalType: target.slug } : {} - if (main) { - for await (const doc of main.find(mainFilter, { session })) { - const count = transform(doc) - if (count > 0) { - await main.updateOne({ _id: doc._id }, { $set: pick(doc, keys) }, { session }) - changed += count - } - } - } - - const versions = db.versions[target.slug] - if (versions) { - const filter = scope === 'latest' ? { latest: true } : {} - for await (const doc of versions.collection.find(filter, { session })) { - if (typeof doc.version !== 'object' || doc.version === null) continue - const count = transform(doc.version) - if (count > 0) { - await versions.collection.updateOne({ _id: doc._id }, { $set: { version: doc.version } }, { session }) - changed += count - } - } - } - - return changed -} - -/** Global shorthand kept for the MITHOME-111/123 migrations. */ -export function rewriteGlobalDocs( - args: Args, - slug: string, - keys: readonly string[], - transform: (data: Data) => number, -): Promise { - return rewriteDocs(args, { kind: 'global', slug }, keys, transform) -} diff --git a/proto/src/lib/mongodb.test.ts b/proto/src/lib/mongodb.test.ts deleted file mode 100755 index 8fc1030..0000000 --- a/proto/src/lib/mongodb.test.ts +++ /dev/null @@ -1,162 +0,0 @@ -// Mock the MongoDB module completely -const mockDb = { - collection: jest.fn().mockReturnValue({ - findOne: jest.fn(), - insertOne: jest.fn(), - updateOne: jest.fn(), - deleteOne: jest.fn() - }), - admin: jest.fn().mockReturnValue({ - ping: jest.fn().mockResolvedValue(true) - }) -} - -const mockClient = { - connect: jest.fn(), - close: jest.fn().mockResolvedValue(undefined), - db: jest.fn().mockReturnValue(mockDb) -} - -const mockMongoLoggerError = jest.fn() - -jest.mock('./logger', () => ({ - dbLogger: { error: mockMongoLoggerError }, - getSafeErrorDetails: (error: unknown) => ({ - errorName: error instanceof Error ? error.name : 'Error' - }) -})) - -// The connect method should resolve to the client itself -mockClient.connect.mockResolvedValue(mockClient) - -const MockedMongoClient = jest.fn().mockImplementation(() => mockClient) - -// Mock the mongodb module -jest.mock('mongodb', () => ({ - MongoClient: MockedMongoClient -})) - -// Restore environment before tests -const originalEnv = process.env - -describe('MongoDB Connection (Unit Tests)', () => { - beforeEach(() => { - jest.resetModules() - process.env = { - ...originalEnv, - MONGODB_URI: 'mongodb://localhost:27017/test', - MONGODB_DB: 'test' - } - jest.clearAllMocks() - mockMongoLoggerError.mockReset() - - // Reset the mock implementation - MockedMongoClient.mockImplementation(() => mockClient as any) - mockClient.db.mockReturnValue(mockDb) - }) - - afterEach(() => { - process.env = originalEnv - }) - - describe('MongoDB URI validation', () => { - it('should throw error when MONGODB_URI is not set', () => { - // This test is tricky because the module is cached - // We'll test this by clearing the module cache and mocking process.env - const originalMongodbUri = process.env.MONGODB_URI - delete process.env.MONGODB_URI - - // Clear module cache to force re-import - jest.resetModules() - - const { getClientPromise } = require('./mongodb') - expect(() => getClientPromise()).toThrow('Please add MONGODB_URI to your environment variables') - - // Restore environment - process.env.MONGODB_URI = originalMongodbUri - }) - }) - - describe('Database connection', () => { - it('should create MongoClient with correct URI and options', async () => { - // Import after setting up the mock - const { getClientPromise } = await import('./mongodb') - - await getClientPromise() - - expect(MockedMongoClient).toHaveBeenCalledWith( - process.env.MONGODB_URI, - expect.objectContaining({ - maxPoolSize: 10, - serverSelectionTimeoutMS: 5000, - socketTimeoutMS: 45000 - }) - ) - }) - - it('should return database instance', async () => { - const { getDb } = await import('./mongodb') - - const result = await getDb() - - expect(result).toBe(mockDb) - expect(typeof result.collection).toBe('function') - }) - - it('should check MongoDB connection successfully', async () => { - const { checkMongoConnection } = await import('./mongodb') - - const result = await checkMongoConnection() - expect(result).toBe(true) - }) - - it('should return false on MongoDB connection failure', async () => { - // Create a failing client - const failingClient = { - connect: jest.fn().mockRejectedValue(new Error('Connection failed')), - db: jest.fn().mockRejectedValue(new Error('Connection failed')), - close: jest.fn() - } - - MockedMongoClient.mockImplementation(() => failingClient as any) - - // Clear the module cache and re-import - jest.resetModules() - const { checkMongoConnection } = await import('./mongodb') - - const result = await checkMongoConnection() - expect(result).toBe(false) - expect(mockMongoLoggerError).toHaveBeenCalledWith('MongoDB connection check failed', { errorName: 'Error' }) - }) - }) - - describe('Connection reuse and caching', () => { - it('should reuse the same MongoClient instance for multiple calls', async () => { - const { getClientPromise } = await import('./mongodb') - - const client1 = await getClientPromise() - const client2 = await getClientPromise() - - // Should be the same client instance - expect(client1).toBe(client2) - }) - - it('should not cache a rejected connection promise and retry on next call', async () => { - // First attempt fails (e.g. transient DB outage at startup) - const failingClient = { - connect: jest.fn().mockRejectedValueOnce(new Error('transient failure')), - db: jest.fn(), - close: jest.fn() - } - MockedMongoClient.mockImplementation(() => failingClient) - - const { getClientPromise } = await import('./mongodb') - - await expect(getClientPromise()).rejects.toThrow('transient failure') - - // Second call must retry instead of replaying the cached rejection - failingClient.connect.mockResolvedValueOnce(failingClient as any) - await expect(getClientPromise()).resolves.toBe(failingClient) - }) - }) -}) diff --git a/proto/src/lib/mongodb.ts b/proto/src/lib/mongodb.ts deleted file mode 100755 index 1b453b3..0000000 --- a/proto/src/lib/mongodb.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { MongoClient, Db } from 'mongodb' -import { dbLogger, getSafeErrorDetails } from './logger' - -// WHY this file only exposes getDb/checkMongoConnection now: it used to also -// export getCollection(), used by src/app/api/contact/route.ts for a raw, -// Payload-external `contact_submissions` collection. MITHOME-94 moved that -// write to a proper Payload collection (ContactSubmissions) via the Local -// API — getDb() itself stays alive only for /api/health's connectivity check. - -const options = { - maxPoolSize: 10, - serverSelectionTimeoutMS: 5000, - socketTimeoutMS: 45000, -} - -let clientPromise: Promise | undefined - -function createClientPromise(): Promise { - const uri = process.env.MONGODB_URI - if (!uri) { - throw new Error('Please add MONGODB_URI to your environment variables') - } - - return new MongoClient(uri, options).connect() -} - -export function getClientPromise(): Promise { - // In development mode, use a global variable so that the client is not recreated between hot reloads. - // The connection is intentionally created lazily: `next build` must not require runtime secrets. - if (process.env.NODE_ENV === 'development') { - // @ts-expect-error - Global variable for development hot reload - if (!global._mongoClientPromise) { - // @ts-expect-error - Global variable for development hot reload - global._mongoClientPromise = createClientPromise().catch((error: Error) => { - // A rejected promise must not stay cached: a transient failure would - // otherwise break every subsequent request in this process. - // @ts-expect-error - Global variable for development hot reload - global._mongoClientPromise = undefined - throw error - }) - } - // @ts-expect-error - Global variable for development hot reload - return global._mongoClientPromise - } - - clientPromise ??= createClientPromise().catch((error: Error) => { - // See the development branch above: drop the cached rejection so the next - // call can retry the connection. - clientPromise = undefined - throw error - }) - return clientPromise -} - -export async function getDb(): Promise { - const client = await getClientPromise() - return client.db(process.env.MONGODB_DB || 'mozdit') -} - -// Health check for MongoDB connection -export async function checkMongoConnection(): Promise { - try { - const db = await getDb() - await db.admin().ping() - return true - } catch (error) { - dbLogger.error('MongoDB connection check failed', getSafeErrorDetails(error)) - return false - } -} diff --git a/proto/src/migrations/20260929_200306_initial.json b/proto/src/migrations/20260929_200306_initial.json new file mode 100644 index 0000000..100486e --- /dev/null +++ b/proto/src/migrations/20260929_200306_initial.json @@ -0,0 +1,11116 @@ +{ + "version": "7", + "dialect": "postgresql", + "tables": { + "public.users_sessions": { + "name": "users_sessions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "users_sessions_order_idx": { + "name": "users_sessions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_sessions_parent_id_idx": { + "name": "users_sessions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_sessions_parent_id_fk": { + "name": "users_sessions_parent_id_fk", + "tableFrom": "users_sessions", + "tableTo": "users", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "reset_password_token": { + "name": "reset_password_token", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reset_password_expiration": { + "name": "reset_password_expiration", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "salt": { + "name": "salt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hash": { + "name": "hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "login_attempts": { + "name": "login_attempts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "lock_until": { + "name": "lock_until", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_updated_at_idx": { + "name": "users_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_created_at_idx": { + "name": "users_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_email_idx": { + "name": "users_email_idx", + "columns": [ + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.legal_pages_sections": { + "name": "legal_pages_sections", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "legal_pages_sections_order_idx": { + "name": "legal_pages_sections_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "legal_pages_sections_parent_id_idx": { + "name": "legal_pages_sections_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "legal_pages_sections_parent_id_fk": { + "name": "legal_pages_sections_parent_id_fk", + "tableFrom": "legal_pages_sections", + "tableTo": "legal_pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.legal_pages_sections_locales": { + "name": "legal_pages_sections_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "legal_pages_sections_locales_locale_parent_id_unique": { + "name": "legal_pages_sections_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "legal_pages_sections_locales_parent_id_fk": { + "name": "legal_pages_sections_locales_parent_id_fk", + "tableFrom": "legal_pages_sections_locales", + "tableTo": "legal_pages_sections", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.legal_pages_legal_validation_reviews": { + "name": "legal_pages_legal_validation_reviews", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "model": { + "name": "model", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reviewed_at": { + "name": "reviewed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "verdict": { + "name": "verdict", + "type": "enum_legal_pages_legal_validation_reviews_verdict", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "result": { + "name": "result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "legal_pages_legal_validation_reviews_order_idx": { + "name": "legal_pages_legal_validation_reviews_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "legal_pages_legal_validation_reviews_parent_id_idx": { + "name": "legal_pages_legal_validation_reviews_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "legal_pages_legal_validation_reviews_parent_id_fk": { + "name": "legal_pages_legal_validation_reviews_parent_id_fk", + "tableFrom": "legal_pages_legal_validation_reviews", + "tableTo": "legal_pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.legal_pages": { + "name": "legal_pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "en_translation_status": { + "name": "en_translation_status", + "type": "enum_legal_pages_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "_status": { + "name": "_status", + "type": "enum_legal_pages_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + } + }, + "indexes": { + "legal_pages_slug_idx": { + "name": "legal_pages_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "legal_pages_updated_at_idx": { + "name": "legal_pages_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "legal_pages_created_at_idx": { + "name": "legal_pages_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "legal_pages__status_idx": { + "name": "legal_pages__status_idx", + "columns": [ + { + "expression": "_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.legal_pages_locales": { + "name": "legal_pages_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "last_updated": { + "name": "last_updated", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "legal_pages_locales_locale_parent_id_unique": { + "name": "legal_pages_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "legal_pages_locales_parent_id_fk": { + "name": "legal_pages_locales_parent_id_fk", + "tableFrom": "legal_pages_locales", + "tableTo": "legal_pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._legal_pages_v_version_sections": { + "name": "_legal_pages_v_version_sections", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_legal_pages_v_version_sections_order_idx": { + "name": "_legal_pages_v_version_sections_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_legal_pages_v_version_sections_parent_id_idx": { + "name": "_legal_pages_v_version_sections_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_legal_pages_v_version_sections_parent_id_fk": { + "name": "_legal_pages_v_version_sections_parent_id_fk", + "tableFrom": "_legal_pages_v_version_sections", + "tableTo": "_legal_pages_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._legal_pages_v_version_sections_locales": { + "name": "_legal_pages_v_version_sections_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_legal_pages_v_version_sections_locales_locale_parent_id_uni": { + "name": "_legal_pages_v_version_sections_locales_locale_parent_id_uni", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_legal_pages_v_version_sections_locales_parent_id_fk": { + "name": "_legal_pages_v_version_sections_locales_parent_id_fk", + "tableFrom": "_legal_pages_v_version_sections_locales", + "tableTo": "_legal_pages_v_version_sections", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._legal_pages_v_version_legal_validation_reviews": { + "name": "_legal_pages_v_version_legal_validation_reviews", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "model": { + "name": "model", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reviewed_at": { + "name": "reviewed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "verdict": { + "name": "verdict", + "type": "enum__legal_pages_v_version_legal_validation_reviews_verdict", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "result": { + "name": "result", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_legal_pages_v_version_legal_validation_reviews_order_idx": { + "name": "_legal_pages_v_version_legal_validation_reviews_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_legal_pages_v_version_legal_validation_reviews_parent_id_idx": { + "name": "_legal_pages_v_version_legal_validation_reviews_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_legal_pages_v_version_legal_validation_reviews_parent_id_fk": { + "name": "_legal_pages_v_version_legal_validation_reviews_parent_id_fk", + "tableFrom": "_legal_pages_v_version_legal_validation_reviews", + "tableTo": "_legal_pages_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._legal_pages_v": { + "name": "_legal_pages_v", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "version_slug": { + "name": "version_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_en_translation_status": { + "name": "version_en_translation_status", + "type": "enum__legal_pages_v_version_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version__status": { + "name": "version__status", + "type": "enum__legal_pages_v_version_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "snapshot": { + "name": "snapshot", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "published_locale": { + "name": "published_locale", + "type": "enum__legal_pages_v_published_locale", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "latest": { + "name": "latest", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_legal_pages_v_parent_idx": { + "name": "_legal_pages_v_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_legal_pages_v_version_version_slug_idx": { + "name": "_legal_pages_v_version_version_slug_idx", + "columns": [ + { + "expression": "version_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_legal_pages_v_version_version_updated_at_idx": { + "name": "_legal_pages_v_version_version_updated_at_idx", + "columns": [ + { + "expression": "version_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_legal_pages_v_version_version_created_at_idx": { + "name": "_legal_pages_v_version_version_created_at_idx", + "columns": [ + { + "expression": "version_created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_legal_pages_v_version_version__status_idx": { + "name": "_legal_pages_v_version_version__status_idx", + "columns": [ + { + "expression": "version__status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_legal_pages_v_created_at_idx": { + "name": "_legal_pages_v_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_legal_pages_v_updated_at_idx": { + "name": "_legal_pages_v_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_legal_pages_v_snapshot_idx": { + "name": "_legal_pages_v_snapshot_idx", + "columns": [ + { + "expression": "snapshot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_legal_pages_v_published_locale_idx": { + "name": "_legal_pages_v_published_locale_idx", + "columns": [ + { + "expression": "published_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_legal_pages_v_latest_idx": { + "name": "_legal_pages_v_latest_idx", + "columns": [ + { + "expression": "latest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_legal_pages_v_parent_id_legal_pages_id_fk": { + "name": "_legal_pages_v_parent_id_legal_pages_id_fk", + "tableFrom": "_legal_pages_v", + "tableTo": "legal_pages", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._legal_pages_v_locales": { + "name": "_legal_pages_v_locales", + "schema": "", + "columns": { + "version_title": { + "name": "version_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_last_updated": { + "name": "version_last_updated", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_legal_pages_v_locales_locale_parent_id_unique": { + "name": "_legal_pages_v_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_legal_pages_v_locales_parent_id_fk": { + "name": "_legal_pages_v_locales_parent_id_fk", + "tableFrom": "_legal_pages_v_locales", + "tableTo": "_legal_pages_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.media": { + "name": "media", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "alt": { + "name": "alt", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "media_updated_at_idx": { + "name": "media_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_created_at_idx": { + "name": "media_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_filename_idx": { + "name": "media_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.partners": { + "name": "partners", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "relationship": { + "name": "relationship", + "type": "enum_partners_relationship", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "publication_permission": { + "name": "publication_permission", + "type": "enum_partners_publication_permission", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "permission_reference": { + "name": "permission_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "permission_review_date": { + "name": "permission_review_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "logo_id": { + "name": "logo_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "_status": { + "name": "_status", + "type": "enum_partners_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + } + }, + "indexes": { + "partners_logo_idx": { + "name": "partners_logo_idx", + "columns": [ + { + "expression": "logo_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "partners_updated_at_idx": { + "name": "partners_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "partners_created_at_idx": { + "name": "partners_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "partners__status_idx": { + "name": "partners__status_idx", + "columns": [ + { + "expression": "_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "partners_logo_id_media_id_fk": { + "name": "partners_logo_id_media_id_fk", + "tableFrom": "partners", + "tableTo": "media", + "columnsFrom": [ + "logo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._partners_v": { + "name": "_partners_v", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "version_name": { + "name": "version_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_url": { + "name": "version_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_relationship": { + "name": "version_relationship", + "type": "enum__partners_v_version_relationship", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "version_publication_permission": { + "name": "version_publication_permission", + "type": "enum__partners_v_version_publication_permission", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "version_permission_reference": { + "name": "version_permission_reference", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_permission_review_date": { + "name": "version_permission_review_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_logo_id": { + "name": "version_logo_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version__status": { + "name": "version__status", + "type": "enum__partners_v_version_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "snapshot": { + "name": "snapshot", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "published_locale": { + "name": "published_locale", + "type": "enum__partners_v_published_locale", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "latest": { + "name": "latest", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_partners_v_parent_idx": { + "name": "_partners_v_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_partners_v_version_version_logo_idx": { + "name": "_partners_v_version_version_logo_idx", + "columns": [ + { + "expression": "version_logo_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_partners_v_version_version_updated_at_idx": { + "name": "_partners_v_version_version_updated_at_idx", + "columns": [ + { + "expression": "version_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_partners_v_version_version_created_at_idx": { + "name": "_partners_v_version_version_created_at_idx", + "columns": [ + { + "expression": "version_created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_partners_v_version_version__status_idx": { + "name": "_partners_v_version_version__status_idx", + "columns": [ + { + "expression": "version__status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_partners_v_created_at_idx": { + "name": "_partners_v_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_partners_v_updated_at_idx": { + "name": "_partners_v_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_partners_v_snapshot_idx": { + "name": "_partners_v_snapshot_idx", + "columns": [ + { + "expression": "snapshot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_partners_v_published_locale_idx": { + "name": "_partners_v_published_locale_idx", + "columns": [ + { + "expression": "published_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_partners_v_latest_idx": { + "name": "_partners_v_latest_idx", + "columns": [ + { + "expression": "latest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_partners_v_parent_id_partners_id_fk": { + "name": "_partners_v_parent_id_partners_id_fk", + "tableFrom": "_partners_v", + "tableTo": "partners", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_partners_v_version_logo_id_media_id_fk": { + "name": "_partners_v_version_logo_id_media_id_fk", + "tableFrom": "_partners_v", + "tableTo": "media", + "columnsFrom": [ + "version_logo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.contact_submissions": { + "name": "contact_submissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "subject": { + "name": "subject", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "gdpr_consent": { + "name": "gdpr_consent", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "status": { + "name": "status", + "type": "enum_contact_submissions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'new'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "contact_submissions_updated_at_idx": { + "name": "contact_submissions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "contact_submissions_created_at_idx": { + "name": "contact_submissions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.products_public_features": { + "name": "products_public_features", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "products_public_features_order_idx": { + "name": "products_public_features_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "products_public_features_parent_id_idx": { + "name": "products_public_features_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "products_public_features_locale_idx": { + "name": "products_public_features_locale_idx", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "products_public_features_parent_id_fk": { + "name": "products_public_features_parent_id_fk", + "tableFrom": "products_public_features", + "tableTo": "products", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.products": { + "name": "products", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "product_type": { + "name": "product_type", + "type": "enum_products_product_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'hosting'" + }, + "status": { + "name": "status", + "type": "enum_products_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "sort_order": { + "name": "sort_order", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "highlighted": { + "name": "highlighted", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "pricing_net_amount": { + "name": "pricing_net_amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "pricing_billing_period": { + "name": "pricing_billing_period", + "type": "enum_products_pricing_billing_period", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'yearly'" + }, + "service_definition_storage_gb": { + "name": "service_definition_storage_gb", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "service_definition_mail_storage_gb": { + "name": "service_definition_mail_storage_gb", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "service_definition_domains": { + "name": "service_definition_domains", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "service_definition_domain_aliases": { + "name": "service_definition_domain_aliases", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "service_definition_databases": { + "name": "service_definition_databases", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "service_definition_mailboxes": { + "name": "service_definition_mailboxes", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "service_definition_ssl": { + "name": "service_definition_ssl", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "service_definition_spam_filter": { + "name": "service_definition_spam_filter", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "en_translation_status": { + "name": "en_translation_status", + "type": "enum_products_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "_status": { + "name": "_status", + "type": "enum_products_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + } + }, + "indexes": { + "products_slug_idx": { + "name": "products_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "products_updated_at_idx": { + "name": "products_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "products_created_at_idx": { + "name": "products_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "products__status_idx": { + "name": "products__status_idx", + "columns": [ + { + "expression": "_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.products_locales": { + "name": "products_locales", + "schema": "", + "columns": { + "public_audience": { + "name": "public_audience", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "public_short_description": { + "name": "public_short_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "public_cta_text": { + "name": "public_cta_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "public_seo_description": { + "name": "public_seo_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "service_definition_backup": { + "name": "service_definition_backup", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "products_locales_locale_parent_id_unique": { + "name": "products_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "products_locales_parent_id_fk": { + "name": "products_locales_parent_id_fk", + "tableFrom": "products_locales", + "tableTo": "products", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._products_v_version_public_features": { + "name": "_products_v_version_public_features", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_products_v_version_public_features_order_idx": { + "name": "_products_v_version_public_features_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_products_v_version_public_features_parent_id_idx": { + "name": "_products_v_version_public_features_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_products_v_version_public_features_locale_idx": { + "name": "_products_v_version_public_features_locale_idx", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_products_v_version_public_features_parent_id_fk": { + "name": "_products_v_version_public_features_parent_id_fk", + "tableFrom": "_products_v_version_public_features", + "tableTo": "_products_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._products_v": { + "name": "_products_v", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "version_name": { + "name": "version_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_slug": { + "name": "version_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_product_type": { + "name": "version_product_type", + "type": "enum__products_v_version_product_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'hosting'" + }, + "version_status": { + "name": "version_status", + "type": "enum__products_v_version_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "version_sort_order": { + "name": "version_sort_order", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "version_highlighted": { + "name": "version_highlighted", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "version_pricing_net_amount": { + "name": "version_pricing_net_amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "version_pricing_billing_period": { + "name": "version_pricing_billing_period", + "type": "enum__products_v_version_pricing_billing_period", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'yearly'" + }, + "version_service_definition_storage_gb": { + "name": "version_service_definition_storage_gb", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "version_service_definition_mail_storage_gb": { + "name": "version_service_definition_mail_storage_gb", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "version_service_definition_domains": { + "name": "version_service_definition_domains", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "version_service_definition_domain_aliases": { + "name": "version_service_definition_domain_aliases", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "version_service_definition_databases": { + "name": "version_service_definition_databases", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "version_service_definition_mailboxes": { + "name": "version_service_definition_mailboxes", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "version_service_definition_ssl": { + "name": "version_service_definition_ssl", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "version_service_definition_spam_filter": { + "name": "version_service_definition_spam_filter", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "version_en_translation_status": { + "name": "version_en_translation_status", + "type": "enum__products_v_version_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version__status": { + "name": "version__status", + "type": "enum__products_v_version_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "snapshot": { + "name": "snapshot", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "published_locale": { + "name": "published_locale", + "type": "enum__products_v_published_locale", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "latest": { + "name": "latest", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_products_v_parent_idx": { + "name": "_products_v_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_products_v_version_version_slug_idx": { + "name": "_products_v_version_version_slug_idx", + "columns": [ + { + "expression": "version_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_products_v_version_version_updated_at_idx": { + "name": "_products_v_version_version_updated_at_idx", + "columns": [ + { + "expression": "version_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_products_v_version_version_created_at_idx": { + "name": "_products_v_version_version_created_at_idx", + "columns": [ + { + "expression": "version_created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_products_v_version_version__status_idx": { + "name": "_products_v_version_version__status_idx", + "columns": [ + { + "expression": "version__status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_products_v_created_at_idx": { + "name": "_products_v_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_products_v_updated_at_idx": { + "name": "_products_v_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_products_v_snapshot_idx": { + "name": "_products_v_snapshot_idx", + "columns": [ + { + "expression": "snapshot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_products_v_published_locale_idx": { + "name": "_products_v_published_locale_idx", + "columns": [ + { + "expression": "published_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_products_v_latest_idx": { + "name": "_products_v_latest_idx", + "columns": [ + { + "expression": "latest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_products_v_parent_id_products_id_fk": { + "name": "_products_v_parent_id_products_id_fk", + "tableFrom": "_products_v", + "tableTo": "products", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._products_v_locales": { + "name": "_products_v_locales", + "schema": "", + "columns": { + "version_public_audience": { + "name": "version_public_audience", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_public_short_description": { + "name": "version_public_short_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_public_cta_text": { + "name": "version_public_cta_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_public_seo_description": { + "name": "version_public_seo_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_service_definition_backup": { + "name": "version_service_definition_backup", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_products_v_locales_locale_parent_id_unique": { + "name": "_products_v_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_products_v_locales_parent_id_fk": { + "name": "_products_v_locales_parent_id_fk", + "tableFrom": "_products_v_locales", + "tableTo": "_products_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_kv": { + "name": "payload_kv", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "payload_kv_key_idx": { + "name": "payload_kv_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents": { + "name": "payload_locked_documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "global_slug": { + "name": "global_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_locked_documents_global_slug_idx": { + "name": "payload_locked_documents_global_slug_idx", + "columns": [ + { + "expression": "global_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_updated_at_idx": { + "name": "payload_locked_documents_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_created_at_idx": { + "name": "payload_locked_documents_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents_rels": { + "name": "payload_locked_documents_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "legal_pages_id": { + "name": "legal_pages_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "media_id": { + "name": "media_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "partners_id": { + "name": "partners_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "contact_submissions_id": { + "name": "contact_submissions_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "products_id": { + "name": "products_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_locked_documents_rels_order_idx": { + "name": "payload_locked_documents_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_parent_idx": { + "name": "payload_locked_documents_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_path_idx": { + "name": "payload_locked_documents_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_users_id_idx": { + "name": "payload_locked_documents_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_legal_pages_id_idx": { + "name": "payload_locked_documents_rels_legal_pages_id_idx", + "columns": [ + { + "expression": "legal_pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_media_id_idx": { + "name": "payload_locked_documents_rels_media_id_idx", + "columns": [ + { + "expression": "media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_partners_id_idx": { + "name": "payload_locked_documents_rels_partners_id_idx", + "columns": [ + { + "expression": "partners_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_contact_submissions_id_idx": { + "name": "payload_locked_documents_rels_contact_submissions_id_idx", + "columns": [ + { + "expression": "contact_submissions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_products_id_idx": { + "name": "payload_locked_documents_rels_products_id_idx", + "columns": [ + { + "expression": "products_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_locked_documents_rels_parent_fk": { + "name": "payload_locked_documents_rels_parent_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_locked_documents", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_users_fk": { + "name": "payload_locked_documents_rels_users_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_legal_pages_fk": { + "name": "payload_locked_documents_rels_legal_pages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "legal_pages", + "columnsFrom": [ + "legal_pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_media_fk": { + "name": "payload_locked_documents_rels_media_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "media", + "columnsFrom": [ + "media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_partners_fk": { + "name": "payload_locked_documents_rels_partners_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "partners", + "columnsFrom": [ + "partners_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_contact_submissions_fk": { + "name": "payload_locked_documents_rels_contact_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "contact_submissions", + "columnsFrom": [ + "contact_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_products_fk": { + "name": "payload_locked_documents_rels_products_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "products", + "columnsFrom": [ + "products_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences": { + "name": "payload_preferences", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "value": { + "name": "value", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_preferences_key_idx": { + "name": "payload_preferences_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_updated_at_idx": { + "name": "payload_preferences_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_created_at_idx": { + "name": "payload_preferences_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences_rels": { + "name": "payload_preferences_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_preferences_rels_order_idx": { + "name": "payload_preferences_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_parent_idx": { + "name": "payload_preferences_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_path_idx": { + "name": "payload_preferences_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_users_id_idx": { + "name": "payload_preferences_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_preferences_rels_parent_fk": { + "name": "payload_preferences_rels_parent_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_preferences", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_users_fk": { + "name": "payload_preferences_rels_users_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_migrations": { + "name": "payload_migrations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "batch": { + "name": "batch", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_migrations_updated_at_idx": { + "name": "payload_migrations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_migrations_created_at_idx": { + "name": "payload_migrations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.home_hero_trust_bullets": { + "name": "home_hero_trust_bullets", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "home_hero_trust_bullets_order_idx": { + "name": "home_hero_trust_bullets_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "home_hero_trust_bullets_parent_id_idx": { + "name": "home_hero_trust_bullets_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "home_hero_trust_bullets_locale_idx": { + "name": "home_hero_trust_bullets_locale_idx", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "home_hero_trust_bullets_parent_id_fk": { + "name": "home_hero_trust_bullets_parent_id_fk", + "tableFrom": "home_hero_trust_bullets", + "tableTo": "home", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.home_about_usps": { + "name": "home_about_usps", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "home_about_usps_order_idx": { + "name": "home_about_usps_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "home_about_usps_parent_id_idx": { + "name": "home_about_usps_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "home_about_usps_parent_id_fk": { + "name": "home_about_usps_parent_id_fk", + "tableFrom": "home_about_usps", + "tableTo": "home", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.home_about_usps_locales": { + "name": "home_about_usps_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "home_about_usps_locales_locale_parent_id_unique": { + "name": "home_about_usps_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "home_about_usps_locales_parent_id_fk": { + "name": "home_about_usps_locales_parent_id_fk", + "tableFrom": "home_about_usps_locales", + "tableTo": "home_about_usps", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.home_services_items_features": { + "name": "home_services_items_features", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "home_services_items_features_order_idx": { + "name": "home_services_items_features_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "home_services_items_features_parent_id_idx": { + "name": "home_services_items_features_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "home_services_items_features_locale_idx": { + "name": "home_services_items_features_locale_idx", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "home_services_items_features_parent_id_fk": { + "name": "home_services_items_features_parent_id_fk", + "tableFrom": "home_services_items_features", + "tableTo": "home_services_items", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.home_services_items": { + "name": "home_services_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "home_services_items_order_idx": { + "name": "home_services_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "home_services_items_parent_id_idx": { + "name": "home_services_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "home_services_items_parent_id_fk": { + "name": "home_services_items_parent_id_fk", + "tableFrom": "home_services_items", + "tableTo": "home", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.home_services_items_locales": { + "name": "home_services_items_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_text": { + "name": "cta_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "home_services_items_locales_locale_parent_id_unique": { + "name": "home_services_items_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "home_services_items_locales_parent_id_fk": { + "name": "home_services_items_locales_parent_id_fk", + "tableFrom": "home_services_items_locales", + "tableTo": "home_services_items", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.home": { + "name": "home", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "hero_cta_primary_link_type": { + "name": "hero_cta_primary_link_type", + "type": "enum_home_hero_cta_primary_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'page'" + }, + "hero_cta_primary_page": { + "name": "hero_cta_primary_page", + "type": "enum_home_hero_cta_primary_page", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "hero_cta_secondary_link_type": { + "name": "hero_cta_secondary_link_type", + "type": "enum_home_hero_cta_secondary_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'page'" + }, + "hero_cta_secondary_page": { + "name": "hero_cta_secondary_page", + "type": "enum_home_hero_cta_secondary_page", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "en_translation_status": { + "name": "en_translation_status", + "type": "enum_home_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "_status": { + "name": "_status", + "type": "enum_home_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "home__status_idx": { + "name": "home__status_idx", + "columns": [ + { + "expression": "_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.home_locales": { + "name": "home_locales", + "schema": "", + "columns": { + "hero_title": { + "name": "hero_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_subtitle": { + "name": "hero_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_description": { + "name": "hero_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_cta_primary_text": { + "name": "hero_cta_primary_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_cta_primary_href": { + "name": "hero_cta_primary_href", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_cta_secondary_text": { + "name": "hero_cta_secondary_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_cta_secondary_href": { + "name": "hero_cta_secondary_href", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "about_title": { + "name": "about_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "services_title": { + "name": "services_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "services_subtitle": { + "name": "services_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_title": { + "name": "cta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_subtitle": { + "name": "cta_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_button": { + "name": "cta_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "service_features_title": { + "name": "service_features_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "references_section_clients_title": { + "name": "references_section_clients_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "references_section_clients_subtitle": { + "name": "references_section_clients_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "references_section_partners_title": { + "name": "references_section_partners_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "references_section_partners_subtitle": { + "name": "references_section_partners_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "references_section_relationship_labels_technology_partner": { + "name": "references_section_relationship_labels_technology_partner", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "references_section_relationship_labels_infrastructure": { + "name": "references_section_relationship_labels_infrastructure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "references_section_relationship_labels_supplier": { + "name": "references_section_relationship_labels_supplier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "references_section_relationship_labels_technology_used": { + "name": "references_section_relationship_labels_technology_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "references_section_relationship_labels_professional_partner": { + "name": "references_section_relationship_labels_professional_partner", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "home_locales_locale_parent_id_unique": { + "name": "home_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "home_locales_parent_id_fk": { + "name": "home_locales_parent_id_fk", + "tableFrom": "home_locales", + "tableTo": "home", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._home_v_version_hero_trust_bullets": { + "name": "_home_v_version_hero_trust_bullets", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_home_v_version_hero_trust_bullets_order_idx": { + "name": "_home_v_version_hero_trust_bullets_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_home_v_version_hero_trust_bullets_parent_id_idx": { + "name": "_home_v_version_hero_trust_bullets_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_home_v_version_hero_trust_bullets_locale_idx": { + "name": "_home_v_version_hero_trust_bullets_locale_idx", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_home_v_version_hero_trust_bullets_parent_id_fk": { + "name": "_home_v_version_hero_trust_bullets_parent_id_fk", + "tableFrom": "_home_v_version_hero_trust_bullets", + "tableTo": "_home_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._home_v_version_about_usps": { + "name": "_home_v_version_about_usps", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "icon": { + "name": "icon", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_home_v_version_about_usps_order_idx": { + "name": "_home_v_version_about_usps_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_home_v_version_about_usps_parent_id_idx": { + "name": "_home_v_version_about_usps_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_home_v_version_about_usps_parent_id_fk": { + "name": "_home_v_version_about_usps_parent_id_fk", + "tableFrom": "_home_v_version_about_usps", + "tableTo": "_home_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._home_v_version_about_usps_locales": { + "name": "_home_v_version_about_usps_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_home_v_version_about_usps_locales_locale_parent_id_unique": { + "name": "_home_v_version_about_usps_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_home_v_version_about_usps_locales_parent_id_fk": { + "name": "_home_v_version_about_usps_locales_parent_id_fk", + "tableFrom": "_home_v_version_about_usps_locales", + "tableTo": "_home_v_version_about_usps", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._home_v_version_services_items_features": { + "name": "_home_v_version_services_items_features", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_home_v_version_services_items_features_order_idx": { + "name": "_home_v_version_services_items_features_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_home_v_version_services_items_features_parent_id_idx": { + "name": "_home_v_version_services_items_features_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_home_v_version_services_items_features_locale_idx": { + "name": "_home_v_version_services_items_features_locale_idx", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_home_v_version_services_items_features_parent_id_fk": { + "name": "_home_v_version_services_items_features_parent_id_fk", + "tableFrom": "_home_v_version_services_items_features", + "tableTo": "_home_v_version_services_items", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._home_v_version_services_items": { + "name": "_home_v_version_services_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "icon": { + "name": "icon", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_home_v_version_services_items_order_idx": { + "name": "_home_v_version_services_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_home_v_version_services_items_parent_id_idx": { + "name": "_home_v_version_services_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_home_v_version_services_items_parent_id_fk": { + "name": "_home_v_version_services_items_parent_id_fk", + "tableFrom": "_home_v_version_services_items", + "tableTo": "_home_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._home_v_version_services_items_locales": { + "name": "_home_v_version_services_items_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_text": { + "name": "cta_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_home_v_version_services_items_locales_locale_parent_id_uniq": { + "name": "_home_v_version_services_items_locales_locale_parent_id_uniq", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_home_v_version_services_items_locales_parent_id_fk": { + "name": "_home_v_version_services_items_locales_parent_id_fk", + "tableFrom": "_home_v_version_services_items_locales", + "tableTo": "_home_v_version_services_items", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._home_v": { + "name": "_home_v", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "version_hero_cta_primary_link_type": { + "name": "version_hero_cta_primary_link_type", + "type": "enum__home_v_version_hero_cta_primary_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'page'" + }, + "version_hero_cta_primary_page": { + "name": "version_hero_cta_primary_page", + "type": "enum__home_v_version_hero_cta_primary_page", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "version_hero_cta_secondary_link_type": { + "name": "version_hero_cta_secondary_link_type", + "type": "enum__home_v_version_hero_cta_secondary_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'page'" + }, + "version_hero_cta_secondary_page": { + "name": "version_hero_cta_secondary_page", + "type": "enum__home_v_version_hero_cta_secondary_page", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "version_en_translation_status": { + "name": "version_en_translation_status", + "type": "enum__home_v_version_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "version__status": { + "name": "version__status", + "type": "enum__home_v_version_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "snapshot": { + "name": "snapshot", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "published_locale": { + "name": "published_locale", + "type": "enum__home_v_published_locale", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "latest": { + "name": "latest", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_home_v_version_version__status_idx": { + "name": "_home_v_version_version__status_idx", + "columns": [ + { + "expression": "version__status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_home_v_created_at_idx": { + "name": "_home_v_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_home_v_updated_at_idx": { + "name": "_home_v_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_home_v_snapshot_idx": { + "name": "_home_v_snapshot_idx", + "columns": [ + { + "expression": "snapshot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_home_v_published_locale_idx": { + "name": "_home_v_published_locale_idx", + "columns": [ + { + "expression": "published_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_home_v_latest_idx": { + "name": "_home_v_latest_idx", + "columns": [ + { + "expression": "latest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._home_v_locales": { + "name": "_home_v_locales", + "schema": "", + "columns": { + "version_hero_title": { + "name": "version_hero_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_subtitle": { + "name": "version_hero_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_description": { + "name": "version_hero_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_cta_primary_text": { + "name": "version_hero_cta_primary_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_cta_primary_href": { + "name": "version_hero_cta_primary_href", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_cta_secondary_text": { + "name": "version_hero_cta_secondary_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_cta_secondary_href": { + "name": "version_hero_cta_secondary_href", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_about_title": { + "name": "version_about_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_services_title": { + "name": "version_services_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_services_subtitle": { + "name": "version_services_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_cta_title": { + "name": "version_cta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_cta_subtitle": { + "name": "version_cta_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_cta_button": { + "name": "version_cta_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_service_features_title": { + "name": "version_service_features_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_references_section_clients_title": { + "name": "version_references_section_clients_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_references_section_clients_subtitle": { + "name": "version_references_section_clients_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_references_section_partners_title": { + "name": "version_references_section_partners_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_references_section_partners_subtitle": { + "name": "version_references_section_partners_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_references_section_relationship_labels_technology_partner": { + "name": "version_references_section_relationship_labels_technology_partner", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_references_section_relationship_labels_infrastructure": { + "name": "version_references_section_relationship_labels_infrastructure", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_references_section_relationship_labels_supplier": { + "name": "version_references_section_relationship_labels_supplier", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_references_section_relationship_labels_technology_used": { + "name": "version_references_section_relationship_labels_technology_used", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_references_section_relationship_labels_professional_partner": { + "name": "version_references_section_relationship_labels_professional_partner", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_home_v_locales_locale_parent_id_unique": { + "name": "_home_v_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_home_v_locales_parent_id_fk": { + "name": "_home_v_locales_parent_id_fk", + "tableFrom": "_home_v_locales", + "tableTo": "_home_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.about_story_paragraphs": { + "name": "about_story_paragraphs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "about_story_paragraphs_order_idx": { + "name": "about_story_paragraphs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "about_story_paragraphs_parent_id_idx": { + "name": "about_story_paragraphs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "about_story_paragraphs_locale_idx": { + "name": "about_story_paragraphs_locale_idx", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "about_story_paragraphs_parent_id_fk": { + "name": "about_story_paragraphs_parent_id_fk", + "tableFrom": "about_story_paragraphs", + "tableTo": "about", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.about_mission_values": { + "name": "about_mission_values", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "about_mission_values_order_idx": { + "name": "about_mission_values_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "about_mission_values_parent_id_idx": { + "name": "about_mission_values_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "about_mission_values_parent_id_fk": { + "name": "about_mission_values_parent_id_fk", + "tableFrom": "about_mission_values", + "tableTo": "about", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.about_mission_values_locales": { + "name": "about_mission_values_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "about_mission_values_locales_locale_parent_id_unique": { + "name": "about_mission_values_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "about_mission_values_locales_parent_id_fk": { + "name": "about_mission_values_locales_parent_id_fk", + "tableFrom": "about_mission_values_locales", + "tableTo": "about_mission_values", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.about_team_paragraphs": { + "name": "about_team_paragraphs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "about_team_paragraphs_order_idx": { + "name": "about_team_paragraphs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "about_team_paragraphs_parent_id_idx": { + "name": "about_team_paragraphs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "about_team_paragraphs_locale_idx": { + "name": "about_team_paragraphs_locale_idx", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "about_team_paragraphs_parent_id_fk": { + "name": "about_team_paragraphs_parent_id_fk", + "tableFrom": "about_team_paragraphs", + "tableTo": "about", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.about": { + "name": "about", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "en_translation_status": { + "name": "en_translation_status", + "type": "enum_about_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "_status": { + "name": "_status", + "type": "enum_about_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "about__status_idx": { + "name": "about__status_idx", + "columns": [ + { + "expression": "_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.about_locales": { + "name": "about_locales", + "schema": "", + "columns": { + "meta_title": { + "name": "meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "meta_description": { + "name": "meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "meta_og_description": { + "name": "meta_og_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_title": { + "name": "hero_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_subtitle": { + "name": "hero_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "story_title": { + "name": "story_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mission_title": { + "name": "mission_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mission_subtitle": { + "name": "mission_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "team_title": { + "name": "team_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "team_subtitle": { + "name": "team_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_title": { + "name": "cta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_subtitle": { + "name": "cta_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_button": { + "name": "cta_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "about_locales_locale_parent_id_unique": { + "name": "about_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "about_locales_parent_id_fk": { + "name": "about_locales_parent_id_fk", + "tableFrom": "about_locales", + "tableTo": "about", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._about_v_version_story_paragraphs": { + "name": "_about_v_version_story_paragraphs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_about_v_version_story_paragraphs_order_idx": { + "name": "_about_v_version_story_paragraphs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_about_v_version_story_paragraphs_parent_id_idx": { + "name": "_about_v_version_story_paragraphs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_about_v_version_story_paragraphs_locale_idx": { + "name": "_about_v_version_story_paragraphs_locale_idx", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_about_v_version_story_paragraphs_parent_id_fk": { + "name": "_about_v_version_story_paragraphs_parent_id_fk", + "tableFrom": "_about_v_version_story_paragraphs", + "tableTo": "_about_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._about_v_version_mission_values": { + "name": "_about_v_version_mission_values", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "icon": { + "name": "icon", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_about_v_version_mission_values_order_idx": { + "name": "_about_v_version_mission_values_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_about_v_version_mission_values_parent_id_idx": { + "name": "_about_v_version_mission_values_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_about_v_version_mission_values_parent_id_fk": { + "name": "_about_v_version_mission_values_parent_id_fk", + "tableFrom": "_about_v_version_mission_values", + "tableTo": "_about_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._about_v_version_mission_values_locales": { + "name": "_about_v_version_mission_values_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_about_v_version_mission_values_locales_locale_parent_id_uni": { + "name": "_about_v_version_mission_values_locales_locale_parent_id_uni", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_about_v_version_mission_values_locales_parent_id_fk": { + "name": "_about_v_version_mission_values_locales_parent_id_fk", + "tableFrom": "_about_v_version_mission_values_locales", + "tableTo": "_about_v_version_mission_values", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._about_v_version_team_paragraphs": { + "name": "_about_v_version_team_paragraphs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_about_v_version_team_paragraphs_order_idx": { + "name": "_about_v_version_team_paragraphs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_about_v_version_team_paragraphs_parent_id_idx": { + "name": "_about_v_version_team_paragraphs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_about_v_version_team_paragraphs_locale_idx": { + "name": "_about_v_version_team_paragraphs_locale_idx", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_about_v_version_team_paragraphs_parent_id_fk": { + "name": "_about_v_version_team_paragraphs_parent_id_fk", + "tableFrom": "_about_v_version_team_paragraphs", + "tableTo": "_about_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._about_v": { + "name": "_about_v", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "version_en_translation_status": { + "name": "version_en_translation_status", + "type": "enum__about_v_version_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "version__status": { + "name": "version__status", + "type": "enum__about_v_version_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "snapshot": { + "name": "snapshot", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "published_locale": { + "name": "published_locale", + "type": "enum__about_v_published_locale", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "latest": { + "name": "latest", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_about_v_version_version__status_idx": { + "name": "_about_v_version_version__status_idx", + "columns": [ + { + "expression": "version__status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_about_v_created_at_idx": { + "name": "_about_v_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_about_v_updated_at_idx": { + "name": "_about_v_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_about_v_snapshot_idx": { + "name": "_about_v_snapshot_idx", + "columns": [ + { + "expression": "snapshot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_about_v_published_locale_idx": { + "name": "_about_v_published_locale_idx", + "columns": [ + { + "expression": "published_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_about_v_latest_idx": { + "name": "_about_v_latest_idx", + "columns": [ + { + "expression": "latest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._about_v_locales": { + "name": "_about_v_locales", + "schema": "", + "columns": { + "version_meta_title": { + "name": "version_meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_meta_description": { + "name": "version_meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_meta_og_description": { + "name": "version_meta_og_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_title": { + "name": "version_hero_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_subtitle": { + "name": "version_hero_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_story_title": { + "name": "version_story_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_mission_title": { + "name": "version_mission_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_mission_subtitle": { + "name": "version_mission_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_team_title": { + "name": "version_team_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_team_subtitle": { + "name": "version_team_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_cta_title": { + "name": "version_cta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_cta_subtitle": { + "name": "version_cta_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_cta_button": { + "name": "version_cta_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_about_v_locales_locale_parent_id_unique": { + "name": "_about_v_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_about_v_locales_parent_id_fk": { + "name": "_about_v_locales_parent_id_fk", + "tableFrom": "_about_v_locales", + "tableTo": "_about_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.services_details_services_specs_items": { + "name": "services_details_services_specs_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "services_details_services_specs_items_order_idx": { + "name": "services_details_services_specs_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "services_details_services_specs_items_parent_id_idx": { + "name": "services_details_services_specs_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "services_details_services_specs_items_locale_idx": { + "name": "services_details_services_specs_items_locale_idx", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "services_details_services_specs_items_parent_id_fk": { + "name": "services_details_services_specs_items_parent_id_fk", + "tableFrom": "services_details_services_specs_items", + "tableTo": "services_details_services", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.services_details_services": { + "name": "services_details_services", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "services_details_services_order_idx": { + "name": "services_details_services_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "services_details_services_parent_id_idx": { + "name": "services_details_services_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "services_details_services_parent_id_fk": { + "name": "services_details_services_parent_id_fk", + "tableFrom": "services_details_services", + "tableTo": "services", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.services_details_services_locales": { + "name": "services_details_services_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specs_title": { + "name": "specs_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "services_details_services_locales_locale_parent_id_unique": { + "name": "services_details_services_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "services_details_services_locales_parent_id_fk": { + "name": "services_details_services_locales_parent_id_fk", + "tableFrom": "services_details_services_locales", + "tableTo": "services_details_services", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.services_support_channels": { + "name": "services_support_channels", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "services_support_channels_order_idx": { + "name": "services_support_channels_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "services_support_channels_parent_id_idx": { + "name": "services_support_channels_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "services_support_channels_parent_id_fk": { + "name": "services_support_channels_parent_id_fk", + "tableFrom": "services_support_channels", + "tableTo": "services", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.services_support_channels_locales": { + "name": "services_support_channels_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "services_support_channels_locales_locale_parent_id_unique": { + "name": "services_support_channels_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "services_support_channels_locales_parent_id_fk": { + "name": "services_support_channels_locales_parent_id_fk", + "tableFrom": "services_support_channels_locales", + "tableTo": "services_support_channels", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.services": { + "name": "services", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "en_translation_status": { + "name": "en_translation_status", + "type": "enum_services_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "_status": { + "name": "_status", + "type": "enum_services_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "services__status_idx": { + "name": "services__status_idx", + "columns": [ + { + "expression": "_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.services_locales": { + "name": "services_locales", + "schema": "", + "columns": { + "meta_title": { + "name": "meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "meta_description": { + "name": "meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "meta_og_description": { + "name": "meta_og_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_title": { + "name": "hero_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_subtitle": { + "name": "hero_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_title": { + "name": "details_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "details_subtitle": { + "name": "details_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "support_title": { + "name": "support_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "support_subtitle": { + "name": "support_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_title": { + "name": "cta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_subtitle": { + "name": "cta_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_primary_button": { + "name": "cta_primary_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_secondary_button": { + "name": "cta_secondary_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "services_locales_locale_parent_id_unique": { + "name": "services_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "services_locales_parent_id_fk": { + "name": "services_locales_parent_id_fk", + "tableFrom": "services_locales", + "tableTo": "services", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._services_v_version_details_services_specs_items": { + "name": "_services_v_version_details_services_specs_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_services_v_version_details_services_specs_items_order_idx": { + "name": "_services_v_version_details_services_specs_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_services_v_version_details_services_specs_items_parent_id_idx": { + "name": "_services_v_version_details_services_specs_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_services_v_version_details_services_specs_items_locale_idx": { + "name": "_services_v_version_details_services_specs_items_locale_idx", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_services_v_version_details_services_specs_items_parent_id_fk": { + "name": "_services_v_version_details_services_specs_items_parent_id_fk", + "tableFrom": "_services_v_version_details_services_specs_items", + "tableTo": "_services_v_version_details_services", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._services_v_version_details_services": { + "name": "_services_v_version_details_services", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "icon": { + "name": "icon", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_services_v_version_details_services_order_idx": { + "name": "_services_v_version_details_services_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_services_v_version_details_services_parent_id_idx": { + "name": "_services_v_version_details_services_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_services_v_version_details_services_parent_id_fk": { + "name": "_services_v_version_details_services_parent_id_fk", + "tableFrom": "_services_v_version_details_services", + "tableTo": "_services_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._services_v_version_details_services_locales": { + "name": "_services_v_version_details_services_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "specs_title": { + "name": "specs_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_services_v_version_details_services_locales_locale_parent_i": { + "name": "_services_v_version_details_services_locales_locale_parent_i", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_services_v_version_details_services_locales_parent_id_fk": { + "name": "_services_v_version_details_services_locales_parent_id_fk", + "tableFrom": "_services_v_version_details_services_locales", + "tableTo": "_services_v_version_details_services", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._services_v_version_support_channels": { + "name": "_services_v_version_support_channels", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "icon": { + "name": "icon", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_services_v_version_support_channels_order_idx": { + "name": "_services_v_version_support_channels_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_services_v_version_support_channels_parent_id_idx": { + "name": "_services_v_version_support_channels_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_services_v_version_support_channels_parent_id_fk": { + "name": "_services_v_version_support_channels_parent_id_fk", + "tableFrom": "_services_v_version_support_channels", + "tableTo": "_services_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._services_v_version_support_channels_locales": { + "name": "_services_v_version_support_channels_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_services_v_version_support_channels_locales_locale_parent_i": { + "name": "_services_v_version_support_channels_locales_locale_parent_i", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_services_v_version_support_channels_locales_parent_id_fk": { + "name": "_services_v_version_support_channels_locales_parent_id_fk", + "tableFrom": "_services_v_version_support_channels_locales", + "tableTo": "_services_v_version_support_channels", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._services_v": { + "name": "_services_v", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "version_en_translation_status": { + "name": "version_en_translation_status", + "type": "enum__services_v_version_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "version__status": { + "name": "version__status", + "type": "enum__services_v_version_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "snapshot": { + "name": "snapshot", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "published_locale": { + "name": "published_locale", + "type": "enum__services_v_published_locale", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "latest": { + "name": "latest", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_services_v_version_version__status_idx": { + "name": "_services_v_version_version__status_idx", + "columns": [ + { + "expression": "version__status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_services_v_created_at_idx": { + "name": "_services_v_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_services_v_updated_at_idx": { + "name": "_services_v_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_services_v_snapshot_idx": { + "name": "_services_v_snapshot_idx", + "columns": [ + { + "expression": "snapshot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_services_v_published_locale_idx": { + "name": "_services_v_published_locale_idx", + "columns": [ + { + "expression": "published_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_services_v_latest_idx": { + "name": "_services_v_latest_idx", + "columns": [ + { + "expression": "latest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._services_v_locales": { + "name": "_services_v_locales", + "schema": "", + "columns": { + "version_meta_title": { + "name": "version_meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_meta_description": { + "name": "version_meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_meta_og_description": { + "name": "version_meta_og_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_title": { + "name": "version_hero_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_subtitle": { + "name": "version_hero_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_details_title": { + "name": "version_details_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_details_subtitle": { + "name": "version_details_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_support_title": { + "name": "version_support_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_support_subtitle": { + "name": "version_support_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_cta_title": { + "name": "version_cta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_cta_subtitle": { + "name": "version_cta_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_cta_primary_button": { + "name": "version_cta_primary_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_cta_secondary_button": { + "name": "version_cta_secondary_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_services_v_locales_locale_parent_id_unique": { + "name": "_services_v_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_services_v_locales_parent_id_fk": { + "name": "_services_v_locales_parent_id_fk", + "tableFrom": "_services_v_locales", + "tableTo": "_services_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.contact_faq_items": { + "name": "contact_faq_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "contact_faq_items_order_idx": { + "name": "contact_faq_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "contact_faq_items_parent_id_idx": { + "name": "contact_faq_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "contact_faq_items_parent_id_fk": { + "name": "contact_faq_items_parent_id_fk", + "tableFrom": "contact_faq_items", + "tableTo": "contact", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.contact_faq_items_locales": { + "name": "contact_faq_items_locales", + "schema": "", + "columns": { + "question": { + "name": "question", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "answer": { + "name": "answer", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "contact_faq_items_locales_locale_parent_id_unique": { + "name": "contact_faq_items_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "contact_faq_items_locales_parent_id_fk": { + "name": "contact_faq_items_locales_parent_id_fk", + "tableFrom": "contact_faq_items_locales", + "tableTo": "contact_faq_items", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.contact": { + "name": "contact", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "en_translation_status": { + "name": "en_translation_status", + "type": "enum_contact_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "_status": { + "name": "_status", + "type": "enum_contact_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "contact__status_idx": { + "name": "contact__status_idx", + "columns": [ + { + "expression": "_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.contact_locales": { + "name": "contact_locales", + "schema": "", + "columns": { + "meta_title": { + "name": "meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "meta_description": { + "name": "meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_title": { + "name": "hero_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_subtitle": { + "name": "hero_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_title": { + "name": "form_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_success_message": { + "name": "form_success_message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_error_message": { + "name": "form_error_message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_name_label": { + "name": "form_fields_name_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_name_placeholder": { + "name": "form_fields_name_placeholder", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_name_error": { + "name": "form_fields_name_error", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_email_label": { + "name": "form_fields_email_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_email_placeholder": { + "name": "form_fields_email_placeholder", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_email_error_required": { + "name": "form_fields_email_error_required", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_email_error_invalid": { + "name": "form_fields_email_error_invalid", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_subject_label": { + "name": "form_fields_subject_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_subject_placeholder": { + "name": "form_fields_subject_placeholder", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_subject_error": { + "name": "form_fields_subject_error", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_message_label": { + "name": "form_fields_message_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_message_placeholder": { + "name": "form_fields_message_placeholder", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_message_error_required": { + "name": "form_fields_message_error_required", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_message_error_min_length": { + "name": "form_fields_message_error_min_length", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_gdpr_label": { + "name": "form_fields_gdpr_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_fields_gdpr_error": { + "name": "form_fields_gdpr_error", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_submit_button": { + "name": "form_submit_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "form_submitting_button": { + "name": "form_submitting_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "info_title": { + "name": "info_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "info_email_title": { + "name": "info_email_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "info_email_response_time": { + "name": "info_email_response_time", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "info_company_title": { + "name": "info_company_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "info_webmail_title": { + "name": "info_webmail_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "info_webmail_link_text": { + "name": "info_webmail_link_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "info_webmail_subtitle": { + "name": "info_webmail_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "faq_title": { + "name": "faq_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "contact_locales_locale_parent_id_unique": { + "name": "contact_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "contact_locales_parent_id_fk": { + "name": "contact_locales_parent_id_fk", + "tableFrom": "contact_locales", + "tableTo": "contact", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._contact_v_version_faq_items": { + "name": "_contact_v_version_faq_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_contact_v_version_faq_items_order_idx": { + "name": "_contact_v_version_faq_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_contact_v_version_faq_items_parent_id_idx": { + "name": "_contact_v_version_faq_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_contact_v_version_faq_items_parent_id_fk": { + "name": "_contact_v_version_faq_items_parent_id_fk", + "tableFrom": "_contact_v_version_faq_items", + "tableTo": "_contact_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._contact_v_version_faq_items_locales": { + "name": "_contact_v_version_faq_items_locales", + "schema": "", + "columns": { + "question": { + "name": "question", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "answer": { + "name": "answer", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_contact_v_version_faq_items_locales_locale_parent_id_unique": { + "name": "_contact_v_version_faq_items_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_contact_v_version_faq_items_locales_parent_id_fk": { + "name": "_contact_v_version_faq_items_locales_parent_id_fk", + "tableFrom": "_contact_v_version_faq_items_locales", + "tableTo": "_contact_v_version_faq_items", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._contact_v": { + "name": "_contact_v", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "version_en_translation_status": { + "name": "version_en_translation_status", + "type": "enum__contact_v_version_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "version__status": { + "name": "version__status", + "type": "enum__contact_v_version_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "snapshot": { + "name": "snapshot", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "published_locale": { + "name": "published_locale", + "type": "enum__contact_v_published_locale", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "latest": { + "name": "latest", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_contact_v_version_version__status_idx": { + "name": "_contact_v_version_version__status_idx", + "columns": [ + { + "expression": "version__status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_contact_v_created_at_idx": { + "name": "_contact_v_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_contact_v_updated_at_idx": { + "name": "_contact_v_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_contact_v_snapshot_idx": { + "name": "_contact_v_snapshot_idx", + "columns": [ + { + "expression": "snapshot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_contact_v_published_locale_idx": { + "name": "_contact_v_published_locale_idx", + "columns": [ + { + "expression": "published_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_contact_v_latest_idx": { + "name": "_contact_v_latest_idx", + "columns": [ + { + "expression": "latest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._contact_v_locales": { + "name": "_contact_v_locales", + "schema": "", + "columns": { + "version_meta_title": { + "name": "version_meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_meta_description": { + "name": "version_meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_title": { + "name": "version_hero_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_subtitle": { + "name": "version_hero_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_title": { + "name": "version_form_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_success_message": { + "name": "version_form_success_message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_error_message": { + "name": "version_form_error_message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_name_label": { + "name": "version_form_fields_name_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_name_placeholder": { + "name": "version_form_fields_name_placeholder", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_name_error": { + "name": "version_form_fields_name_error", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_email_label": { + "name": "version_form_fields_email_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_email_placeholder": { + "name": "version_form_fields_email_placeholder", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_email_error_required": { + "name": "version_form_fields_email_error_required", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_email_error_invalid": { + "name": "version_form_fields_email_error_invalid", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_subject_label": { + "name": "version_form_fields_subject_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_subject_placeholder": { + "name": "version_form_fields_subject_placeholder", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_subject_error": { + "name": "version_form_fields_subject_error", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_message_label": { + "name": "version_form_fields_message_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_message_placeholder": { + "name": "version_form_fields_message_placeholder", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_message_error_required": { + "name": "version_form_fields_message_error_required", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_message_error_min_length": { + "name": "version_form_fields_message_error_min_length", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_gdpr_label": { + "name": "version_form_fields_gdpr_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_fields_gdpr_error": { + "name": "version_form_fields_gdpr_error", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_submit_button": { + "name": "version_form_submit_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_form_submitting_button": { + "name": "version_form_submitting_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_info_title": { + "name": "version_info_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_info_email_title": { + "name": "version_info_email_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_info_email_response_time": { + "name": "version_info_email_response_time", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_info_company_title": { + "name": "version_info_company_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_info_webmail_title": { + "name": "version_info_webmail_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_info_webmail_link_text": { + "name": "version_info_webmail_link_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_info_webmail_subtitle": { + "name": "version_info_webmail_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_faq_title": { + "name": "version_faq_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_contact_v_locales_locale_parent_id_unique": { + "name": "_contact_v_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_contact_v_locales_parent_id_fk": { + "name": "_contact_v_locales_parent_id_fk", + "tableFrom": "_contact_v_locales", + "tableTo": "_contact_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.common": { + "name": "common", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "footer_address": { + "name": "footer_address", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "en_translation_status": { + "name": "en_translation_status", + "type": "enum_common_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "_status": { + "name": "_status", + "type": "enum_common_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "common__status_idx": { + "name": "common__status_idx", + "columns": [ + { + "expression": "_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.common_locales": { + "name": "common_locales", + "schema": "", + "columns": { + "buttons_contact": { + "name": "buttons_contact", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "buttons_learn_more": { + "name": "buttons_learn_more", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "buttons_webmail": { + "name": "buttons_webmail", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "buttons_send_message": { + "name": "buttons_send_message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_required": { + "name": "labels_required", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_features": { + "name": "labels_features", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "validation_required": { + "name": "validation_required", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "validation_invalid_email": { + "name": "validation_invalid_email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "validation_min_length": { + "name": "validation_min_length", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "staging_banner": { + "name": "staging_banner", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "footer_copyright": { + "name": "footer_copyright", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "a11y_open_menu": { + "name": "a11y_open_menu", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "a11y_close_menu": { + "name": "a11y_close_menu", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "common_locales_locale_parent_id_unique": { + "name": "common_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "common_locales_parent_id_fk": { + "name": "common_locales_parent_id_fk", + "tableFrom": "common_locales", + "tableTo": "common", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._common_v": { + "name": "_common_v", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "version_footer_address": { + "name": "version_footer_address", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_en_translation_status": { + "name": "version_en_translation_status", + "type": "enum__common_v_version_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "version__status": { + "name": "version__status", + "type": "enum__common_v_version_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "snapshot": { + "name": "snapshot", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "published_locale": { + "name": "published_locale", + "type": "enum__common_v_published_locale", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "latest": { + "name": "latest", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_common_v_version_version__status_idx": { + "name": "_common_v_version_version__status_idx", + "columns": [ + { + "expression": "version__status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_common_v_created_at_idx": { + "name": "_common_v_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_common_v_updated_at_idx": { + "name": "_common_v_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_common_v_snapshot_idx": { + "name": "_common_v_snapshot_idx", + "columns": [ + { + "expression": "snapshot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_common_v_published_locale_idx": { + "name": "_common_v_published_locale_idx", + "columns": [ + { + "expression": "published_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_common_v_latest_idx": { + "name": "_common_v_latest_idx", + "columns": [ + { + "expression": "latest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._common_v_locales": { + "name": "_common_v_locales", + "schema": "", + "columns": { + "version_buttons_contact": { + "name": "version_buttons_contact", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_buttons_learn_more": { + "name": "version_buttons_learn_more", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_buttons_webmail": { + "name": "version_buttons_webmail", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_buttons_send_message": { + "name": "version_buttons_send_message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_required": { + "name": "version_labels_required", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_features": { + "name": "version_labels_features", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_validation_required": { + "name": "version_validation_required", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_validation_invalid_email": { + "name": "version_validation_invalid_email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_validation_min_length": { + "name": "version_validation_min_length", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_staging_banner": { + "name": "version_staging_banner", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_footer_copyright": { + "name": "version_footer_copyright", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_a11y_open_menu": { + "name": "version_a11y_open_menu", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_a11y_close_menu": { + "name": "version_a11y_close_menu", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_common_v_locales_locale_parent_id_unique": { + "name": "_common_v_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_common_v_locales_parent_id_fk": { + "name": "_common_v_locales_parent_id_fk", + "tableFrom": "_common_v_locales", + "tableTo": "_common_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.hosting_plans": { + "name": "hosting_plans", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "vat_rate_percent": { + "name": "vat_rate_percent", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 27 + }, + "en_translation_status": { + "name": "en_translation_status", + "type": "enum_hosting_plans_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "_status": { + "name": "_status", + "type": "enum_hosting_plans_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "hosting_plans__status_idx": { + "name": "hosting_plans__status_idx", + "columns": [ + { + "expression": "_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.hosting_plans_locales": { + "name": "hosting_plans_locales", + "schema": "", + "columns": { + "meta_title": { + "name": "meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "meta_description": { + "name": "meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_title": { + "name": "hero_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_subtitle": { + "name": "hero_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_storage": { + "name": "labels_storage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_mail_storage": { + "name": "labels_mail_storage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_domains": { + "name": "labels_domains", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_domain_aliases": { + "name": "labels_domain_aliases", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_databases": { + "name": "labels_databases", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_mailboxes": { + "name": "labels_mailboxes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_backup": { + "name": "labels_backup", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_ssl": { + "name": "labels_ssl", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_spam_filter": { + "name": "labels_spam_filter", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_per_year": { + "name": "labels_per_year", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_per_month": { + "name": "labels_per_month", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_one_time": { + "name": "labels_one_time", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_plus_vat": { + "name": "labels_plus_vat", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_gross_price": { + "name": "labels_gross_price", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_recommended": { + "name": "labels_recommended", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_included": { + "name": "labels_included", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "labels_price_note": { + "name": "labels_price_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "larger_needs_title": { + "name": "larger_needs_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "larger_needs_text": { + "name": "larger_needs_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "larger_needs_button": { + "name": "larger_needs_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "hosting_plans_locales_locale_parent_id_unique": { + "name": "hosting_plans_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "hosting_plans_locales_parent_id_fk": { + "name": "hosting_plans_locales_parent_id_fk", + "tableFrom": "hosting_plans_locales", + "tableTo": "hosting_plans", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._hosting_plans_v": { + "name": "_hosting_plans_v", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "version_vat_rate_percent": { + "name": "version_vat_rate_percent", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 27 + }, + "version_en_translation_status": { + "name": "version_en_translation_status", + "type": "enum__hosting_plans_v_version_en_translation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'none'" + }, + "version__status": { + "name": "version__status", + "type": "enum__hosting_plans_v_version_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "snapshot": { + "name": "snapshot", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "published_locale": { + "name": "published_locale", + "type": "enum__hosting_plans_v_published_locale", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "latest": { + "name": "latest", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_hosting_plans_v_version_version__status_idx": { + "name": "_hosting_plans_v_version_version__status_idx", + "columns": [ + { + "expression": "version__status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_hosting_plans_v_created_at_idx": { + "name": "_hosting_plans_v_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_hosting_plans_v_updated_at_idx": { + "name": "_hosting_plans_v_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_hosting_plans_v_snapshot_idx": { + "name": "_hosting_plans_v_snapshot_idx", + "columns": [ + { + "expression": "snapshot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_hosting_plans_v_published_locale_idx": { + "name": "_hosting_plans_v_published_locale_idx", + "columns": [ + { + "expression": "published_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_hosting_plans_v_latest_idx": { + "name": "_hosting_plans_v_latest_idx", + "columns": [ + { + "expression": "latest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._hosting_plans_v_locales": { + "name": "_hosting_plans_v_locales", + "schema": "", + "columns": { + "version_meta_title": { + "name": "version_meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_meta_description": { + "name": "version_meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_title": { + "name": "version_hero_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_subtitle": { + "name": "version_hero_subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_storage": { + "name": "version_labels_storage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_mail_storage": { + "name": "version_labels_mail_storage", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_domains": { + "name": "version_labels_domains", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_domain_aliases": { + "name": "version_labels_domain_aliases", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_databases": { + "name": "version_labels_databases", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_mailboxes": { + "name": "version_labels_mailboxes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_backup": { + "name": "version_labels_backup", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_ssl": { + "name": "version_labels_ssl", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_spam_filter": { + "name": "version_labels_spam_filter", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_per_year": { + "name": "version_labels_per_year", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_per_month": { + "name": "version_labels_per_month", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_one_time": { + "name": "version_labels_one_time", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_plus_vat": { + "name": "version_labels_plus_vat", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_gross_price": { + "name": "version_labels_gross_price", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_recommended": { + "name": "version_labels_recommended", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_included": { + "name": "version_labels_included", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_labels_price_note": { + "name": "version_labels_price_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_larger_needs_title": { + "name": "version_larger_needs_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_larger_needs_text": { + "name": "version_larger_needs_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_larger_needs_button": { + "name": "version_larger_needs_button", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_hosting_plans_v_locales_locale_parent_id_unique": { + "name": "_hosting_plans_v_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_hosting_plans_v_locales_parent_id_fk": { + "name": "_hosting_plans_v_locales_parent_id_fk", + "tableFrom": "_hosting_plans_v_locales", + "tableTo": "_hosting_plans_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public._locales": { + "name": "_locales", + "schema": "public", + "values": [ + "hu", + "en" + ] + }, + "public.enum_legal_pages_legal_validation_reviews_verdict": { + "name": "enum_legal_pages_legal_validation_reviews_verdict", + "schema": "public", + "values": [ + "approve", + "approve-with-changes", + "reject" + ] + }, + "public.enum_legal_pages_en_translation_status": { + "name": "enum_legal_pages_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum_legal_pages_status": { + "name": "enum_legal_pages_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__legal_pages_v_version_legal_validation_reviews_verdict": { + "name": "enum__legal_pages_v_version_legal_validation_reviews_verdict", + "schema": "public", + "values": [ + "approve", + "approve-with-changes", + "reject" + ] + }, + "public.enum__legal_pages_v_version_en_translation_status": { + "name": "enum__legal_pages_v_version_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum__legal_pages_v_version_status": { + "name": "enum__legal_pages_v_version_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__legal_pages_v_published_locale": { + "name": "enum__legal_pages_v_published_locale", + "schema": "public", + "values": [ + "hu", + "en" + ] + }, + "public.enum_partners_relationship": { + "name": "enum_partners_relationship", + "schema": "public", + "values": [ + "client-reference", + "technology-partner", + "infrastructure", + "supplier", + "technology-used", + "professional-partner" + ] + }, + "public.enum_partners_publication_permission": { + "name": "enum_partners_publication_permission", + "schema": "public", + "values": [ + "granted", + "pending", + "none" + ] + }, + "public.enum_partners_status": { + "name": "enum_partners_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__partners_v_version_relationship": { + "name": "enum__partners_v_version_relationship", + "schema": "public", + "values": [ + "client-reference", + "technology-partner", + "infrastructure", + "supplier", + "technology-used", + "professional-partner" + ] + }, + "public.enum__partners_v_version_publication_permission": { + "name": "enum__partners_v_version_publication_permission", + "schema": "public", + "values": [ + "granted", + "pending", + "none" + ] + }, + "public.enum__partners_v_version_status": { + "name": "enum__partners_v_version_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__partners_v_published_locale": { + "name": "enum__partners_v_published_locale", + "schema": "public", + "values": [ + "hu", + "en" + ] + }, + "public.enum_contact_submissions_status": { + "name": "enum_contact_submissions_status", + "schema": "public", + "values": [ + "new", + "read", + "replied", + "archived" + ] + }, + "public.enum_products_product_type": { + "name": "enum_products_product_type", + "schema": "public", + "values": [ + "hosting", + "managed-service" + ] + }, + "public.enum_products_status": { + "name": "enum_products_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum_products_pricing_billing_period": { + "name": "enum_products_pricing_billing_period", + "schema": "public", + "values": [ + "yearly", + "monthly", + "one-time" + ] + }, + "public.enum_products_en_translation_status": { + "name": "enum_products_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum__products_v_version_product_type": { + "name": "enum__products_v_version_product_type", + "schema": "public", + "values": [ + "hosting", + "managed-service" + ] + }, + "public.enum__products_v_version_status": { + "name": "enum__products_v_version_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__products_v_version_pricing_billing_period": { + "name": "enum__products_v_version_pricing_billing_period", + "schema": "public", + "values": [ + "yearly", + "monthly", + "one-time" + ] + }, + "public.enum__products_v_version_en_translation_status": { + "name": "enum__products_v_version_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum__products_v_published_locale": { + "name": "enum__products_v_published_locale", + "schema": "public", + "values": [ + "hu", + "en" + ] + }, + "public.enum_home_hero_cta_primary_link_type": { + "name": "enum_home_hero_cta_primary_link_type", + "schema": "public", + "values": [ + "page", + "url" + ] + }, + "public.enum_home_hero_cta_primary_page": { + "name": "enum_home_hero_cta_primary_page", + "schema": "public", + "values": [ + "home", + "about", + "services", + "hostingPlans", + "contact", + "privacy", + "terms" + ] + }, + "public.enum_home_hero_cta_secondary_link_type": { + "name": "enum_home_hero_cta_secondary_link_type", + "schema": "public", + "values": [ + "page", + "url" + ] + }, + "public.enum_home_hero_cta_secondary_page": { + "name": "enum_home_hero_cta_secondary_page", + "schema": "public", + "values": [ + "home", + "about", + "services", + "hostingPlans", + "contact", + "privacy", + "terms" + ] + }, + "public.enum_home_en_translation_status": { + "name": "enum_home_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum_home_status": { + "name": "enum_home_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__home_v_version_hero_cta_primary_link_type": { + "name": "enum__home_v_version_hero_cta_primary_link_type", + "schema": "public", + "values": [ + "page", + "url" + ] + }, + "public.enum__home_v_version_hero_cta_primary_page": { + "name": "enum__home_v_version_hero_cta_primary_page", + "schema": "public", + "values": [ + "home", + "about", + "services", + "hostingPlans", + "contact", + "privacy", + "terms" + ] + }, + "public.enum__home_v_version_hero_cta_secondary_link_type": { + "name": "enum__home_v_version_hero_cta_secondary_link_type", + "schema": "public", + "values": [ + "page", + "url" + ] + }, + "public.enum__home_v_version_hero_cta_secondary_page": { + "name": "enum__home_v_version_hero_cta_secondary_page", + "schema": "public", + "values": [ + "home", + "about", + "services", + "hostingPlans", + "contact", + "privacy", + "terms" + ] + }, + "public.enum__home_v_version_en_translation_status": { + "name": "enum__home_v_version_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum__home_v_version_status": { + "name": "enum__home_v_version_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__home_v_published_locale": { + "name": "enum__home_v_published_locale", + "schema": "public", + "values": [ + "hu", + "en" + ] + }, + "public.enum_about_en_translation_status": { + "name": "enum_about_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum_about_status": { + "name": "enum_about_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__about_v_version_en_translation_status": { + "name": "enum__about_v_version_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum__about_v_version_status": { + "name": "enum__about_v_version_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__about_v_published_locale": { + "name": "enum__about_v_published_locale", + "schema": "public", + "values": [ + "hu", + "en" + ] + }, + "public.enum_services_en_translation_status": { + "name": "enum_services_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum_services_status": { + "name": "enum_services_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__services_v_version_en_translation_status": { + "name": "enum__services_v_version_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum__services_v_version_status": { + "name": "enum__services_v_version_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__services_v_published_locale": { + "name": "enum__services_v_published_locale", + "schema": "public", + "values": [ + "hu", + "en" + ] + }, + "public.enum_contact_en_translation_status": { + "name": "enum_contact_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum_contact_status": { + "name": "enum_contact_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__contact_v_version_en_translation_status": { + "name": "enum__contact_v_version_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum__contact_v_version_status": { + "name": "enum__contact_v_version_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__contact_v_published_locale": { + "name": "enum__contact_v_published_locale", + "schema": "public", + "values": [ + "hu", + "en" + ] + }, + "public.enum_common_en_translation_status": { + "name": "enum_common_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum_common_status": { + "name": "enum_common_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__common_v_version_en_translation_status": { + "name": "enum__common_v_version_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum__common_v_version_status": { + "name": "enum__common_v_version_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__common_v_published_locale": { + "name": "enum__common_v_published_locale", + "schema": "public", + "values": [ + "hu", + "en" + ] + }, + "public.enum_hosting_plans_en_translation_status": { + "name": "enum_hosting_plans_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum_hosting_plans_status": { + "name": "enum_hosting_plans_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__hosting_plans_v_version_en_translation_status": { + "name": "enum__hosting_plans_v_version_en_translation_status", + "schema": "public", + "values": [ + "none", + "ai-draft", + "approved" + ] + }, + "public.enum__hosting_plans_v_version_status": { + "name": "enum__hosting_plans_v_version_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__hosting_plans_v_published_locale": { + "name": "enum__hosting_plans_v_published_locale", + "schema": "public", + "values": [ + "hu", + "en" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "id": "2ad18472-919a-4a92-9c5b-ca65521af234", + "prevId": "00000000-0000-0000-0000-000000000000" +} \ No newline at end of file diff --git a/proto/src/migrations/20260929_200306_initial.ts b/proto/src/migrations/20260929_200306_initial.ts new file mode 100644 index 0000000..262fc1c --- /dev/null +++ b/proto/src/migrations/20260929_200306_initial.ts @@ -0,0 +1,1548 @@ +import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres' + +export async function up({ db, payload, req }: MigrateUpArgs): Promise { + await db.execute(sql` + CREATE TYPE "public"."_locales" AS ENUM('hu', 'en'); + CREATE TYPE "public"."enum_legal_pages_legal_validation_reviews_verdict" AS ENUM('approve', 'approve-with-changes', 'reject'); + CREATE TYPE "public"."enum_legal_pages_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum_legal_pages_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__legal_pages_v_version_legal_validation_reviews_verdict" AS ENUM('approve', 'approve-with-changes', 'reject'); + CREATE TYPE "public"."enum__legal_pages_v_version_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum__legal_pages_v_version_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__legal_pages_v_published_locale" AS ENUM('hu', 'en'); + CREATE TYPE "public"."enum_partners_relationship" AS ENUM('client-reference', 'technology-partner', 'infrastructure', 'supplier', 'technology-used', 'professional-partner'); + CREATE TYPE "public"."enum_partners_publication_permission" AS ENUM('granted', 'pending', 'none'); + CREATE TYPE "public"."enum_partners_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__partners_v_version_relationship" AS ENUM('client-reference', 'technology-partner', 'infrastructure', 'supplier', 'technology-used', 'professional-partner'); + CREATE TYPE "public"."enum__partners_v_version_publication_permission" AS ENUM('granted', 'pending', 'none'); + CREATE TYPE "public"."enum__partners_v_version_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__partners_v_published_locale" AS ENUM('hu', 'en'); + CREATE TYPE "public"."enum_contact_submissions_status" AS ENUM('new', 'read', 'replied', 'archived'); + CREATE TYPE "public"."enum_products_product_type" AS ENUM('hosting', 'managed-service'); + CREATE TYPE "public"."enum_products_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum_products_pricing_billing_period" AS ENUM('yearly', 'monthly', 'one-time'); + CREATE TYPE "public"."enum_products_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum__products_v_version_product_type" AS ENUM('hosting', 'managed-service'); + CREATE TYPE "public"."enum__products_v_version_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__products_v_version_pricing_billing_period" AS ENUM('yearly', 'monthly', 'one-time'); + CREATE TYPE "public"."enum__products_v_version_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum__products_v_published_locale" AS ENUM('hu', 'en'); + CREATE TYPE "public"."enum_home_hero_cta_primary_link_type" AS ENUM('page', 'url'); + CREATE TYPE "public"."enum_home_hero_cta_primary_page" AS ENUM('home', 'about', 'services', 'hostingPlans', 'contact', 'privacy', 'terms'); + CREATE TYPE "public"."enum_home_hero_cta_secondary_link_type" AS ENUM('page', 'url'); + CREATE TYPE "public"."enum_home_hero_cta_secondary_page" AS ENUM('home', 'about', 'services', 'hostingPlans', 'contact', 'privacy', 'terms'); + CREATE TYPE "public"."enum_home_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum_home_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__home_v_version_hero_cta_primary_link_type" AS ENUM('page', 'url'); + CREATE TYPE "public"."enum__home_v_version_hero_cta_primary_page" AS ENUM('home', 'about', 'services', 'hostingPlans', 'contact', 'privacy', 'terms'); + CREATE TYPE "public"."enum__home_v_version_hero_cta_secondary_link_type" AS ENUM('page', 'url'); + CREATE TYPE "public"."enum__home_v_version_hero_cta_secondary_page" AS ENUM('home', 'about', 'services', 'hostingPlans', 'contact', 'privacy', 'terms'); + CREATE TYPE "public"."enum__home_v_version_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum__home_v_version_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__home_v_published_locale" AS ENUM('hu', 'en'); + CREATE TYPE "public"."enum_about_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum_about_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__about_v_version_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum__about_v_version_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__about_v_published_locale" AS ENUM('hu', 'en'); + CREATE TYPE "public"."enum_services_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum_services_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__services_v_version_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum__services_v_version_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__services_v_published_locale" AS ENUM('hu', 'en'); + CREATE TYPE "public"."enum_contact_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum_contact_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__contact_v_version_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum__contact_v_version_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__contact_v_published_locale" AS ENUM('hu', 'en'); + CREATE TYPE "public"."enum_common_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum_common_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__common_v_version_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum__common_v_version_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__common_v_published_locale" AS ENUM('hu', 'en'); + CREATE TYPE "public"."enum_hosting_plans_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum_hosting_plans_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__hosting_plans_v_version_en_translation_status" AS ENUM('none', 'ai-draft', 'approved'); + CREATE TYPE "public"."enum__hosting_plans_v_version_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__hosting_plans_v_published_locale" AS ENUM('hu', 'en'); + CREATE TABLE "users_sessions" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "created_at" timestamp(3) with time zone, + "expires_at" timestamp(3) with time zone NOT NULL + ); + + CREATE TABLE "users" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" varchar, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "email" varchar NOT NULL, + "reset_password_token" varchar, + "reset_password_expiration" timestamp(3) with time zone, + "salt" varchar, + "hash" varchar, + "login_attempts" numeric DEFAULT 0, + "lock_until" timestamp(3) with time zone + ); + + CREATE TABLE "legal_pages_sections" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" varchar PRIMARY KEY NOT NULL + ); + + CREATE TABLE "legal_pages_sections_locales" ( + "title" varchar, + "content" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" varchar NOT NULL + ); + + CREATE TABLE "legal_pages_legal_validation_reviews" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "model" varchar, + "reviewed_at" timestamp(3) with time zone, + "verdict" "enum_legal_pages_legal_validation_reviews_verdict", + "result" varchar, + "notes" varchar + ); + + CREATE TABLE "legal_pages" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "slug" varchar, + "en_translation_status" "enum_legal_pages_en_translation_status" DEFAULT 'none', + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "_status" "enum_legal_pages_status" DEFAULT 'draft' + ); + + CREATE TABLE "legal_pages_locales" ( + "title" varchar, + "last_updated" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_legal_pages_v_version_sections" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "_uuid" varchar + ); + + CREATE TABLE "_legal_pages_v_version_sections_locales" ( + "title" varchar, + "content" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_legal_pages_v_version_legal_validation_reviews" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "model" varchar, + "reviewed_at" timestamp(3) with time zone, + "verdict" "enum__legal_pages_v_version_legal_validation_reviews_verdict", + "result" varchar, + "notes" varchar, + "_uuid" varchar + ); + + CREATE TABLE "_legal_pages_v" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "parent_id" uuid, + "version_slug" varchar, + "version_en_translation_status" "enum__legal_pages_v_version_en_translation_status" DEFAULT 'none', + "version_updated_at" timestamp(3) with time zone, + "version_created_at" timestamp(3) with time zone, + "version__status" "enum__legal_pages_v_version_status" DEFAULT 'draft', + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "snapshot" boolean, + "published_locale" "enum__legal_pages_v_published_locale", + "latest" boolean + ); + + CREATE TABLE "_legal_pages_v_locales" ( + "version_title" varchar, + "version_last_updated" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "media" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "alt" varchar NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "url" varchar, + "thumbnail_u_r_l" varchar, + "filename" varchar, + "mime_type" varchar, + "filesize" numeric, + "width" numeric, + "height" numeric, + "focal_x" numeric, + "focal_y" numeric + ); + + CREATE TABLE "partners" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" varchar, + "url" varchar, + "relationship" "enum_partners_relationship", + "publication_permission" "enum_partners_publication_permission" DEFAULT 'none', + "permission_reference" varchar, + "permission_review_date" timestamp(3) with time zone, + "logo_id" uuid, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "_status" "enum_partners_status" DEFAULT 'draft' + ); + + CREATE TABLE "_partners_v" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "parent_id" uuid, + "version_name" varchar, + "version_url" varchar, + "version_relationship" "enum__partners_v_version_relationship", + "version_publication_permission" "enum__partners_v_version_publication_permission" DEFAULT 'none', + "version_permission_reference" varchar, + "version_permission_review_date" timestamp(3) with time zone, + "version_logo_id" uuid, + "version_updated_at" timestamp(3) with time zone, + "version_created_at" timestamp(3) with time zone, + "version__status" "enum__partners_v_version_status" DEFAULT 'draft', + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "snapshot" boolean, + "published_locale" "enum__partners_v_published_locale", + "latest" boolean + ); + + CREATE TABLE "contact_submissions" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" varchar NOT NULL, + "email" varchar NOT NULL, + "subject" varchar NOT NULL, + "message" varchar NOT NULL, + "gdpr_consent" boolean DEFAULT false NOT NULL, + "status" "enum_contact_submissions_status" DEFAULT 'new' NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "products_public_features" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_locale" "_locales" NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "value" varchar + ); + + CREATE TABLE "products" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" varchar, + "slug" varchar, + "product_type" "enum_products_product_type" DEFAULT 'hosting', + "status" "enum_products_status" DEFAULT 'draft', + "sort_order" numeric DEFAULT 0, + "highlighted" boolean DEFAULT false, + "pricing_net_amount" numeric, + "pricing_billing_period" "enum_products_pricing_billing_period" DEFAULT 'yearly', + "service_definition_storage_gb" numeric, + "service_definition_mail_storage_gb" numeric, + "service_definition_domains" numeric, + "service_definition_domain_aliases" numeric, + "service_definition_databases" numeric, + "service_definition_mailboxes" numeric, + "service_definition_ssl" boolean DEFAULT false, + "service_definition_spam_filter" boolean DEFAULT false, + "en_translation_status" "enum_products_en_translation_status" DEFAULT 'none', + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "_status" "enum_products_status" DEFAULT 'draft' + ); + + CREATE TABLE "products_locales" ( + "public_audience" varchar, + "public_short_description" varchar, + "public_cta_text" varchar, + "public_seo_description" varchar, + "service_definition_backup" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_products_v_version_public_features" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_locale" "_locales" NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "value" varchar, + "_uuid" varchar + ); + + CREATE TABLE "_products_v" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "parent_id" uuid, + "version_name" varchar, + "version_slug" varchar, + "version_product_type" "enum__products_v_version_product_type" DEFAULT 'hosting', + "version_status" "enum__products_v_version_status" DEFAULT 'draft', + "version_sort_order" numeric DEFAULT 0, + "version_highlighted" boolean DEFAULT false, + "version_pricing_net_amount" numeric, + "version_pricing_billing_period" "enum__products_v_version_pricing_billing_period" DEFAULT 'yearly', + "version_service_definition_storage_gb" numeric, + "version_service_definition_mail_storage_gb" numeric, + "version_service_definition_domains" numeric, + "version_service_definition_domain_aliases" numeric, + "version_service_definition_databases" numeric, + "version_service_definition_mailboxes" numeric, + "version_service_definition_ssl" boolean DEFAULT false, + "version_service_definition_spam_filter" boolean DEFAULT false, + "version_en_translation_status" "enum__products_v_version_en_translation_status" DEFAULT 'none', + "version_updated_at" timestamp(3) with time zone, + "version_created_at" timestamp(3) with time zone, + "version__status" "enum__products_v_version_status" DEFAULT 'draft', + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "snapshot" boolean, + "published_locale" "enum__products_v_published_locale", + "latest" boolean + ); + + CREATE TABLE "_products_v_locales" ( + "version_public_audience" varchar, + "version_public_short_description" varchar, + "version_public_cta_text" varchar, + "version_public_seo_description" varchar, + "version_service_definition_backup" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "payload_kv" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "key" varchar NOT NULL, + "data" jsonb NOT NULL + ); + + CREATE TABLE "payload_locked_documents" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "global_slug" varchar, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "payload_locked_documents_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" uuid NOT NULL, + "path" varchar NOT NULL, + "users_id" uuid, + "legal_pages_id" uuid, + "media_id" uuid, + "partners_id" uuid, + "contact_submissions_id" uuid, + "products_id" uuid + ); + + CREATE TABLE "payload_preferences" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "key" varchar, + "value" jsonb, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "payload_preferences_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" uuid NOT NULL, + "path" varchar NOT NULL, + "users_id" uuid + ); + + CREATE TABLE "payload_migrations" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" varchar, + "batch" numeric, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "home_hero_trust_bullets" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_locale" "_locales" NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "value" varchar + ); + + CREATE TABLE "home_about_usps" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "icon" varchar + ); + + CREATE TABLE "home_about_usps_locales" ( + "title" varchar, + "description" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" varchar NOT NULL + ); + + CREATE TABLE "home_services_items_features" ( + "_order" integer NOT NULL, + "_parent_id" varchar NOT NULL, + "_locale" "_locales" NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "value" varchar + ); + + CREATE TABLE "home_services_items" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "icon" varchar + ); + + CREATE TABLE "home_services_items_locales" ( + "title" varchar, + "description" varchar, + "cta_text" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" varchar NOT NULL + ); + + CREATE TABLE "home" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "hero_cta_primary_link_type" "enum_home_hero_cta_primary_link_type" DEFAULT 'page', + "hero_cta_primary_page" "enum_home_hero_cta_primary_page", + "hero_cta_secondary_link_type" "enum_home_hero_cta_secondary_link_type" DEFAULT 'page', + "hero_cta_secondary_page" "enum_home_hero_cta_secondary_page", + "en_translation_status" "enum_home_en_translation_status" DEFAULT 'none', + "_status" "enum_home_status" DEFAULT 'draft', + "updated_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone + ); + + CREATE TABLE "home_locales" ( + "hero_title" varchar, + "hero_subtitle" varchar, + "hero_description" varchar, + "hero_cta_primary_text" varchar, + "hero_cta_primary_href" varchar, + "hero_cta_secondary_text" varchar, + "hero_cta_secondary_href" varchar, + "about_title" varchar, + "services_title" varchar, + "services_subtitle" varchar, + "cta_title" varchar, + "cta_subtitle" varchar, + "cta_button" varchar, + "service_features_title" varchar, + "references_section_clients_title" varchar, + "references_section_clients_subtitle" varchar, + "references_section_partners_title" varchar, + "references_section_partners_subtitle" varchar, + "references_section_relationship_labels_technology_partner" varchar, + "references_section_relationship_labels_infrastructure" varchar, + "references_section_relationship_labels_supplier" varchar, + "references_section_relationship_labels_technology_used" varchar, + "references_section_relationship_labels_professional_partner" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_home_v_version_hero_trust_bullets" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_locale" "_locales" NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "value" varchar, + "_uuid" varchar + ); + + CREATE TABLE "_home_v_version_about_usps" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "_uuid" varchar, + "icon" varchar + ); + + CREATE TABLE "_home_v_version_about_usps_locales" ( + "title" varchar, + "description" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_home_v_version_services_items_features" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_locale" "_locales" NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "value" varchar, + "_uuid" varchar + ); + + CREATE TABLE "_home_v_version_services_items" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "_uuid" varchar, + "icon" varchar + ); + + CREATE TABLE "_home_v_version_services_items_locales" ( + "title" varchar, + "description" varchar, + "cta_text" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_home_v" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "version_hero_cta_primary_link_type" "enum__home_v_version_hero_cta_primary_link_type" DEFAULT 'page', + "version_hero_cta_primary_page" "enum__home_v_version_hero_cta_primary_page", + "version_hero_cta_secondary_link_type" "enum__home_v_version_hero_cta_secondary_link_type" DEFAULT 'page', + "version_hero_cta_secondary_page" "enum__home_v_version_hero_cta_secondary_page", + "version_en_translation_status" "enum__home_v_version_en_translation_status" DEFAULT 'none', + "version__status" "enum__home_v_version_status" DEFAULT 'draft', + "version_updated_at" timestamp(3) with time zone, + "version_created_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "snapshot" boolean, + "published_locale" "enum__home_v_published_locale", + "latest" boolean + ); + + CREATE TABLE "_home_v_locales" ( + "version_hero_title" varchar, + "version_hero_subtitle" varchar, + "version_hero_description" varchar, + "version_hero_cta_primary_text" varchar, + "version_hero_cta_primary_href" varchar, + "version_hero_cta_secondary_text" varchar, + "version_hero_cta_secondary_href" varchar, + "version_about_title" varchar, + "version_services_title" varchar, + "version_services_subtitle" varchar, + "version_cta_title" varchar, + "version_cta_subtitle" varchar, + "version_cta_button" varchar, + "version_service_features_title" varchar, + "version_references_section_clients_title" varchar, + "version_references_section_clients_subtitle" varchar, + "version_references_section_partners_title" varchar, + "version_references_section_partners_subtitle" varchar, + "version_references_section_relationship_labels_technology_partner" varchar, + "version_references_section_relationship_labels_infrastructure" varchar, + "version_references_section_relationship_labels_supplier" varchar, + "version_references_section_relationship_labels_technology_used" varchar, + "version_references_section_relationship_labels_professional_partner" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "about_story_paragraphs" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_locale" "_locales" NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "value" varchar + ); + + CREATE TABLE "about_mission_values" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "icon" varchar + ); + + CREATE TABLE "about_mission_values_locales" ( + "title" varchar, + "description" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" varchar NOT NULL + ); + + CREATE TABLE "about_team_paragraphs" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_locale" "_locales" NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "value" varchar + ); + + CREATE TABLE "about" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "en_translation_status" "enum_about_en_translation_status" DEFAULT 'none', + "_status" "enum_about_status" DEFAULT 'draft', + "updated_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone + ); + + CREATE TABLE "about_locales" ( + "meta_title" varchar, + "meta_description" varchar, + "meta_og_description" varchar, + "hero_title" varchar, + "hero_subtitle" varchar, + "story_title" varchar, + "mission_title" varchar, + "mission_subtitle" varchar, + "team_title" varchar, + "team_subtitle" varchar, + "cta_title" varchar, + "cta_subtitle" varchar, + "cta_button" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_about_v_version_story_paragraphs" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_locale" "_locales" NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "value" varchar, + "_uuid" varchar + ); + + CREATE TABLE "_about_v_version_mission_values" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "icon" varchar, + "_uuid" varchar + ); + + CREATE TABLE "_about_v_version_mission_values_locales" ( + "title" varchar, + "description" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_about_v_version_team_paragraphs" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_locale" "_locales" NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "value" varchar, + "_uuid" varchar + ); + + CREATE TABLE "_about_v" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "version_en_translation_status" "enum__about_v_version_en_translation_status" DEFAULT 'none', + "version__status" "enum__about_v_version_status" DEFAULT 'draft', + "version_updated_at" timestamp(3) with time zone, + "version_created_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "snapshot" boolean, + "published_locale" "enum__about_v_published_locale", + "latest" boolean + ); + + CREATE TABLE "_about_v_locales" ( + "version_meta_title" varchar, + "version_meta_description" varchar, + "version_meta_og_description" varchar, + "version_hero_title" varchar, + "version_hero_subtitle" varchar, + "version_story_title" varchar, + "version_mission_title" varchar, + "version_mission_subtitle" varchar, + "version_team_title" varchar, + "version_team_subtitle" varchar, + "version_cta_title" varchar, + "version_cta_subtitle" varchar, + "version_cta_button" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "services_details_services_specs_items" ( + "_order" integer NOT NULL, + "_parent_id" varchar NOT NULL, + "_locale" "_locales" NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "value" varchar + ); + + CREATE TABLE "services_details_services" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "icon" varchar + ); + + CREATE TABLE "services_details_services_locales" ( + "title" varchar, + "description" varchar, + "specs_title" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" varchar NOT NULL + ); + + CREATE TABLE "services_support_channels" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "icon" varchar + ); + + CREATE TABLE "services_support_channels_locales" ( + "title" varchar, + "description" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" varchar NOT NULL + ); + + CREATE TABLE "services" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "en_translation_status" "enum_services_en_translation_status" DEFAULT 'none', + "_status" "enum_services_status" DEFAULT 'draft', + "updated_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone + ); + + CREATE TABLE "services_locales" ( + "meta_title" varchar, + "meta_description" varchar, + "meta_og_description" varchar, + "hero_title" varchar, + "hero_subtitle" varchar, + "details_title" varchar, + "details_subtitle" varchar, + "support_title" varchar, + "support_subtitle" varchar, + "cta_title" varchar, + "cta_subtitle" varchar, + "cta_primary_button" varchar, + "cta_secondary_button" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_services_v_version_details_services_specs_items" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_locale" "_locales" NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "value" varchar, + "_uuid" varchar + ); + + CREATE TABLE "_services_v_version_details_services" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "icon" varchar, + "_uuid" varchar + ); + + CREATE TABLE "_services_v_version_details_services_locales" ( + "title" varchar, + "description" varchar, + "specs_title" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_services_v_version_support_channels" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "icon" varchar, + "_uuid" varchar + ); + + CREATE TABLE "_services_v_version_support_channels_locales" ( + "title" varchar, + "description" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_services_v" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "version_en_translation_status" "enum__services_v_version_en_translation_status" DEFAULT 'none', + "version__status" "enum__services_v_version_status" DEFAULT 'draft', + "version_updated_at" timestamp(3) with time zone, + "version_created_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "snapshot" boolean, + "published_locale" "enum__services_v_published_locale", + "latest" boolean + ); + + CREATE TABLE "_services_v_locales" ( + "version_meta_title" varchar, + "version_meta_description" varchar, + "version_meta_og_description" varchar, + "version_hero_title" varchar, + "version_hero_subtitle" varchar, + "version_details_title" varchar, + "version_details_subtitle" varchar, + "version_support_title" varchar, + "version_support_subtitle" varchar, + "version_cta_title" varchar, + "version_cta_subtitle" varchar, + "version_cta_primary_button" varchar, + "version_cta_secondary_button" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "contact_faq_items" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" varchar PRIMARY KEY NOT NULL + ); + + CREATE TABLE "contact_faq_items_locales" ( + "question" varchar, + "answer" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" varchar NOT NULL + ); + + CREATE TABLE "contact" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "en_translation_status" "enum_contact_en_translation_status" DEFAULT 'none', + "_status" "enum_contact_status" DEFAULT 'draft', + "updated_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone + ); + + CREATE TABLE "contact_locales" ( + "meta_title" varchar, + "meta_description" varchar, + "hero_title" varchar, + "hero_subtitle" varchar, + "form_title" varchar, + "form_success_message" varchar, + "form_error_message" varchar, + "form_fields_name_label" varchar, + "form_fields_name_placeholder" varchar, + "form_fields_name_error" varchar, + "form_fields_email_label" varchar, + "form_fields_email_placeholder" varchar, + "form_fields_email_error_required" varchar, + "form_fields_email_error_invalid" varchar, + "form_fields_subject_label" varchar, + "form_fields_subject_placeholder" varchar, + "form_fields_subject_error" varchar, + "form_fields_message_label" varchar, + "form_fields_message_placeholder" varchar, + "form_fields_message_error_required" varchar, + "form_fields_message_error_min_length" varchar, + "form_fields_gdpr_label" varchar, + "form_fields_gdpr_error" varchar, + "form_submit_button" varchar, + "form_submitting_button" varchar, + "info_title" varchar, + "info_email_title" varchar, + "info_email_response_time" varchar, + "info_company_title" varchar, + "info_webmail_title" varchar, + "info_webmail_link_text" varchar, + "info_webmail_subtitle" varchar, + "faq_title" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_contact_v_version_faq_items" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "_uuid" varchar + ); + + CREATE TABLE "_contact_v_version_faq_items_locales" ( + "question" varchar, + "answer" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_contact_v" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "version_en_translation_status" "enum__contact_v_version_en_translation_status" DEFAULT 'none', + "version__status" "enum__contact_v_version_status" DEFAULT 'draft', + "version_updated_at" timestamp(3) with time zone, + "version_created_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "snapshot" boolean, + "published_locale" "enum__contact_v_published_locale", + "latest" boolean + ); + + CREATE TABLE "_contact_v_locales" ( + "version_meta_title" varchar, + "version_meta_description" varchar, + "version_hero_title" varchar, + "version_hero_subtitle" varchar, + "version_form_title" varchar, + "version_form_success_message" varchar, + "version_form_error_message" varchar, + "version_form_fields_name_label" varchar, + "version_form_fields_name_placeholder" varchar, + "version_form_fields_name_error" varchar, + "version_form_fields_email_label" varchar, + "version_form_fields_email_placeholder" varchar, + "version_form_fields_email_error_required" varchar, + "version_form_fields_email_error_invalid" varchar, + "version_form_fields_subject_label" varchar, + "version_form_fields_subject_placeholder" varchar, + "version_form_fields_subject_error" varchar, + "version_form_fields_message_label" varchar, + "version_form_fields_message_placeholder" varchar, + "version_form_fields_message_error_required" varchar, + "version_form_fields_message_error_min_length" varchar, + "version_form_fields_gdpr_label" varchar, + "version_form_fields_gdpr_error" varchar, + "version_form_submit_button" varchar, + "version_form_submitting_button" varchar, + "version_info_title" varchar, + "version_info_email_title" varchar, + "version_info_email_response_time" varchar, + "version_info_company_title" varchar, + "version_info_webmail_title" varchar, + "version_info_webmail_link_text" varchar, + "version_info_webmail_subtitle" varchar, + "version_faq_title" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "common" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "footer_address" varchar, + "en_translation_status" "enum_common_en_translation_status" DEFAULT 'none', + "_status" "enum_common_status" DEFAULT 'draft', + "updated_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone + ); + + CREATE TABLE "common_locales" ( + "buttons_contact" varchar, + "buttons_learn_more" varchar, + "buttons_webmail" varchar, + "buttons_send_message" varchar, + "labels_required" varchar, + "labels_features" varchar, + "validation_required" varchar, + "validation_invalid_email" varchar, + "validation_min_length" varchar, + "staging_banner" varchar, + "footer_copyright" varchar, + "a11y_open_menu" varchar, + "a11y_close_menu" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_common_v" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "version_footer_address" varchar, + "version_en_translation_status" "enum__common_v_version_en_translation_status" DEFAULT 'none', + "version__status" "enum__common_v_version_status" DEFAULT 'draft', + "version_updated_at" timestamp(3) with time zone, + "version_created_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "snapshot" boolean, + "published_locale" "enum__common_v_published_locale", + "latest" boolean + ); + + CREATE TABLE "_common_v_locales" ( + "version_buttons_contact" varchar, + "version_buttons_learn_more" varchar, + "version_buttons_webmail" varchar, + "version_buttons_send_message" varchar, + "version_labels_required" varchar, + "version_labels_features" varchar, + "version_validation_required" varchar, + "version_validation_invalid_email" varchar, + "version_validation_min_length" varchar, + "version_staging_banner" varchar, + "version_footer_copyright" varchar, + "version_a11y_open_menu" varchar, + "version_a11y_close_menu" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "hosting_plans" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "vat_rate_percent" numeric DEFAULT 27, + "en_translation_status" "enum_hosting_plans_en_translation_status" DEFAULT 'none', + "_status" "enum_hosting_plans_status" DEFAULT 'draft', + "updated_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone + ); + + CREATE TABLE "hosting_plans_locales" ( + "meta_title" varchar, + "meta_description" varchar, + "hero_title" varchar, + "hero_subtitle" varchar, + "labels_storage" varchar, + "labels_mail_storage" varchar, + "labels_domains" varchar, + "labels_domain_aliases" varchar, + "labels_databases" varchar, + "labels_mailboxes" varchar, + "labels_backup" varchar, + "labels_ssl" varchar, + "labels_spam_filter" varchar, + "labels_per_year" varchar, + "labels_per_month" varchar, + "labels_one_time" varchar, + "labels_plus_vat" varchar, + "labels_gross_price" varchar, + "labels_recommended" varchar, + "labels_included" varchar, + "labels_price_note" varchar, + "larger_needs_title" varchar, + "larger_needs_text" varchar, + "larger_needs_button" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + CREATE TABLE "_hosting_plans_v" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "version_vat_rate_percent" numeric DEFAULT 27, + "version_en_translation_status" "enum__hosting_plans_v_version_en_translation_status" DEFAULT 'none', + "version__status" "enum__hosting_plans_v_version_status" DEFAULT 'draft', + "version_updated_at" timestamp(3) with time zone, + "version_created_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "snapshot" boolean, + "published_locale" "enum__hosting_plans_v_published_locale", + "latest" boolean + ); + + CREATE TABLE "_hosting_plans_v_locales" ( + "version_meta_title" varchar, + "version_meta_description" varchar, + "version_hero_title" varchar, + "version_hero_subtitle" varchar, + "version_labels_storage" varchar, + "version_labels_mail_storage" varchar, + "version_labels_domains" varchar, + "version_labels_domain_aliases" varchar, + "version_labels_databases" varchar, + "version_labels_mailboxes" varchar, + "version_labels_backup" varchar, + "version_labels_ssl" varchar, + "version_labels_spam_filter" varchar, + "version_labels_per_year" varchar, + "version_labels_per_month" varchar, + "version_labels_one_time" varchar, + "version_labels_plus_vat" varchar, + "version_labels_gross_price" varchar, + "version_labels_recommended" varchar, + "version_labels_included" varchar, + "version_labels_price_note" varchar, + "version_larger_needs_title" varchar, + "version_larger_needs_text" varchar, + "version_larger_needs_button" varchar, + "id" serial PRIMARY KEY NOT NULL, + "_locale" "_locales" NOT NULL, + "_parent_id" uuid NOT NULL + ); + + ALTER TABLE "users_sessions" ADD CONSTRAINT "users_sessions_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "legal_pages_sections" ADD CONSTRAINT "legal_pages_sections_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."legal_pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "legal_pages_sections_locales" ADD CONSTRAINT "legal_pages_sections_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."legal_pages_sections"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "legal_pages_legal_validation_reviews" ADD CONSTRAINT "legal_pages_legal_validation_reviews_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."legal_pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "legal_pages_locales" ADD CONSTRAINT "legal_pages_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."legal_pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_legal_pages_v_version_sections" ADD CONSTRAINT "_legal_pages_v_version_sections_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_legal_pages_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_legal_pages_v_version_sections_locales" ADD CONSTRAINT "_legal_pages_v_version_sections_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_legal_pages_v_version_sections"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_legal_pages_v_version_legal_validation_reviews" ADD CONSTRAINT "_legal_pages_v_version_legal_validation_reviews_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_legal_pages_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_legal_pages_v" ADD CONSTRAINT "_legal_pages_v_parent_id_legal_pages_id_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."legal_pages"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "_legal_pages_v_locales" ADD CONSTRAINT "_legal_pages_v_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_legal_pages_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "partners" ADD CONSTRAINT "partners_logo_id_media_id_fk" FOREIGN KEY ("logo_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "_partners_v" ADD CONSTRAINT "_partners_v_parent_id_partners_id_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."partners"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "_partners_v" ADD CONSTRAINT "_partners_v_version_logo_id_media_id_fk" FOREIGN KEY ("version_logo_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "products_public_features" ADD CONSTRAINT "products_public_features_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."products"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "products_locales" ADD CONSTRAINT "products_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."products"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_products_v_version_public_features" ADD CONSTRAINT "_products_v_version_public_features_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_products_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_products_v" ADD CONSTRAINT "_products_v_parent_id_products_id_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."products"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "_products_v_locales" ADD CONSTRAINT "_products_v_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_products_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."payload_locked_documents"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_users_fk" FOREIGN KEY ("users_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_legal_pages_fk" FOREIGN KEY ("legal_pages_id") REFERENCES "public"."legal_pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_media_fk" FOREIGN KEY ("media_id") REFERENCES "public"."media"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_partners_fk" FOREIGN KEY ("partners_id") REFERENCES "public"."partners"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_contact_submissions_fk" FOREIGN KEY ("contact_submissions_id") REFERENCES "public"."contact_submissions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_products_fk" FOREIGN KEY ("products_id") REFERENCES "public"."products"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_preferences_rels" ADD CONSTRAINT "payload_preferences_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."payload_preferences"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_preferences_rels" ADD CONSTRAINT "payload_preferences_rels_users_fk" FOREIGN KEY ("users_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "home_hero_trust_bullets" ADD CONSTRAINT "home_hero_trust_bullets_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."home"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "home_about_usps" ADD CONSTRAINT "home_about_usps_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."home"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "home_about_usps_locales" ADD CONSTRAINT "home_about_usps_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."home_about_usps"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "home_services_items_features" ADD CONSTRAINT "home_services_items_features_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."home_services_items"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "home_services_items" ADD CONSTRAINT "home_services_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."home"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "home_services_items_locales" ADD CONSTRAINT "home_services_items_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."home_services_items"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "home_locales" ADD CONSTRAINT "home_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."home"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_home_v_version_hero_trust_bullets" ADD CONSTRAINT "_home_v_version_hero_trust_bullets_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_home_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_home_v_version_about_usps" ADD CONSTRAINT "_home_v_version_about_usps_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_home_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_home_v_version_about_usps_locales" ADD CONSTRAINT "_home_v_version_about_usps_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_home_v_version_about_usps"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_home_v_version_services_items_features" ADD CONSTRAINT "_home_v_version_services_items_features_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_home_v_version_services_items"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_home_v_version_services_items" ADD CONSTRAINT "_home_v_version_services_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_home_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_home_v_version_services_items_locales" ADD CONSTRAINT "_home_v_version_services_items_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_home_v_version_services_items"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_home_v_locales" ADD CONSTRAINT "_home_v_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_home_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "about_story_paragraphs" ADD CONSTRAINT "about_story_paragraphs_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."about"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "about_mission_values" ADD CONSTRAINT "about_mission_values_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."about"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "about_mission_values_locales" ADD CONSTRAINT "about_mission_values_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."about_mission_values"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "about_team_paragraphs" ADD CONSTRAINT "about_team_paragraphs_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."about"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "about_locales" ADD CONSTRAINT "about_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."about"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_about_v_version_story_paragraphs" ADD CONSTRAINT "_about_v_version_story_paragraphs_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_about_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_about_v_version_mission_values" ADD CONSTRAINT "_about_v_version_mission_values_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_about_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_about_v_version_mission_values_locales" ADD CONSTRAINT "_about_v_version_mission_values_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_about_v_version_mission_values"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_about_v_version_team_paragraphs" ADD CONSTRAINT "_about_v_version_team_paragraphs_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_about_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_about_v_locales" ADD CONSTRAINT "_about_v_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_about_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "services_details_services_specs_items" ADD CONSTRAINT "services_details_services_specs_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."services_details_services"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "services_details_services" ADD CONSTRAINT "services_details_services_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."services"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "services_details_services_locales" ADD CONSTRAINT "services_details_services_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."services_details_services"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "services_support_channels" ADD CONSTRAINT "services_support_channels_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."services"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "services_support_channels_locales" ADD CONSTRAINT "services_support_channels_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."services_support_channels"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "services_locales" ADD CONSTRAINT "services_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."services"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_services_v_version_details_services_specs_items" ADD CONSTRAINT "_services_v_version_details_services_specs_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_services_v_version_details_services"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_services_v_version_details_services" ADD CONSTRAINT "_services_v_version_details_services_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_services_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_services_v_version_details_services_locales" ADD CONSTRAINT "_services_v_version_details_services_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_services_v_version_details_services"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_services_v_version_support_channels" ADD CONSTRAINT "_services_v_version_support_channels_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_services_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_services_v_version_support_channels_locales" ADD CONSTRAINT "_services_v_version_support_channels_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_services_v_version_support_channels"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_services_v_locales" ADD CONSTRAINT "_services_v_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_services_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "contact_faq_items" ADD CONSTRAINT "contact_faq_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."contact"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "contact_faq_items_locales" ADD CONSTRAINT "contact_faq_items_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."contact_faq_items"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "contact_locales" ADD CONSTRAINT "contact_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."contact"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_contact_v_version_faq_items" ADD CONSTRAINT "_contact_v_version_faq_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_contact_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_contact_v_version_faq_items_locales" ADD CONSTRAINT "_contact_v_version_faq_items_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_contact_v_version_faq_items"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_contact_v_locales" ADD CONSTRAINT "_contact_v_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_contact_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "common_locales" ADD CONSTRAINT "common_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."common"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_common_v_locales" ADD CONSTRAINT "_common_v_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_common_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "hosting_plans_locales" ADD CONSTRAINT "hosting_plans_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."hosting_plans"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_hosting_plans_v_locales" ADD CONSTRAINT "_hosting_plans_v_locales_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_hosting_plans_v"("id") ON DELETE cascade ON UPDATE no action; + CREATE INDEX "users_sessions_order_idx" ON "users_sessions" USING btree ("_order"); + CREATE INDEX "users_sessions_parent_id_idx" ON "users_sessions" USING btree ("_parent_id"); + CREATE INDEX "users_updated_at_idx" ON "users" USING btree ("updated_at"); + CREATE INDEX "users_created_at_idx" ON "users" USING btree ("created_at"); + CREATE UNIQUE INDEX "users_email_idx" ON "users" USING btree ("email"); + CREATE INDEX "legal_pages_sections_order_idx" ON "legal_pages_sections" USING btree ("_order"); + CREATE INDEX "legal_pages_sections_parent_id_idx" ON "legal_pages_sections" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "legal_pages_sections_locales_locale_parent_id_unique" ON "legal_pages_sections_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "legal_pages_legal_validation_reviews_order_idx" ON "legal_pages_legal_validation_reviews" USING btree ("_order"); + CREATE INDEX "legal_pages_legal_validation_reviews_parent_id_idx" ON "legal_pages_legal_validation_reviews" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "legal_pages_slug_idx" ON "legal_pages" USING btree ("slug"); + CREATE INDEX "legal_pages_updated_at_idx" ON "legal_pages" USING btree ("updated_at"); + CREATE INDEX "legal_pages_created_at_idx" ON "legal_pages" USING btree ("created_at"); + CREATE INDEX "legal_pages__status_idx" ON "legal_pages" USING btree ("_status"); + CREATE UNIQUE INDEX "legal_pages_locales_locale_parent_id_unique" ON "legal_pages_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_legal_pages_v_version_sections_order_idx" ON "_legal_pages_v_version_sections" USING btree ("_order"); + CREATE INDEX "_legal_pages_v_version_sections_parent_id_idx" ON "_legal_pages_v_version_sections" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "_legal_pages_v_version_sections_locales_locale_parent_id_uni" ON "_legal_pages_v_version_sections_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_legal_pages_v_version_legal_validation_reviews_order_idx" ON "_legal_pages_v_version_legal_validation_reviews" USING btree ("_order"); + CREATE INDEX "_legal_pages_v_version_legal_validation_reviews_parent_id_idx" ON "_legal_pages_v_version_legal_validation_reviews" USING btree ("_parent_id"); + CREATE INDEX "_legal_pages_v_parent_idx" ON "_legal_pages_v" USING btree ("parent_id"); + CREATE INDEX "_legal_pages_v_version_version_slug_idx" ON "_legal_pages_v" USING btree ("version_slug"); + CREATE INDEX "_legal_pages_v_version_version_updated_at_idx" ON "_legal_pages_v" USING btree ("version_updated_at"); + CREATE INDEX "_legal_pages_v_version_version_created_at_idx" ON "_legal_pages_v" USING btree ("version_created_at"); + CREATE INDEX "_legal_pages_v_version_version__status_idx" ON "_legal_pages_v" USING btree ("version__status"); + CREATE INDEX "_legal_pages_v_created_at_idx" ON "_legal_pages_v" USING btree ("created_at"); + CREATE INDEX "_legal_pages_v_updated_at_idx" ON "_legal_pages_v" USING btree ("updated_at"); + CREATE INDEX "_legal_pages_v_snapshot_idx" ON "_legal_pages_v" USING btree ("snapshot"); + CREATE INDEX "_legal_pages_v_published_locale_idx" ON "_legal_pages_v" USING btree ("published_locale"); + CREATE INDEX "_legal_pages_v_latest_idx" ON "_legal_pages_v" USING btree ("latest"); + CREATE UNIQUE INDEX "_legal_pages_v_locales_locale_parent_id_unique" ON "_legal_pages_v_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "media_updated_at_idx" ON "media" USING btree ("updated_at"); + CREATE INDEX "media_created_at_idx" ON "media" USING btree ("created_at"); + CREATE UNIQUE INDEX "media_filename_idx" ON "media" USING btree ("filename"); + CREATE INDEX "partners_logo_idx" ON "partners" USING btree ("logo_id"); + CREATE INDEX "partners_updated_at_idx" ON "partners" USING btree ("updated_at"); + CREATE INDEX "partners_created_at_idx" ON "partners" USING btree ("created_at"); + CREATE INDEX "partners__status_idx" ON "partners" USING btree ("_status"); + CREATE INDEX "_partners_v_parent_idx" ON "_partners_v" USING btree ("parent_id"); + CREATE INDEX "_partners_v_version_version_logo_idx" ON "_partners_v" USING btree ("version_logo_id"); + CREATE INDEX "_partners_v_version_version_updated_at_idx" ON "_partners_v" USING btree ("version_updated_at"); + CREATE INDEX "_partners_v_version_version_created_at_idx" ON "_partners_v" USING btree ("version_created_at"); + CREATE INDEX "_partners_v_version_version__status_idx" ON "_partners_v" USING btree ("version__status"); + CREATE INDEX "_partners_v_created_at_idx" ON "_partners_v" USING btree ("created_at"); + CREATE INDEX "_partners_v_updated_at_idx" ON "_partners_v" USING btree ("updated_at"); + CREATE INDEX "_partners_v_snapshot_idx" ON "_partners_v" USING btree ("snapshot"); + CREATE INDEX "_partners_v_published_locale_idx" ON "_partners_v" USING btree ("published_locale"); + CREATE INDEX "_partners_v_latest_idx" ON "_partners_v" USING btree ("latest"); + CREATE INDEX "contact_submissions_updated_at_idx" ON "contact_submissions" USING btree ("updated_at"); + CREATE INDEX "contact_submissions_created_at_idx" ON "contact_submissions" USING btree ("created_at"); + CREATE INDEX "products_public_features_order_idx" ON "products_public_features" USING btree ("_order"); + CREATE INDEX "products_public_features_parent_id_idx" ON "products_public_features" USING btree ("_parent_id"); + CREATE INDEX "products_public_features_locale_idx" ON "products_public_features" USING btree ("_locale"); + CREATE UNIQUE INDEX "products_slug_idx" ON "products" USING btree ("slug"); + CREATE INDEX "products_updated_at_idx" ON "products" USING btree ("updated_at"); + CREATE INDEX "products_created_at_idx" ON "products" USING btree ("created_at"); + CREATE INDEX "products__status_idx" ON "products" USING btree ("_status"); + CREATE UNIQUE INDEX "products_locales_locale_parent_id_unique" ON "products_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_products_v_version_public_features_order_idx" ON "_products_v_version_public_features" USING btree ("_order"); + CREATE INDEX "_products_v_version_public_features_parent_id_idx" ON "_products_v_version_public_features" USING btree ("_parent_id"); + CREATE INDEX "_products_v_version_public_features_locale_idx" ON "_products_v_version_public_features" USING btree ("_locale"); + CREATE INDEX "_products_v_parent_idx" ON "_products_v" USING btree ("parent_id"); + CREATE INDEX "_products_v_version_version_slug_idx" ON "_products_v" USING btree ("version_slug"); + CREATE INDEX "_products_v_version_version_updated_at_idx" ON "_products_v" USING btree ("version_updated_at"); + CREATE INDEX "_products_v_version_version_created_at_idx" ON "_products_v" USING btree ("version_created_at"); + CREATE INDEX "_products_v_version_version__status_idx" ON "_products_v" USING btree ("version__status"); + CREATE INDEX "_products_v_created_at_idx" ON "_products_v" USING btree ("created_at"); + CREATE INDEX "_products_v_updated_at_idx" ON "_products_v" USING btree ("updated_at"); + CREATE INDEX "_products_v_snapshot_idx" ON "_products_v" USING btree ("snapshot"); + CREATE INDEX "_products_v_published_locale_idx" ON "_products_v" USING btree ("published_locale"); + CREATE INDEX "_products_v_latest_idx" ON "_products_v" USING btree ("latest"); + CREATE UNIQUE INDEX "_products_v_locales_locale_parent_id_unique" ON "_products_v_locales" USING btree ("_locale","_parent_id"); + CREATE UNIQUE INDEX "payload_kv_key_idx" ON "payload_kv" USING btree ("key"); + CREATE INDEX "payload_locked_documents_global_slug_idx" ON "payload_locked_documents" USING btree ("global_slug"); + CREATE INDEX "payload_locked_documents_updated_at_idx" ON "payload_locked_documents" USING btree ("updated_at"); + CREATE INDEX "payload_locked_documents_created_at_idx" ON "payload_locked_documents" USING btree ("created_at"); + CREATE INDEX "payload_locked_documents_rels_order_idx" ON "payload_locked_documents_rels" USING btree ("order"); + CREATE INDEX "payload_locked_documents_rels_parent_idx" ON "payload_locked_documents_rels" USING btree ("parent_id"); + CREATE INDEX "payload_locked_documents_rels_path_idx" ON "payload_locked_documents_rels" USING btree ("path"); + CREATE INDEX "payload_locked_documents_rels_users_id_idx" ON "payload_locked_documents_rels" USING btree ("users_id"); + CREATE INDEX "payload_locked_documents_rels_legal_pages_id_idx" ON "payload_locked_documents_rels" USING btree ("legal_pages_id"); + CREATE INDEX "payload_locked_documents_rels_media_id_idx" ON "payload_locked_documents_rels" USING btree ("media_id"); + CREATE INDEX "payload_locked_documents_rels_partners_id_idx" ON "payload_locked_documents_rels" USING btree ("partners_id"); + CREATE INDEX "payload_locked_documents_rels_contact_submissions_id_idx" ON "payload_locked_documents_rels" USING btree ("contact_submissions_id"); + CREATE INDEX "payload_locked_documents_rels_products_id_idx" ON "payload_locked_documents_rels" USING btree ("products_id"); + CREATE INDEX "payload_preferences_key_idx" ON "payload_preferences" USING btree ("key"); + CREATE INDEX "payload_preferences_updated_at_idx" ON "payload_preferences" USING btree ("updated_at"); + CREATE INDEX "payload_preferences_created_at_idx" ON "payload_preferences" USING btree ("created_at"); + CREATE INDEX "payload_preferences_rels_order_idx" ON "payload_preferences_rels" USING btree ("order"); + CREATE INDEX "payload_preferences_rels_parent_idx" ON "payload_preferences_rels" USING btree ("parent_id"); + CREATE INDEX "payload_preferences_rels_path_idx" ON "payload_preferences_rels" USING btree ("path"); + CREATE INDEX "payload_preferences_rels_users_id_idx" ON "payload_preferences_rels" USING btree ("users_id"); + CREATE INDEX "payload_migrations_updated_at_idx" ON "payload_migrations" USING btree ("updated_at"); + CREATE INDEX "payload_migrations_created_at_idx" ON "payload_migrations" USING btree ("created_at"); + CREATE INDEX "home_hero_trust_bullets_order_idx" ON "home_hero_trust_bullets" USING btree ("_order"); + CREATE INDEX "home_hero_trust_bullets_parent_id_idx" ON "home_hero_trust_bullets" USING btree ("_parent_id"); + CREATE INDEX "home_hero_trust_bullets_locale_idx" ON "home_hero_trust_bullets" USING btree ("_locale"); + CREATE INDEX "home_about_usps_order_idx" ON "home_about_usps" USING btree ("_order"); + CREATE INDEX "home_about_usps_parent_id_idx" ON "home_about_usps" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "home_about_usps_locales_locale_parent_id_unique" ON "home_about_usps_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "home_services_items_features_order_idx" ON "home_services_items_features" USING btree ("_order"); + CREATE INDEX "home_services_items_features_parent_id_idx" ON "home_services_items_features" USING btree ("_parent_id"); + CREATE INDEX "home_services_items_features_locale_idx" ON "home_services_items_features" USING btree ("_locale"); + CREATE INDEX "home_services_items_order_idx" ON "home_services_items" USING btree ("_order"); + CREATE INDEX "home_services_items_parent_id_idx" ON "home_services_items" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "home_services_items_locales_locale_parent_id_unique" ON "home_services_items_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "home__status_idx" ON "home" USING btree ("_status"); + CREATE UNIQUE INDEX "home_locales_locale_parent_id_unique" ON "home_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_home_v_version_hero_trust_bullets_order_idx" ON "_home_v_version_hero_trust_bullets" USING btree ("_order"); + CREATE INDEX "_home_v_version_hero_trust_bullets_parent_id_idx" ON "_home_v_version_hero_trust_bullets" USING btree ("_parent_id"); + CREATE INDEX "_home_v_version_hero_trust_bullets_locale_idx" ON "_home_v_version_hero_trust_bullets" USING btree ("_locale"); + CREATE INDEX "_home_v_version_about_usps_order_idx" ON "_home_v_version_about_usps" USING btree ("_order"); + CREATE INDEX "_home_v_version_about_usps_parent_id_idx" ON "_home_v_version_about_usps" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "_home_v_version_about_usps_locales_locale_parent_id_unique" ON "_home_v_version_about_usps_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_home_v_version_services_items_features_order_idx" ON "_home_v_version_services_items_features" USING btree ("_order"); + CREATE INDEX "_home_v_version_services_items_features_parent_id_idx" ON "_home_v_version_services_items_features" USING btree ("_parent_id"); + CREATE INDEX "_home_v_version_services_items_features_locale_idx" ON "_home_v_version_services_items_features" USING btree ("_locale"); + CREATE INDEX "_home_v_version_services_items_order_idx" ON "_home_v_version_services_items" USING btree ("_order"); + CREATE INDEX "_home_v_version_services_items_parent_id_idx" ON "_home_v_version_services_items" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "_home_v_version_services_items_locales_locale_parent_id_uniq" ON "_home_v_version_services_items_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_home_v_version_version__status_idx" ON "_home_v" USING btree ("version__status"); + CREATE INDEX "_home_v_created_at_idx" ON "_home_v" USING btree ("created_at"); + CREATE INDEX "_home_v_updated_at_idx" ON "_home_v" USING btree ("updated_at"); + CREATE INDEX "_home_v_snapshot_idx" ON "_home_v" USING btree ("snapshot"); + CREATE INDEX "_home_v_published_locale_idx" ON "_home_v" USING btree ("published_locale"); + CREATE INDEX "_home_v_latest_idx" ON "_home_v" USING btree ("latest"); + CREATE UNIQUE INDEX "_home_v_locales_locale_parent_id_unique" ON "_home_v_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "about_story_paragraphs_order_idx" ON "about_story_paragraphs" USING btree ("_order"); + CREATE INDEX "about_story_paragraphs_parent_id_idx" ON "about_story_paragraphs" USING btree ("_parent_id"); + CREATE INDEX "about_story_paragraphs_locale_idx" ON "about_story_paragraphs" USING btree ("_locale"); + CREATE INDEX "about_mission_values_order_idx" ON "about_mission_values" USING btree ("_order"); + CREATE INDEX "about_mission_values_parent_id_idx" ON "about_mission_values" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "about_mission_values_locales_locale_parent_id_unique" ON "about_mission_values_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "about_team_paragraphs_order_idx" ON "about_team_paragraphs" USING btree ("_order"); + CREATE INDEX "about_team_paragraphs_parent_id_idx" ON "about_team_paragraphs" USING btree ("_parent_id"); + CREATE INDEX "about_team_paragraphs_locale_idx" ON "about_team_paragraphs" USING btree ("_locale"); + CREATE INDEX "about__status_idx" ON "about" USING btree ("_status"); + CREATE UNIQUE INDEX "about_locales_locale_parent_id_unique" ON "about_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_about_v_version_story_paragraphs_order_idx" ON "_about_v_version_story_paragraphs" USING btree ("_order"); + CREATE INDEX "_about_v_version_story_paragraphs_parent_id_idx" ON "_about_v_version_story_paragraphs" USING btree ("_parent_id"); + CREATE INDEX "_about_v_version_story_paragraphs_locale_idx" ON "_about_v_version_story_paragraphs" USING btree ("_locale"); + CREATE INDEX "_about_v_version_mission_values_order_idx" ON "_about_v_version_mission_values" USING btree ("_order"); + CREATE INDEX "_about_v_version_mission_values_parent_id_idx" ON "_about_v_version_mission_values" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "_about_v_version_mission_values_locales_locale_parent_id_uni" ON "_about_v_version_mission_values_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_about_v_version_team_paragraphs_order_idx" ON "_about_v_version_team_paragraphs" USING btree ("_order"); + CREATE INDEX "_about_v_version_team_paragraphs_parent_id_idx" ON "_about_v_version_team_paragraphs" USING btree ("_parent_id"); + CREATE INDEX "_about_v_version_team_paragraphs_locale_idx" ON "_about_v_version_team_paragraphs" USING btree ("_locale"); + CREATE INDEX "_about_v_version_version__status_idx" ON "_about_v" USING btree ("version__status"); + CREATE INDEX "_about_v_created_at_idx" ON "_about_v" USING btree ("created_at"); + CREATE INDEX "_about_v_updated_at_idx" ON "_about_v" USING btree ("updated_at"); + CREATE INDEX "_about_v_snapshot_idx" ON "_about_v" USING btree ("snapshot"); + CREATE INDEX "_about_v_published_locale_idx" ON "_about_v" USING btree ("published_locale"); + CREATE INDEX "_about_v_latest_idx" ON "_about_v" USING btree ("latest"); + CREATE UNIQUE INDEX "_about_v_locales_locale_parent_id_unique" ON "_about_v_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "services_details_services_specs_items_order_idx" ON "services_details_services_specs_items" USING btree ("_order"); + CREATE INDEX "services_details_services_specs_items_parent_id_idx" ON "services_details_services_specs_items" USING btree ("_parent_id"); + CREATE INDEX "services_details_services_specs_items_locale_idx" ON "services_details_services_specs_items" USING btree ("_locale"); + CREATE INDEX "services_details_services_order_idx" ON "services_details_services" USING btree ("_order"); + CREATE INDEX "services_details_services_parent_id_idx" ON "services_details_services" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "services_details_services_locales_locale_parent_id_unique" ON "services_details_services_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "services_support_channels_order_idx" ON "services_support_channels" USING btree ("_order"); + CREATE INDEX "services_support_channels_parent_id_idx" ON "services_support_channels" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "services_support_channels_locales_locale_parent_id_unique" ON "services_support_channels_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "services__status_idx" ON "services" USING btree ("_status"); + CREATE UNIQUE INDEX "services_locales_locale_parent_id_unique" ON "services_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_services_v_version_details_services_specs_items_order_idx" ON "_services_v_version_details_services_specs_items" USING btree ("_order"); + CREATE INDEX "_services_v_version_details_services_specs_items_parent_id_idx" ON "_services_v_version_details_services_specs_items" USING btree ("_parent_id"); + CREATE INDEX "_services_v_version_details_services_specs_items_locale_idx" ON "_services_v_version_details_services_specs_items" USING btree ("_locale"); + CREATE INDEX "_services_v_version_details_services_order_idx" ON "_services_v_version_details_services" USING btree ("_order"); + CREATE INDEX "_services_v_version_details_services_parent_id_idx" ON "_services_v_version_details_services" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "_services_v_version_details_services_locales_locale_parent_i" ON "_services_v_version_details_services_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_services_v_version_support_channels_order_idx" ON "_services_v_version_support_channels" USING btree ("_order"); + CREATE INDEX "_services_v_version_support_channels_parent_id_idx" ON "_services_v_version_support_channels" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "_services_v_version_support_channels_locales_locale_parent_i" ON "_services_v_version_support_channels_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_services_v_version_version__status_idx" ON "_services_v" USING btree ("version__status"); + CREATE INDEX "_services_v_created_at_idx" ON "_services_v" USING btree ("created_at"); + CREATE INDEX "_services_v_updated_at_idx" ON "_services_v" USING btree ("updated_at"); + CREATE INDEX "_services_v_snapshot_idx" ON "_services_v" USING btree ("snapshot"); + CREATE INDEX "_services_v_published_locale_idx" ON "_services_v" USING btree ("published_locale"); + CREATE INDEX "_services_v_latest_idx" ON "_services_v" USING btree ("latest"); + CREATE UNIQUE INDEX "_services_v_locales_locale_parent_id_unique" ON "_services_v_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "contact_faq_items_order_idx" ON "contact_faq_items" USING btree ("_order"); + CREATE INDEX "contact_faq_items_parent_id_idx" ON "contact_faq_items" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "contact_faq_items_locales_locale_parent_id_unique" ON "contact_faq_items_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "contact__status_idx" ON "contact" USING btree ("_status"); + CREATE UNIQUE INDEX "contact_locales_locale_parent_id_unique" ON "contact_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_contact_v_version_faq_items_order_idx" ON "_contact_v_version_faq_items" USING btree ("_order"); + CREATE INDEX "_contact_v_version_faq_items_parent_id_idx" ON "_contact_v_version_faq_items" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "_contact_v_version_faq_items_locales_locale_parent_id_unique" ON "_contact_v_version_faq_items_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_contact_v_version_version__status_idx" ON "_contact_v" USING btree ("version__status"); + CREATE INDEX "_contact_v_created_at_idx" ON "_contact_v" USING btree ("created_at"); + CREATE INDEX "_contact_v_updated_at_idx" ON "_contact_v" USING btree ("updated_at"); + CREATE INDEX "_contact_v_snapshot_idx" ON "_contact_v" USING btree ("snapshot"); + CREATE INDEX "_contact_v_published_locale_idx" ON "_contact_v" USING btree ("published_locale"); + CREATE INDEX "_contact_v_latest_idx" ON "_contact_v" USING btree ("latest"); + CREATE UNIQUE INDEX "_contact_v_locales_locale_parent_id_unique" ON "_contact_v_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "common__status_idx" ON "common" USING btree ("_status"); + CREATE UNIQUE INDEX "common_locales_locale_parent_id_unique" ON "common_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_common_v_version_version__status_idx" ON "_common_v" USING btree ("version__status"); + CREATE INDEX "_common_v_created_at_idx" ON "_common_v" USING btree ("created_at"); + CREATE INDEX "_common_v_updated_at_idx" ON "_common_v" USING btree ("updated_at"); + CREATE INDEX "_common_v_snapshot_idx" ON "_common_v" USING btree ("snapshot"); + CREATE INDEX "_common_v_published_locale_idx" ON "_common_v" USING btree ("published_locale"); + CREATE INDEX "_common_v_latest_idx" ON "_common_v" USING btree ("latest"); + CREATE UNIQUE INDEX "_common_v_locales_locale_parent_id_unique" ON "_common_v_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "hosting_plans__status_idx" ON "hosting_plans" USING btree ("_status"); + CREATE UNIQUE INDEX "hosting_plans_locales_locale_parent_id_unique" ON "hosting_plans_locales" USING btree ("_locale","_parent_id"); + CREATE INDEX "_hosting_plans_v_version_version__status_idx" ON "_hosting_plans_v" USING btree ("version__status"); + CREATE INDEX "_hosting_plans_v_created_at_idx" ON "_hosting_plans_v" USING btree ("created_at"); + CREATE INDEX "_hosting_plans_v_updated_at_idx" ON "_hosting_plans_v" USING btree ("updated_at"); + CREATE INDEX "_hosting_plans_v_snapshot_idx" ON "_hosting_plans_v" USING btree ("snapshot"); + CREATE INDEX "_hosting_plans_v_published_locale_idx" ON "_hosting_plans_v" USING btree ("published_locale"); + CREATE INDEX "_hosting_plans_v_latest_idx" ON "_hosting_plans_v" USING btree ("latest"); + CREATE UNIQUE INDEX "_hosting_plans_v_locales_locale_parent_id_unique" ON "_hosting_plans_v_locales" USING btree ("_locale","_parent_id");`) +} + +export async function down({ db, payload, req }: MigrateDownArgs): Promise { + await db.execute(sql` + DROP TABLE "users_sessions" CASCADE; + DROP TABLE "users" CASCADE; + DROP TABLE "legal_pages_sections" CASCADE; + DROP TABLE "legal_pages_sections_locales" CASCADE; + DROP TABLE "legal_pages_legal_validation_reviews" CASCADE; + DROP TABLE "legal_pages" CASCADE; + DROP TABLE "legal_pages_locales" CASCADE; + DROP TABLE "_legal_pages_v_version_sections" CASCADE; + DROP TABLE "_legal_pages_v_version_sections_locales" CASCADE; + DROP TABLE "_legal_pages_v_version_legal_validation_reviews" CASCADE; + DROP TABLE "_legal_pages_v" CASCADE; + DROP TABLE "_legal_pages_v_locales" CASCADE; + DROP TABLE "media" CASCADE; + DROP TABLE "partners" CASCADE; + DROP TABLE "_partners_v" CASCADE; + DROP TABLE "contact_submissions" CASCADE; + DROP TABLE "products_public_features" CASCADE; + DROP TABLE "products" CASCADE; + DROP TABLE "products_locales" CASCADE; + DROP TABLE "_products_v_version_public_features" CASCADE; + DROP TABLE "_products_v" CASCADE; + DROP TABLE "_products_v_locales" CASCADE; + DROP TABLE "payload_kv" CASCADE; + DROP TABLE "payload_locked_documents" CASCADE; + DROP TABLE "payload_locked_documents_rels" CASCADE; + DROP TABLE "payload_preferences" CASCADE; + DROP TABLE "payload_preferences_rels" CASCADE; + DROP TABLE "payload_migrations" CASCADE; + DROP TABLE "home_hero_trust_bullets" CASCADE; + DROP TABLE "home_about_usps" CASCADE; + DROP TABLE "home_about_usps_locales" CASCADE; + DROP TABLE "home_services_items_features" CASCADE; + DROP TABLE "home_services_items" CASCADE; + DROP TABLE "home_services_items_locales" CASCADE; + DROP TABLE "home" CASCADE; + DROP TABLE "home_locales" CASCADE; + DROP TABLE "_home_v_version_hero_trust_bullets" CASCADE; + DROP TABLE "_home_v_version_about_usps" CASCADE; + DROP TABLE "_home_v_version_about_usps_locales" CASCADE; + DROP TABLE "_home_v_version_services_items_features" CASCADE; + DROP TABLE "_home_v_version_services_items" CASCADE; + DROP TABLE "_home_v_version_services_items_locales" CASCADE; + DROP TABLE "_home_v" CASCADE; + DROP TABLE "_home_v_locales" CASCADE; + DROP TABLE "about_story_paragraphs" CASCADE; + DROP TABLE "about_mission_values" CASCADE; + DROP TABLE "about_mission_values_locales" CASCADE; + DROP TABLE "about_team_paragraphs" CASCADE; + DROP TABLE "about" CASCADE; + DROP TABLE "about_locales" CASCADE; + DROP TABLE "_about_v_version_story_paragraphs" CASCADE; + DROP TABLE "_about_v_version_mission_values" CASCADE; + DROP TABLE "_about_v_version_mission_values_locales" CASCADE; + DROP TABLE "_about_v_version_team_paragraphs" CASCADE; + DROP TABLE "_about_v" CASCADE; + DROP TABLE "_about_v_locales" CASCADE; + DROP TABLE "services_details_services_specs_items" CASCADE; + DROP TABLE "services_details_services" CASCADE; + DROP TABLE "services_details_services_locales" CASCADE; + DROP TABLE "services_support_channels" CASCADE; + DROP TABLE "services_support_channels_locales" CASCADE; + DROP TABLE "services" CASCADE; + DROP TABLE "services_locales" CASCADE; + DROP TABLE "_services_v_version_details_services_specs_items" CASCADE; + DROP TABLE "_services_v_version_details_services" CASCADE; + DROP TABLE "_services_v_version_details_services_locales" CASCADE; + DROP TABLE "_services_v_version_support_channels" CASCADE; + DROP TABLE "_services_v_version_support_channels_locales" CASCADE; + DROP TABLE "_services_v" CASCADE; + DROP TABLE "_services_v_locales" CASCADE; + DROP TABLE "contact_faq_items" CASCADE; + DROP TABLE "contact_faq_items_locales" CASCADE; + DROP TABLE "contact" CASCADE; + DROP TABLE "contact_locales" CASCADE; + DROP TABLE "_contact_v_version_faq_items" CASCADE; + DROP TABLE "_contact_v_version_faq_items_locales" CASCADE; + DROP TABLE "_contact_v" CASCADE; + DROP TABLE "_contact_v_locales" CASCADE; + DROP TABLE "common" CASCADE; + DROP TABLE "common_locales" CASCADE; + DROP TABLE "_common_v" CASCADE; + DROP TABLE "_common_v_locales" CASCADE; + DROP TABLE "hosting_plans" CASCADE; + DROP TABLE "hosting_plans_locales" CASCADE; + DROP TABLE "_hosting_plans_v" CASCADE; + DROP TABLE "_hosting_plans_v_locales" CASCADE; + DROP TYPE "public"."_locales"; + DROP TYPE "public"."enum_legal_pages_legal_validation_reviews_verdict"; + DROP TYPE "public"."enum_legal_pages_en_translation_status"; + DROP TYPE "public"."enum_legal_pages_status"; + DROP TYPE "public"."enum__legal_pages_v_version_legal_validation_reviews_verdict"; + DROP TYPE "public"."enum__legal_pages_v_version_en_translation_status"; + DROP TYPE "public"."enum__legal_pages_v_version_status"; + DROP TYPE "public"."enum__legal_pages_v_published_locale"; + DROP TYPE "public"."enum_partners_relationship"; + DROP TYPE "public"."enum_partners_publication_permission"; + DROP TYPE "public"."enum_partners_status"; + DROP TYPE "public"."enum__partners_v_version_relationship"; + DROP TYPE "public"."enum__partners_v_version_publication_permission"; + DROP TYPE "public"."enum__partners_v_version_status"; + DROP TYPE "public"."enum__partners_v_published_locale"; + DROP TYPE "public"."enum_contact_submissions_status"; + DROP TYPE "public"."enum_products_product_type"; + DROP TYPE "public"."enum_products_status"; + DROP TYPE "public"."enum_products_pricing_billing_period"; + DROP TYPE "public"."enum_products_en_translation_status"; + DROP TYPE "public"."enum__products_v_version_product_type"; + DROP TYPE "public"."enum__products_v_version_status"; + DROP TYPE "public"."enum__products_v_version_pricing_billing_period"; + DROP TYPE "public"."enum__products_v_version_en_translation_status"; + DROP TYPE "public"."enum__products_v_published_locale"; + DROP TYPE "public"."enum_home_hero_cta_primary_link_type"; + DROP TYPE "public"."enum_home_hero_cta_primary_page"; + DROP TYPE "public"."enum_home_hero_cta_secondary_link_type"; + DROP TYPE "public"."enum_home_hero_cta_secondary_page"; + DROP TYPE "public"."enum_home_en_translation_status"; + DROP TYPE "public"."enum_home_status"; + DROP TYPE "public"."enum__home_v_version_hero_cta_primary_link_type"; + DROP TYPE "public"."enum__home_v_version_hero_cta_primary_page"; + DROP TYPE "public"."enum__home_v_version_hero_cta_secondary_link_type"; + DROP TYPE "public"."enum__home_v_version_hero_cta_secondary_page"; + DROP TYPE "public"."enum__home_v_version_en_translation_status"; + DROP TYPE "public"."enum__home_v_version_status"; + DROP TYPE "public"."enum__home_v_published_locale"; + DROP TYPE "public"."enum_about_en_translation_status"; + DROP TYPE "public"."enum_about_status"; + DROP TYPE "public"."enum__about_v_version_en_translation_status"; + DROP TYPE "public"."enum__about_v_version_status"; + DROP TYPE "public"."enum__about_v_published_locale"; + DROP TYPE "public"."enum_services_en_translation_status"; + DROP TYPE "public"."enum_services_status"; + DROP TYPE "public"."enum__services_v_version_en_translation_status"; + DROP TYPE "public"."enum__services_v_version_status"; + DROP TYPE "public"."enum__services_v_published_locale"; + DROP TYPE "public"."enum_contact_en_translation_status"; + DROP TYPE "public"."enum_contact_status"; + DROP TYPE "public"."enum__contact_v_version_en_translation_status"; + DROP TYPE "public"."enum__contact_v_version_status"; + DROP TYPE "public"."enum__contact_v_published_locale"; + DROP TYPE "public"."enum_common_en_translation_status"; + DROP TYPE "public"."enum_common_status"; + DROP TYPE "public"."enum__common_v_version_en_translation_status"; + DROP TYPE "public"."enum__common_v_version_status"; + DROP TYPE "public"."enum__common_v_published_locale"; + DROP TYPE "public"."enum_hosting_plans_en_translation_status"; + DROP TYPE "public"."enum_hosting_plans_status"; + DROP TYPE "public"."enum__hosting_plans_v_version_en_translation_status"; + DROP TYPE "public"."enum__hosting_plans_v_version_status"; + DROP TYPE "public"."enum__hosting_plans_v_published_locale";`) +} diff --git a/proto/src/migrations/20260929_atlantisz_pending.ts b/proto/src/migrations/20260929_atlantisz_pending.ts deleted file mode 100644 index 282f95d..0000000 --- a/proto/src/migrations/20260929_atlantisz_pending.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * MITHOME-133: az Atlantisz Horgászüdülő és Halásztanya bejegyzést - * "Egyeztetés alatt" állapotba teszi, amíg a logó (fehér felirat, világos - * háttéren olvashatatlan) és a hivatalos név rendeződik. - * - * WHY külön migráció: a 20260929_partner_references a stagingen már - * "granted" állapottal lefutott; a még le nem futott környezetekben az - * eleve "pending"-et állít. Csak a saját, automatikus besorolást írja - * felül (egyező permissionReference) — egy későbbi admin-döntéshez nem nyúl. - */ -import type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/db-mongodb' - -import { rewriteDocs } from '../lib/migrate-global-docs' - -const NAME = 'Atlantisz Horgászüdülő és Halásztanya' -const AUTO_GRANTED_REFERENCE = 'Írásos engedély megvan (tulajdonosi megerősítés, 2026-09-29)' -export const PENDING_REFERENCE = 'Írásos engedély megvan; logó és hivatalos név egyeztetés alatt (MITHOME-133)' - -export function markAtlantiszPending(doc: Record): number { - if (doc.name !== NAME || doc.publicationPermission !== 'granted' || doc.permissionReference !== AUTO_GRANTED_REFERENCE) { - return 0 - } - doc.publicationPermission = 'pending' - doc.permissionReference = PENDING_REFERENCE - return 1 -} - -export async function up(args: MigrateUpArgs): Promise { - const changed = await rewriteDocs( - args, - { kind: 'collection', slug: 'partners' }, - ['publicationPermission', 'permissionReference'], - markAtlantiszPending, - { versions: 'latest' }, - ) - args.payload.logger.info(`MITHOME-133 Atlantisz: ${changed} record(s) set to pending`) -} - -/** DECISION: no automatic down — set the status in the admin instead. */ -export async function down(args: MigrateDownArgs): Promise { - args.payload.logger.warn('MITHOME-133 Atlantisz: down is a no-op — change the status in the admin instead') -} diff --git a/proto/src/migrations/20260929_cta_page_links.ts b/proto/src/migrations/20260929_cta_page_links.ts deleted file mode 100644 index 538d5cd..0000000 --- a/proto/src/migrations/20260929_cta_page_links.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * MITHOME-123: a Home hero CTA-k szabad szöveges belső linkjeit - * (pl. "/kapcsolat" — a MITHOME-114 óta 404) oldalválasztóra alakítja: - * `{ linkType: 'page', page: 'contact' }`, a `href` törlődik. Külső URL - * (pl. webmail) esetén `linkType: 'url'`, a `href` változatlan marad. - * - * WHY mindkét `href`-alakot kezeli (`"…"` és `{ hu: "…" }`): így független - * a MITHOME-111 lokalizációs migrációtól való sorrendtől — a prodMigrations - * utána futtatja, a Payload CLI viszont fájlnév szerint (ábécé) rendez. - * Idempotens: ha a `linkType` már be van állítva, a CTA-hoz nem nyúl. - */ -import type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/db-mongodb' - -import { internalPathToPageKey, resolveCtaHref, type CtaLink } from '../lib/cta-link' -import { rewriteGlobalDocs } from '../lib/migrate-global-docs' - -type Data = Record - -const CTA_NAMES = ['primary', 'secondary'] as const - -function isRecord(value: unknown): value is Data { - return typeof value === 'object' && value !== null && !Array.isArray(value) -} - -function ctaGroups(data: Data): Data[] { - const cta = isRecord(data.hero) && isRecord(data.hero.cta) ? data.hero.cta : undefined - return cta ? CTA_NAMES.map((name) => cta[name]).filter(isRecord) : [] -} - -/** The Hungarian (default-locale) value of a possibly localized href. */ -function storedPath(href: unknown): string | undefined { - if (typeof href === 'string') return href - return isRecord(href) && typeof href.hu === 'string' ? href.hu : undefined -} - -export function toPageLink(cta: Data): number { - if (cta.linkType) return 0 - const path = storedPath(cta.href) - const page = path === undefined ? undefined : internalPathToPageKey(path) - if (page) { - cta.linkType = 'page' - cta.page = page - delete cta.href - } else { - cta.linkType = 'url' - } - return 1 -} - -/** Inverse: restores a hu-locale href for page links, drops the new fields. */ -export function toFreeTextLink(cta: Data): number { - if (!cta.linkType) return 0 - if (cta.linkType === 'page') cta.href = { hu: resolveCtaHref(cta as CtaLink, 'hu') } - delete cta.linkType - delete cta.page - return 1 -} - -async function migrate(args: MigrateUpArgs | MigrateDownArgs, transform: (cta: Data) => number) { - const changed = await rewriteGlobalDocs(args, 'home', ['hero'], (data) => - ctaGroups(data).reduce((sum, cta) => sum + transform(cta), 0), - ) - args.payload.logger.info(`MITHOME-123 CTA link migration: home — ${changed} CTA(s) rewritten`) -} - -export async function up(args: MigrateUpArgs): Promise { - await migrate(args, toPageLink) -} - -export async function down(args: MigrateDownArgs): Promise { - await migrate(args, toFreeTextLink) -} diff --git a/proto/src/migrations/20260929_en_ai_draft.ts b/proto/src/migrations/20260929_en_ai_draft.ts deleted file mode 100644 index 69e2308..0000000 --- a/proto/src/migrations/20260929_en_ai_draft.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * MITHOME-113: AI-draft angol tartalom importja a fordítási memóriából - * (src/content/translations/en.json) minden Globalra és jogi oldalra. - * - * Csak üres angol értéket tölt ki, pontos magyar egyezés esetén (lásd - * src/lib/english-draft.ts); a kitöltött oldalak állapota `ai-draft` lesz, - * így a publikus /en oldal jóváhagyásig továbbra is magyar (readGated). - * - * WHY csak a legutóbbi verzió (+ a publikált dokumentum): az admin a - * legutóbbi verziót tölti be szerkesztéskor; a régebbi verziók történeti - * rekordok, azokat egy tartalmi import nem írja át. - * - * WHY előbb wrapLocalized: így független a lokalizációs migrációk - * sorrendjétől — a prodMigrations utánuk futtatja, a Payload CLI viszont - * fájlnév szerint (ábécé) rendez, és ott ez futna elsőként. - */ -import type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/db-mongodb' -import { randomBytes } from 'crypto' - -import { Home } from '../globals/Home' -import { About } from '../globals/About' -import { Services } from '../globals/Services' -import { Contact } from '../globals/Contact' -import { Common } from '../globals/Common' -import { LegalPages } from '../collections/LegalPages' -import translations from '../content/translations/en.json' -import { fillEnglishDraft } from '../lib/english-draft' -import { collectLocalizedPaths, topLevelKeys, wrapLocalized } from '../lib/localize-paths' -import { rewriteDocs, type DocTarget } from '../lib/migrate-global-docs' - -const MEMORY: Record = translations -const TARGETS: readonly { target: DocTarget; fields: unknown[] }[] = [ - ...[Home, About, Services, Contact, Common].map((g) => ({ - target: { kind: 'global', slug: g.slug } as const, - fields: g.fields, - })), - { target: { kind: 'collection', slug: LegalPages.slug }, fields: LegalPages.fields }, -] - -// Array row ids are stored as 24-hex strings (ObjectId-shaped), like Payload's own. -const newId = () => randomBytes(12).toString('hex') - -export async function up(args: MigrateUpArgs): Promise { - for (const { target, fields } of TARGETS) { - const paths = collectLocalizedPaths(fields as never) - const unmatched = new Set() - let filled = 0 - await rewriteDocs( - args, - target, - [...topLevelKeys(paths), 'enTranslationStatus'], - (data) => { - const wrapped = wrapLocalized(data, paths) - const report = fillEnglishDraft(data, paths, MEMORY, newId) - report.unmatched.forEach((text) => unmatched.add(text)) - filled += report.filled - return wrapped + report.filled - }, - { versions: 'latest' }, - ) - args.payload.logger.info( - `MITHOME-113 English AI draft: ${target.slug} — ${filled} value(s) filled, ${unmatched.size} Hungarian text(s) without translation`, - ) - for (const text of unmatched) { - args.payload.logger.warn(`MITHOME-113 no translation (${target.slug}): ${text.slice(0, 120)}`) - } - } -} - -/** - * DECISION: no automatic down — English values cannot be told apart from - * later human edits. Roll back by restoring the pre-deploy DB dump. - */ -export async function down(args: MigrateDownArgs): Promise { - args.payload.logger.warn('MITHOME-113 English AI draft: down is a no-op — restore the pre-deploy dump instead') -} diff --git a/proto/src/migrations/20260929_localize_globals.ts b/proto/src/migrations/20260929_localize_globals.ts deleted file mode 100644 index 89129d2..0000000 --- a/proto/src/migrations/20260929_localize_globals.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * MITHOME-111: a Global mezők utólagos `localized: true` jelölése után a - * meglévő (nem lokalizált alakú) értékeket `{ hu: érték }` alakba csomagolja. - * - * WHY nem a JSON-seed újrafuttatása (mint MITHOME-110-nél): az felülírná az - * ügyfél admin-szerkesztéseit. Ez a migráció a tárolt értéket őrzi meg — - * a publikált dokumentumon ÉS a draft/verzió rekordokon is. - * - * Az írás módja (közvetlen Mongo, hookok/új verzió nélkül): lásd - * src/lib/migrate-global-docs.ts. - * - * Futás: productionben induláskor automatikusan (`prodMigrations`, - * payload.config.ts); dev-ben `npx payload migrate`. Idempotens. - */ -import type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/db-mongodb' -import type { GlobalConfig } from 'payload' - -import { Home } from '../globals/Home' -import { About } from '../globals/About' -import { Services } from '../globals/Services' -import { Contact } from '../globals/Contact' -import { Common } from '../globals/Common' -import { - collectLocalizedPaths, - topLevelKeys, - unwrapLocalized, - wrapLocalized, - type LocalizedPath, -} from '../lib/localize-paths' -import { rewriteGlobalDocs } from '../lib/migrate-global-docs' - -const LOCALIZED_GLOBALS: readonly GlobalConfig[] = [Home, About, Services, Contact, Common] - -type Transform = (doc: Record, paths: readonly LocalizedPath[]) => number -type Args = MigrateUpArgs | MigrateDownArgs - -async function migrateAll(args: Args, transform: Transform) { - for (const global of LOCALIZED_GLOBALS) { - const paths = collectLocalizedPaths(global.fields as never) - const changed = await rewriteGlobalDocs(args, global.slug, topLevelKeys(paths), (data) => transform(data, paths)) - args.payload.logger.info(`MITHOME-111 locale migration: ${global.slug} — ${changed} value(s) rewritten`) - } -} - -export async function up(args: MigrateUpArgs): Promise { - await migrateAll(args, (doc, paths) => wrapLocalized(doc, paths)) -} - -/** TRADEOFF: drops every non-hu value — restore from a DB dump instead if possible. */ -export async function down(args: MigrateDownArgs): Promise { - await migrateAll(args, (doc, paths) => unwrapLocalized(doc, paths)) -} diff --git a/proto/src/migrations/20260929_localize_legal_pages.ts b/proto/src/migrations/20260929_localize_legal_pages.ts deleted file mode 100644 index 1f16fe9..0000000 --- a/proto/src/migrations/20260929_localize_legal_pages.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * MITHOME-112: a LegalPages mezők utólagos `localized: true` jelölése után a - * meglévő értékeket `{ hu: érték }` alakba csomagolja — minden jogi oldalon - * és a teljes verziótörténetben. Ugyanaz a minta, mint a Globaloknál - * (MITHOME-111, 20260929_localize_globals.ts); idempotens. - */ -import type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/db-mongodb' - -import { LegalPages } from '../collections/LegalPages' -import { collectLocalizedPaths, topLevelKeys, unwrapLocalized, wrapLocalized } from '../lib/localize-paths' -import { rewriteDocs } from '../lib/migrate-global-docs' - -const PATHS = collectLocalizedPaths(LegalPages.fields as never) -const TARGET = { kind: 'collection', slug: LegalPages.slug } as const - -async function migrate(args: MigrateUpArgs | MigrateDownArgs, direction: 'up' | 'down') { - const transform = direction === 'up' ? wrapLocalized : unwrapLocalized - const changed = await rewriteDocs(args, TARGET, topLevelKeys(PATHS), (data) => transform(data, PATHS)) - args.payload.logger.info(`MITHOME-112 locale migration: ${LegalPages.slug} — ${changed} value(s) rewritten`) -} - -export async function up(args: MigrateUpArgs): Promise { - await migrate(args, 'up') -} - -/** TRADEOFF: drops every non-hu value — restore from a DB dump instead if possible. */ -export async function down(args: MigrateDownArgs): Promise { - await migrate(args, 'down') -} diff --git a/proto/src/migrations/20260929_partner_references.ts b/proto/src/migrations/20260929_partner_references.ts deleted file mode 100644 index 1f8e202..0000000 --- a/proto/src/migrations/20260929_partner_references.ts +++ /dev/null @@ -1,101 +0,0 @@ -/** - * MITHOME-131: partner- és referenciaszabályok bevezetése a meglévő adaton. - * - * - A Partners bejegyzések kapcsolati kategóriát és közzétételi engedélyt - * kapnak. A tulajdonos 2026-09-29-i megerősítése szerint az Angele - * Pihenőház ÜGYFÉL (nem partner), és írásos engedély van a név- és - * logóhasználatra. Minden más, kategória nélküli bejegyzés "nincs - * engedély" állapotba kerül, tehát rejtve marad, amíg valaki be nem sorolja. - * - A Home global megkapja a korábban beégetett szekció-szövegeket - * (hu + en), csak ha még üresek. - * - * Csak a dokumentumot és a legutóbbi verziót írja. Idempotens. - */ -import type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/db-mongodb' - -import { rewriteDocs } from '../lib/migrate-global-docs' - -type Data = Record - -export const CONFIRMED_CLIENT_REFERENCES = [ - { - name: 'Angele Pihenőház', - permission: 'granted', - permissionReference: 'Írásos engedély megvan (tulajdonosi megerősítés, 2026-09-29)', - }, - { - // Contracted client (its site runs on our infrastructure) — a client - // reference, not a partner, per the research's categories. - // Kept "pending" until the logo (white text, unreadable on a light - // background) and the official name are settled (MITHOME-133). - name: 'Atlantisz Horgászüdülő és Halásztanya', - permission: 'pending', - permissionReference: 'Írásos engedély megvan; logó és hivatalos név egyeztetés alatt (MITHOME-133)', - }, -] as const - -type Copy = Record<'hu' | 'en', string> - -export const REFERENCES_SECTION_COPY: { - clientsTitle: Copy - clientsSubtitle: Copy - partnersTitle: Copy - partnersSubtitle: Copy - relationshipLabels: Record<'technologyPartner' | 'infrastructure' | 'supplier' | 'technologyUsed' | 'professionalPartner', Copy> -} = { - clientsTitle: { hu: 'Akik már minket választottak', en: 'Clients who chose us' }, - clientsSubtitle: { hu: 'Ügyfeleink, akik hozzájárultak a bemutatásukhoz', en: 'Clients who agreed to be featured' }, - partnersTitle: { hu: 'Partnereink és technológiai hátterünk', en: 'Our partners and technology' }, - partnersSubtitle: { hu: 'Szervezetek, amelyek közreműködnek a szolgáltatásainkban', en: 'Organisations that contribute to our services' }, - relationshipLabels: { - technologyPartner: { hu: 'Technológiai partner', en: 'Technology partner' }, - infrastructure: { hu: 'Technológiai háttér', en: 'Infrastructure provider' }, - supplier: { hu: 'Beszállító', en: 'Supplier' }, - technologyUsed: { hu: 'Általunk használt technológia', en: 'Technology we use' }, - professionalPartner: { hu: 'Szakmai partner', en: 'Professional partner' }, - }, -} - -/** The same copy as stored by Payload for localized fields: { hu, en }. */ -function localizedCopy(): Data { - const { relationshipLabels, ...titles } = REFERENCES_SECTION_COPY - return { ...titles, relationshipLabels: { ...relationshipLabels } } -} - -export function classifyPartner(doc: Data): number { - if (doc.relationship) return 0 - const confirmed = CONFIRMED_CLIENT_REFERENCES.find((c) => c.name === doc.name) - if (confirmed) { - doc.relationship = 'client-reference' - doc.publicationPermission = confirmed.permission - doc.permissionReference = confirmed.permissionReference - } else { - doc.publicationPermission = 'none' - } - return 1 -} - -export function seedReferencesSection(doc: Data): number { - if (doc.referencesSection) return 0 - doc.referencesSection = localizedCopy() - return 1 -} - -export async function up(args: MigrateUpArgs): Promise { - const partners = await rewriteDocs( - args, - { kind: 'collection', slug: 'partners' }, - ['relationship', 'publicationPermission', 'permissionReference'], - classifyPartner, - { versions: 'latest' }, - ) - const home = await rewriteDocs(args, { kind: 'global', slug: 'home' }, ['referencesSection'], seedReferencesSection, { - versions: 'latest', - }) - args.payload.logger.info(`MITHOME-131 references: ${partners} partner record(s) classified, ${home} home record(s) seeded`) -} - -/** DECISION: no automatic down — restore the pre-deploy dump instead. */ -export async function down(args: MigrateDownArgs): Promise { - args.payload.logger.warn('MITHOME-131 references: down is a no-op — restore the pre-deploy dump instead') -} diff --git a/proto/src/migrations/20260929_service_claims.ts b/proto/src/migrations/20260929_service_claims.ts deleted file mode 100644 index 9a80c29..0000000 --- a/proto/src/migrations/20260929_service_claims.ts +++ /dev/null @@ -1,122 +0,0 @@ -/** - * MITHOME-129: a weboldal szolgáltatási állításainak összehangolása a valós - * termékkörrel (docs/termekkor-es-szerverkapacitas-elemzes.md, 9. fejezet, - * C1–C14). A jogi szövegek (C15 ÁSZF, C16 Adatvédelem) NEM itt változnak — - * azok jogi átnézés után jönnek. - * - * Csak pontos magyar egyezésnél cserél; az angolt csak akkor, ha még a régi - * AI-draft (src/lib/content-revision.ts). Csak a publikált dokumentumot és a - * legutóbbi verziót írja, a történetet nem. Idempotens. - * - * DECISION: a mIT csomagneveket itt nem írjuk a szövegbe (C4, C7) — a nevek - * bevezetése előtt védjegyjogászi vizsgálat kell (PLATFM-3); a nevek a - * „Csomagok” oldallal (MITHOME-130) kerülnek ki. - */ -import type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/db-mongodb' -import { randomBytes } from 'crypto' - -import { Home } from '../globals/Home' -import { About } from '../globals/About' -import { Services } from '../globals/Services' -import { Contact } from '../globals/Contact' -import translations from '../content/translations/en.json' -import { reviseContent, type ListInsertion, type TextRevision } from '../lib/content-revision' -import { collectLocalizedPaths, topLevelKeys } from '../lib/localize-paths' -import { rewriteDocs } from '../lib/migrate-global-docs' - -const MEMORY: Record = translations - -/** [old hu, new hu, new en] — the old English is looked up in the memory. */ -const CHANGES: readonly [string, string, string][] = [ - // C1 - ['Éves szinten 99,9%-os rendelkezésre állási cél, tervezett karbantartások kivételével', - 'Éves szinten 99,5%-os rendelkezésre állási cél, az előre bejelentett karbantartások kivételével', - '99.5% annual availability target, excluding pre-announced maintenance'], - // C2 - ['24/7 monitoring biztosítja szolgáltatásaink közel 100%-os rendelkezésre állását.', - '0–24 órás automatizált felügyelet riasztással és gyors hibaelhárítással.', - 'Round-the-clock automated monitoring with alerting and fast troubleshooting.'], - // C3 - ['Weboldalak biztonságos és gyors üzemeltetése SSD tárolással, automatikus biztonsági mentéssel és 24/7 monitoringgal. Támogatjuk a PHP, Python, Node.js technológiákat és MySQL/PostgreSQL adatbázisokat.', - 'Weboldalak biztonságos és gyors üzemeltetése Enterprise SSD tárolással, hardveres RAID-1 tükrözéssel, napi külső mentéssel és 0–24 órás automatizált felügyelettel. PHP (több verzió) és MariaDB/MySQL adatbázis.', - 'Secure, fast website hosting on enterprise SSD storage with hardware RAID-1 mirroring, daily off-site backups and round-the-clock automated monitoring. PHP (multiple versions) and MariaDB/MySQL databases.'], - // C4 - ['SSD tárhely 1GB-tól 100GB-ig', 'Enterprise SSD tárhely: 3 GB vagy 8 GB, csomagtól függően', 'Enterprise SSD storage: 3 GB or 8 GB, depending on the plan'], - // C5 - ['Havi adatforgalom: korlátlan', 'Bőséges havi adatforgalom, méltányos használat mellett', 'Generous monthly traffic under fair use'], - // C6 - ['Automatikus napi biztonsági mentés', - 'Automatikus napi mentés független, külső mentési szerverre, 7 napos visszaállítással', - 'Automatic daily backup to an independent off-site server, with 7-day restore'], - // C7 - ['1GB–20GB tárhelyet fiókként', - 'Levéltárhely csomagszinten: 1 GB vagy 4 GB, szabadon elosztva a fiókok között', - 'Mail storage per plan: 1 GB or 4 GB, freely shared between mailboxes'], - // C8 - ['Backup és archiválás ', 'Napi mentés, 7 napos visszaállítással', 'Daily backup with 7-day restore'], - // C10 - ['Teljes DNS kezelés domain regisztrációval, átvitellel és professzionális beállításokkal. Gyors propagáció és megbízható névszerverek világszerte.', - 'Teljes DNS-kezelés domainregisztrációval, átvitellel és szakszerű beállításokkal. Redundáns elsődleges és másodlagos névszerver két független szerveren.', - 'Complete DNS management including domain registration, transfers and professional configuration. Redundant primary and secondary name servers on two independent servers.'], - // C11 - ['DNSSEC támogatás', 'DNSSEC egyedi egyeztetés alapján', 'DNSSEC on request'], - // C12 - ['API hozzáférés fejlesztőknek', 'Egyedi API-integráció egyeztetés alapján', 'Custom API integration on request'], - // C13 - ['Azonnali beavatkozás', '0–24 órás riasztás, a beavatkozás tipikusan 2–4 órán belül megkezdődik', '24/7 alerting; work typically starts within 2–4 hours'], - // C14a–d - ['24 órán belüli válasz', 'Munkanapokon 24 órán belüli válasz', 'Reply within 24 hours on business days'], - ['Munkaidőben elérhető', 'Hétköznap 8–17 óra között', 'Weekdays 8:00–17:00'], - ['24 órán belül válaszolunk', 'Munkanapokon 24 órán belül válaszolunk', 'We reply within 24 hours on business days'], - ['Email üzenetekre 24 órán belül, sürgős esetekben telefonon is elérhetők vagyunk.', - 'Munkanapokon 24 órán belül válaszolunk. Kritikus üzemzavar esetén 0–24 órás riasztási és beavatkozási rend működik.', - 'We reply within 24 hours on business days. For critical outages, a 24/7 alerting and response process is in place.'], -] - -export const SERVICE_CLAIM_REVISIONS: readonly TextRevision[] = CHANGES.map(([from, to, enTo]) => ({ - from, - to, - enWas: MEMORY[from], - enTo, -})) - -/** C9 — new e-mail feature, placed right after the (revised) C8 item. */ -export const SERVICE_CLAIM_INSERTIONS: readonly ListInsertion[] = [ - { - afterHu: 'Napi mentés, 7 napos visszaállítással', - hu: 'Automatikus figyelmeztetés 90%-os postafiók-telítettségnél', - afterEn: 'Daily backup with 7-day restore', - en: 'Automatic warning when a mailbox is 90% full', - }, -] - -const newId = () => randomBytes(12).toString('hex') - -export async function up(args: MigrateUpArgs): Promise { - for (const global of [Home, About, Services, Contact]) { - const paths = collectLocalizedPaths(global.fields as never) - const enKept = new Set() - let changed = 0 - await rewriteDocs( - args, - { kind: 'global', slug: global.slug }, - [...topLevelKeys(paths), 'enTranslationStatus'], - (data) => { - const report = reviseContent(data, paths, SERVICE_CLAIM_REVISIONS, SERVICE_CLAIM_INSERTIONS, newId) - report.enKept.forEach((text) => enKept.add(text)) - changed += report.changed - return report.changed - }, - { versions: 'latest' }, - ) - args.payload.logger.info(`MITHOME-129 service claims: ${global.slug} — ${changed} text(s) revised`) - for (const text of enKept) { - args.payload.logger.warn(`MITHOME-129 English kept (edited by a person), review manually (${global.slug}): ${text.slice(0, 100)}`) - } - } -} - -/** DECISION: no automatic down — restore the pre-deploy dump instead. */ -export async function down(args: MigrateDownArgs): Promise { - args.payload.logger.warn('MITHOME-129 service claims: down is a no-op — restore the pre-deploy dump instead') -} diff --git a/proto/src/migrations/index.ts b/proto/src/migrations/index.ts index cd08fc4..b6531be 100644 --- a/proto/src/migrations/index.ts +++ b/proto/src/migrations/index.ts @@ -1,62 +1,9 @@ -import * as migration_20260929_localize_globals from './20260929_localize_globals' -import * as migration_20260929_cta_page_links from './20260929_cta_page_links' -import * as migration_20260929_localize_legal_pages from './20260929_localize_legal_pages' -import * as migration_20260929_en_ai_draft from './20260929_en_ai_draft' -import * as migration_20260929_service_claims from './20260929_service_claims' -import * as migration_20260929_partner_references from './20260929_partner_references' -import * as migration_20260929_atlantisz_pending from './20260929_atlantisz_pending' -import * as migration_20260929_hosting_plans from './20260929_hosting_plans' +import * as migration_20260929_200306_initial from './20260929_200306_initial'; -/** - * Payload migrations, in order. Passed to `mongooseAdapter({ prodMigrations })` - * so they run automatically on production startup (MITHOME-111). - */ export const migrations = [ { - up: migration_20260929_localize_globals.up, - down: migration_20260929_localize_globals.down, - name: '20260929_localize_globals', + up: migration_20260929_200306_initial.up, + down: migration_20260929_200306_initial.down, + name: '20260929_200306_initial' }, - { - // MITHOME-123 — order-independent from the locale migration (handles both href shapes). - up: migration_20260929_cta_page_links.up, - down: migration_20260929_cta_page_links.down, - name: '20260929_cta_page_links', - }, - { - // MITHOME-112 — LegalPages counterpart of the globals locale migration. - up: migration_20260929_localize_legal_pages.up, - down: migration_20260929_localize_legal_pages.down, - name: '20260929_localize_legal_pages', - }, - { - // MITHOME-113 — needs both locale migrations above ({ hu } shapes). - up: migration_20260929_en_ai_draft.up, - down: migration_20260929_en_ai_draft.down, - name: '20260929_en_ai_draft', - }, - { - // MITHOME-129 — after the English import (revises the AI-draft English too). - up: migration_20260929_service_claims.up, - down: migration_20260929_service_claims.down, - name: '20260929_service_claims', - }, - { - // MITHOME-131 — partner categories/permissions + references section copy. - up: migration_20260929_partner_references.up, - down: migration_20260929_partner_references.down, - name: '20260929_partner_references', - }, - { - // MITHOME-133 — Atlantisz on hold until logo and official name are settled. - up: migration_20260929_atlantisz_pending.up, - down: migration_20260929_atlantisz_pending.down, - name: '20260929_atlantisz_pending', - }, - { - // MITHOME-130 — hosting plans (draft) + page copy, from the PLATFM-14 catalogue. - up: migration_20260929_hosting_plans.up, - down: migration_20260929_hosting_plans.down, - name: '20260929_hosting_plans', - }, -] +]; diff --git a/proto/src/payload.config.ts b/proto/src/payload.config.ts index 169684c..979af8a 100644 --- a/proto/src/payload.config.ts +++ b/proto/src/payload.config.ts @@ -1,9 +1,10 @@ /** * Payload CMS configuration (MITHOME-86 — alapinstalláció). * - * WHY a saját MongoDB kapcsolatot használjuk: a projekt már MongoDB-t futtat - * (proto/src/lib/mongodb.ts) — Payload a `mongooseAdapter`-en keresztül - * ugyanabba az adatbázisba ír, nincs szükség külön DB-re/szerverre. + * MITHOME-136: PostgreSQL (`postgresAdapter`) — a platform egy PostgreSQL- + * szervert használ, a weboldal saját adatbázissal (mitplatform ADR-0001). + * A MongoDB-korszak adatmigrációi a git-előzményben vannak; a tartalom + * egyszeri átvitele: scripts/transfer-content.ts. * * MITHOME-87: Home/About/Services/Contact/Common Globals hozzáadva — ezek * tükrözik a proto/src/content/pages/*.json + common.json struktúráját. @@ -21,82 +22,27 @@ * nyers, Payload-on kívüli Mongo collection-be (`contact_submissions`, * proto/src/lib/mongodb.ts) írt, amit az ügyfél nem látott sehol az admin * felületen. Mostantól Payload collection, a route.ts a Local API-n ír bele. - * MITHOME-111: a Globals fordítható mezői lokalizáltak; a meglévő adatot a - * src/migrations/20260929_localize_globals.ts alakítja át (prodMigrations). + * MITHOME-111: a Globals fordítható mezői lokalizáltak. * MITHOME-130: Products collection + HostingPlans global (tárhelycsomagok). */ -import path from 'path' -import { fileURLToPath } from 'url' import { buildConfig } from 'payload' -import { mongooseAdapter } from '@payloadcms/db-mongodb' -import { lexicalEditor } from '@payloadcms/richtext-lexical' -import sharp from 'sharp' +import { postgresAdapter } from '@payloadcms/db-postgres' -import { Users } from './collections/Users' -import { LegalPages } from './collections/LegalPages' -import { Media } from './collections/Media' -import { Partners } from './collections/Partners' -import { ContactSubmissions } from './collections/ContactSubmissions' -import { Products } from './collections/Products' -import { Home } from './globals/Home' -import { About } from './globals/About' -import { Services } from './globals/Services' -import { Contact } from './globals/Contact' -import { Common } from './globals/Common' -import { HostingPlans } from './globals/HostingPlans' +import { sharedConfig } from './payload.shared' import { migrations } from './migrations' -const filename = fileURLToPath(import.meta.url) -const dirname = path.dirname(filename) - export default buildConfig({ - // Admin felület — bejelentkezés az Users collection-nel. Access control / - // jelszó-politika: MITHOME-90 (src/collections/Users.ts). - admin: { - user: Users.slug, - components: { - // MITHOME-120: gyorskeresés minden admin oldal tetején. - // WHY 'src/...' és nem './components/...': a Payload komponens-útvonal - // az admin.importMap.baseDir-hez relatív, ami alapértelmezésben - // process.cwd() (a `generate:importmap` a proto/ mappából fut, NEM a - // payload.config.ts mappájából). - header: ['./src/components/admin/QuickSearch#QuickSearch'], - }, - }, - - editor: lexicalEditor(), - - collections: [Users, LegalPages, Media, Partners, ContactSubmissions, Products], - - globals: [Home, About, Services, Contact, Common, HostingPlans], - - // MITHOME-109/110: hu alapértelmezett (URL-prefix nélkül), en /en/ alatt - // (Next.js routing oldala: MITHOME-114). fallback:true -> amíg egy mezőnek - // nincs angol fordítása, a magyar érték jelenik meg — nem üres oldal. - localization: { - locales: ['hu', 'en'], - defaultLocale: 'hu', - fallback: true, - }, - - secret: process.env.PAYLOAD_SECRET || '', - - typescript: { - outputFile: path.resolve(dirname, 'payload-types.ts'), - }, - - db: mongooseAdapter({ - url: process.env.MONGODB_URI || '', - // MITHOME-111: pending migrations run automatically on production - // startup (NODE_ENV=production — staging + prod containers), so a deploy - // never serves the localized schema on un-migrated data. + ...sharedConfig, + db: postgresAdapter({ + pool: { connectionString: process.env.DATABASE_URI || '' }, + // WHY uuid: opaque ids that do not reveal record counts and never clash + // when content is transferred or joined with the catalogue (PLATFM-15). + idType: 'uuid', + // WHY no push: the schema changes only through migrations, the same way + // locally, on staging and in production. + push: false, + // Pending migrations run automatically on production-mode startup + // (staging + prod containers) before the site serves requests. prodMigrations: migrations, }), - - // WHY: Payload sends anonymous usage telemetry to its own servers by - // default — GDPR-tudatosan kikapcsolva, mivel a projekt self-hosted és - // az ügyfél adatai nem hagyhatják el a saját infrastruktúránkat. - telemetry: false, - - sharp, }) diff --git a/proto/src/payload.shared.ts b/proto/src/payload.shared.ts new file mode 100644 index 0000000..b8cef2b --- /dev/null +++ b/proto/src/payload.shared.ts @@ -0,0 +1,73 @@ +/** + * MITHOME-136: everything in the Payload config except the database adapter. + * + * WHY separate: the site runs on PostgreSQL (src/payload.config.ts), but the + * one-off content transfer (scripts/transfer-content.ts) must read the same + * collections and globals through the MongoDB adapter. Both configs are built + * from this object, so the content model cannot drift between them. + */ +import path from 'path' +import { fileURLToPath } from 'url' +import type { Config } from 'payload' +import { lexicalEditor } from '@payloadcms/richtext-lexical' +import sharp from 'sharp' + +import { Users } from './collections/Users' +import { LegalPages } from './collections/LegalPages' +import { Media } from './collections/Media' +import { Partners } from './collections/Partners' +import { ContactSubmissions } from './collections/ContactSubmissions' +import { Products } from './collections/Products' +import { Home } from './globals/Home' +import { About } from './globals/About' +import { Services } from './globals/Services' +import { Contact } from './globals/Contact' +import { Common } from './globals/Common' +import { HostingPlans } from './globals/HostingPlans' + +const filename = fileURLToPath(import.meta.url) +const dirname = path.dirname(filename) + +export const sharedConfig: Omit = { + // Admin felület — bejelentkezés az Users collection-nel. Access control / + // jelszó-politika: MITHOME-90 (src/collections/Users.ts). + admin: { + user: Users.slug, + components: { + // MITHOME-120: gyorskeresés minden admin oldal tetején. + // WHY 'src/...' és nem './components/...': a Payload komponens-útvonal + // az admin.importMap.baseDir-hez relatív, ami alapértelmezésben + // process.cwd() (a `generate:importmap` a proto/ mappából fut, NEM a + // payload.config.ts mappájából). + header: ['./src/components/admin/QuickSearch#QuickSearch'], + }, + }, + + editor: lexicalEditor(), + + collections: [Users, LegalPages, Media, Partners, ContactSubmissions, Products], + + globals: [Home, About, Services, Contact, Common, HostingPlans], + + // MITHOME-109/110: hu alapértelmezett (URL-prefix nélkül), en /en/ alatt + // (Next.js routing oldala: MITHOME-114). fallback:true -> amíg egy mezőnek + // nincs angol fordítása, a magyar érték jelenik meg — nem üres oldal. + localization: { + locales: ['hu', 'en'], + defaultLocale: 'hu', + fallback: true, + }, + + secret: process.env.PAYLOAD_SECRET || '', + + typescript: { + outputFile: path.resolve(dirname, 'payload-types.ts'), + }, + + // WHY: Payload sends anonymous usage telemetry to its own servers by + // default — GDPR-tudatosan kikapcsolva, mivel a projekt self-hosted és + // az ügyfél adatai nem hagyhatják el a saját infrastruktúránkat. + telemetry: false, + + sharp, +}