Template
Deploy from CI with Infisical and ship Payload changes as migrations
CI reads Infisical staging as the read-only convexmonorepo-ci machine identity, deploys the Convex functions, builds and pushes the image, and asks the VPS to redeploy. Payload schema changes now ship as migrations that production runs on startup; the baseline matches the production schema and is recorded as applied there. The local stack moves to its own ports and syncs the Convex runtime env, and the scripts pick up Infisical account switching, dev-kill and a cache-safe CI install.
This commit is contained in:
1 parent
f39376a887
commit
7d1884be41
23 files changed
+6235
-55
No files matched your search
@@ -6,7 +6,7 @@ import { reactConfig } from '@gib/eslint-config/react';
|
||||
|
||||
export default defineConfig(
|
||||
{
|
||||
ignores: ['.next/**', 'payload-types.ts'],
|
||||
ignores: ['.next/**', 'payload-types.ts', 'src/migrations/**'],
|
||||
},
|
||||
baseConfig,
|
||||
reactConfig,
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,710 @@
|
||||
import { MigrateDownArgs, MigrateUpArgs, sql } from '@payloadcms/db-postgres';
|
||||
|
||||
export const up = async ({
|
||||
db,
|
||||
payload,
|
||||
req,
|
||||
}: MigrateUpArgs): Promise<void> => {
|
||||
await db.execute(sql`
|
||||
CREATE TYPE "public"."enum_landing_page_status" AS ENUM('draft', 'published');
|
||||
CREATE TYPE "public"."enum__landing_page_v_version_status" AS ENUM('draft', 'published');
|
||||
CREATE TABLE "users_sessions" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer 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" serial PRIMARY KEY NOT NULL,
|
||||
"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,
|
||||
"reset_password_requested_at" timestamp(3) with time zone,
|
||||
"login_attempts" numeric DEFAULT 0,
|
||||
"lock_until" timestamp(3) with time zone
|
||||
);
|
||||
|
||||
CREATE TABLE "payload_kv" (
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"key" varchar NOT NULL,
|
||||
"data" jsonb NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE "payload_locked_documents" (
|
||||
"id" serial PRIMARY KEY 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" integer NOT NULL,
|
||||
"path" varchar NOT NULL,
|
||||
"users_id" integer
|
||||
);
|
||||
|
||||
CREATE TABLE "payload_preferences" (
|
||||
"id" serial PRIMARY KEY 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" integer NOT NULL,
|
||||
"path" varchar NOT NULL,
|
||||
"users_id" integer
|
||||
);
|
||||
|
||||
CREATE TABLE "payload_migrations" (
|
||||
"id" serial PRIMARY KEY 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 "landing_page_blocks_hero_highlights" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" varchar NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"label" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_hero" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"badge_emoji" varchar DEFAULT '🚀',
|
||||
"badge_text" varchar DEFAULT 'Production-ready monorepo template',
|
||||
"heading_prefix" varchar DEFAULT 'Build Full-Stack Apps with',
|
||||
"heading_highlight" varchar DEFAULT 'convex-monorepo',
|
||||
"description" varchar DEFAULT 'A Turborepo starter with Next.js, Expo, and self-hosted Convex. Ship web and mobile apps faster with shared code, type-safe backend, and complete control over your infrastructure.',
|
||||
"primary_cta_label" varchar DEFAULT 'View Source Code',
|
||||
"primary_cta_url" varchar DEFAULT 'https://git.gbrown.org/gib/convex-monorepo',
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_logo_cloud_items" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" varchar NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"name" varchar,
|
||||
"accent" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_logo_cloud" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'Designed For Modern Product Teams',
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_features_items" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" varchar NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"icon" varchar,
|
||||
"title" varchar,
|
||||
"description" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_features" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'Everything You Need to Ship Fast',
|
||||
"description" varchar DEFAULT 'A complete monorepo template with all the tools and patterns you need for production-ready applications.',
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_stats_items" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" varchar NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"value" varchar,
|
||||
"label" varchar,
|
||||
"description" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_stats" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'Built To Demo Well',
|
||||
"description" varchar DEFAULT 'These are the kinds of outcomes you can point to when showing the template to clients.',
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_tech_stack_categories_technologies" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" varchar NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"name" varchar,
|
||||
"description" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_tech_stack_categories" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" varchar NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"category" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_tech_stack" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'Modern Tech Stack',
|
||||
"description" varchar DEFAULT 'Built with the latest and greatest tools for maximum productivity and performance.',
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_testimonials_items" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" varchar NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"quote" varchar,
|
||||
"name" varchar,
|
||||
"role" varchar,
|
||||
"company" varchar,
|
||||
"avatar_emoji" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_testimonials" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'What Clients Actually Care About',
|
||||
"description" varchar DEFAULT 'The polished part is not just the frontend. Editors can shape the story, launch updates fast, and preview changes before they go live.',
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_pricing_plans_features" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" varchar NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"label" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_pricing_plans" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" varchar NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"name" varchar,
|
||||
"price" varchar,
|
||||
"billing_period" varchar,
|
||||
"description" varchar,
|
||||
"badge" varchar,
|
||||
"is_highlighted" boolean,
|
||||
"cta_label" varchar,
|
||||
"cta_url" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_pricing" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'A Great Way To Pitch Productized Delivery',
|
||||
"description" varchar DEFAULT 'Use pricing blocks to show packaged service tiers, subscriptions, or implementation options right inside the landing page builder.',
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_faq_items" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" varchar NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"question" varchar,
|
||||
"answer" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_faq" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'Questions You Will Probably Get In A Demo',
|
||||
"description" varchar DEFAULT 'A good FAQ block makes the editor feel complete and gives clients another obvious content type they can manage themselves.',
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page_blocks_cta" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" varchar PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'Ready to Build Something Amazing?',
|
||||
"description" varchar DEFAULT 'Clone the repository and start building your next project with everything pre-configured.',
|
||||
"command_label" varchar DEFAULT 'Quick Start',
|
||||
"command" varchar DEFAULT 'git clone https://git.gbrown.org/gib/convex-monorepo.git
|
||||
cd convex-monorepo
|
||||
bun i',
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "landing_page" (
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"_status" "enum_landing_page_status" DEFAULT 'draft',
|
||||
"updated_at" timestamp(3) with time zone,
|
||||
"created_at" timestamp(3) with time zone
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_hero_highlights" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"label" varchar,
|
||||
"_uuid" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_hero" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"badge_emoji" varchar DEFAULT '🚀',
|
||||
"badge_text" varchar DEFAULT 'Production-ready monorepo template',
|
||||
"heading_prefix" varchar DEFAULT 'Build Full-Stack Apps with',
|
||||
"heading_highlight" varchar DEFAULT 'convex-monorepo',
|
||||
"description" varchar DEFAULT 'A Turborepo starter with Next.js, Expo, and self-hosted Convex. Ship web and mobile apps faster with shared code, type-safe backend, and complete control over your infrastructure.',
|
||||
"primary_cta_label" varchar DEFAULT 'View Source Code',
|
||||
"primary_cta_url" varchar DEFAULT 'https://git.gbrown.org/gib/convex-monorepo',
|
||||
"_uuid" varchar,
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_logo_cloud_items" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"name" varchar,
|
||||
"accent" varchar,
|
||||
"_uuid" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_logo_cloud" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'Designed For Modern Product Teams',
|
||||
"_uuid" varchar,
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_features_items" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"icon" varchar,
|
||||
"title" varchar,
|
||||
"description" varchar,
|
||||
"_uuid" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_features" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'Everything You Need to Ship Fast',
|
||||
"description" varchar DEFAULT 'A complete monorepo template with all the tools and patterns you need for production-ready applications.',
|
||||
"_uuid" varchar,
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_stats_items" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"value" varchar,
|
||||
"label" varchar,
|
||||
"description" varchar,
|
||||
"_uuid" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_stats" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'Built To Demo Well',
|
||||
"description" varchar DEFAULT 'These are the kinds of outcomes you can point to when showing the template to clients.',
|
||||
"_uuid" varchar,
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_tech_stack_categories_technologies" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"name" varchar,
|
||||
"description" varchar,
|
||||
"_uuid" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_tech_stack_categories" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"category" varchar,
|
||||
"_uuid" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_tech_stack" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'Modern Tech Stack',
|
||||
"description" varchar DEFAULT 'Built with the latest and greatest tools for maximum productivity and performance.',
|
||||
"_uuid" varchar,
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_testimonials_items" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"quote" varchar,
|
||||
"name" varchar,
|
||||
"role" varchar,
|
||||
"company" varchar,
|
||||
"avatar_emoji" varchar,
|
||||
"_uuid" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_testimonials" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'What Clients Actually Care About',
|
||||
"description" varchar DEFAULT 'The polished part is not just the frontend. Editors can shape the story, launch updates fast, and preview changes before they go live.',
|
||||
"_uuid" varchar,
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_pricing_plans_features" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"label" varchar,
|
||||
"_uuid" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_pricing_plans" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"name" varchar,
|
||||
"price" varchar,
|
||||
"billing_period" varchar,
|
||||
"description" varchar,
|
||||
"badge" varchar,
|
||||
"is_highlighted" boolean,
|
||||
"cta_label" varchar,
|
||||
"cta_url" varchar,
|
||||
"_uuid" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_pricing" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'A Great Way To Pitch Productized Delivery',
|
||||
"description" varchar DEFAULT 'Use pricing blocks to show packaged service tiers, subscriptions, or implementation options right inside the landing page builder.',
|
||||
"_uuid" varchar,
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_faq_items" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"question" varchar,
|
||||
"answer" varchar,
|
||||
"_uuid" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_faq" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'Questions You Will Probably Get In A Demo',
|
||||
"description" varchar DEFAULT 'A good FAQ block makes the editor feel complete and gives clients another obvious content type they can manage themselves.',
|
||||
"_uuid" varchar,
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v_blocks_cta" (
|
||||
"_order" integer NOT NULL,
|
||||
"_parent_id" integer NOT NULL,
|
||||
"_path" text NOT NULL,
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"heading" varchar DEFAULT 'Ready to Build Something Amazing?',
|
||||
"description" varchar DEFAULT 'Clone the repository and start building your next project with everything pre-configured.',
|
||||
"command_label" varchar DEFAULT 'Quick Start',
|
||||
"command" varchar DEFAULT 'git clone https://git.gbrown.org/gib/convex-monorepo.git
|
||||
cd convex-monorepo
|
||||
bun i',
|
||||
"_uuid" varchar,
|
||||
"block_name" varchar
|
||||
);
|
||||
|
||||
CREATE TABLE "_landing_page_v" (
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"version__status" "enum__landing_page_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,
|
||||
"latest" boolean,
|
||||
"autosave" boolean
|
||||
);
|
||||
|
||||
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 "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_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 "landing_page_blocks_hero_highlights" ADD CONSTRAINT "landing_page_blocks_hero_highlights_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page_blocks_hero"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_hero" ADD CONSTRAINT "landing_page_blocks_hero_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_logo_cloud_items" ADD CONSTRAINT "landing_page_blocks_logo_cloud_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page_blocks_logo_cloud"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_logo_cloud" ADD CONSTRAINT "landing_page_blocks_logo_cloud_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_features_items" ADD CONSTRAINT "landing_page_blocks_features_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page_blocks_features"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_features" ADD CONSTRAINT "landing_page_blocks_features_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_stats_items" ADD CONSTRAINT "landing_page_blocks_stats_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page_blocks_stats"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_stats" ADD CONSTRAINT "landing_page_blocks_stats_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_tech_stack_categories_technologies" ADD CONSTRAINT "landing_page_blocks_tech_stack_categories_technologies_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page_blocks_tech_stack_categories"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_tech_stack_categories" ADD CONSTRAINT "landing_page_blocks_tech_stack_categories_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page_blocks_tech_stack"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_tech_stack" ADD CONSTRAINT "landing_page_blocks_tech_stack_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_testimonials_items" ADD CONSTRAINT "landing_page_blocks_testimonials_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page_blocks_testimonials"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_testimonials" ADD CONSTRAINT "landing_page_blocks_testimonials_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_pricing_plans_features" ADD CONSTRAINT "landing_page_blocks_pricing_plans_features_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page_blocks_pricing_plans"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_pricing_plans" ADD CONSTRAINT "landing_page_blocks_pricing_plans_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page_blocks_pricing"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_pricing" ADD CONSTRAINT "landing_page_blocks_pricing_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_faq_items" ADD CONSTRAINT "landing_page_blocks_faq_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page_blocks_faq"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_faq" ADD CONSTRAINT "landing_page_blocks_faq_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "landing_page_blocks_cta" ADD CONSTRAINT "landing_page_blocks_cta_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."landing_page"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_hero_highlights" ADD CONSTRAINT "_landing_page_v_blocks_hero_highlights_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v_blocks_hero"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_hero" ADD CONSTRAINT "_landing_page_v_blocks_hero_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_logo_cloud_items" ADD CONSTRAINT "_landing_page_v_blocks_logo_cloud_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v_blocks_logo_cloud"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_logo_cloud" ADD CONSTRAINT "_landing_page_v_blocks_logo_cloud_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_features_items" ADD CONSTRAINT "_landing_page_v_blocks_features_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v_blocks_features"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_features" ADD CONSTRAINT "_landing_page_v_blocks_features_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_stats_items" ADD CONSTRAINT "_landing_page_v_blocks_stats_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v_blocks_stats"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_stats" ADD CONSTRAINT "_landing_page_v_blocks_stats_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_tech_stack_categories_technologies" ADD CONSTRAINT "_landing_page_v_blocks_tech_stack_categories_technologies_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v_blocks_tech_stack_categories"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_tech_stack_categories" ADD CONSTRAINT "_landing_page_v_blocks_tech_stack_categories_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v_blocks_tech_stack"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_tech_stack" ADD CONSTRAINT "_landing_page_v_blocks_tech_stack_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_testimonials_items" ADD CONSTRAINT "_landing_page_v_blocks_testimonials_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v_blocks_testimonials"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_testimonials" ADD CONSTRAINT "_landing_page_v_blocks_testimonials_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_pricing_plans_features" ADD CONSTRAINT "_landing_page_v_blocks_pricing_plans_features_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v_blocks_pricing_plans"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_pricing_plans" ADD CONSTRAINT "_landing_page_v_blocks_pricing_plans_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v_blocks_pricing"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_pricing" ADD CONSTRAINT "_landing_page_v_blocks_pricing_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_faq_items" ADD CONSTRAINT "_landing_page_v_blocks_faq_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v_blocks_faq"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_faq" ADD CONSTRAINT "_landing_page_v_blocks_faq_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_v"("id") ON DELETE cascade ON UPDATE no action;
|
||||
ALTER TABLE "_landing_page_v_blocks_cta" ADD CONSTRAINT "_landing_page_v_blocks_cta_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_landing_page_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 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_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 "landing_page_blocks_hero_highlights_order_idx" ON "landing_page_blocks_hero_highlights" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_hero_highlights_parent_id_idx" ON "landing_page_blocks_hero_highlights" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_hero_order_idx" ON "landing_page_blocks_hero" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_hero_parent_id_idx" ON "landing_page_blocks_hero" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_hero_path_idx" ON "landing_page_blocks_hero" USING btree ("_path");
|
||||
CREATE INDEX "landing_page_blocks_logo_cloud_items_order_idx" ON "landing_page_blocks_logo_cloud_items" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_logo_cloud_items_parent_id_idx" ON "landing_page_blocks_logo_cloud_items" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_logo_cloud_order_idx" ON "landing_page_blocks_logo_cloud" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_logo_cloud_parent_id_idx" ON "landing_page_blocks_logo_cloud" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_logo_cloud_path_idx" ON "landing_page_blocks_logo_cloud" USING btree ("_path");
|
||||
CREATE INDEX "landing_page_blocks_features_items_order_idx" ON "landing_page_blocks_features_items" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_features_items_parent_id_idx" ON "landing_page_blocks_features_items" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_features_order_idx" ON "landing_page_blocks_features" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_features_parent_id_idx" ON "landing_page_blocks_features" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_features_path_idx" ON "landing_page_blocks_features" USING btree ("_path");
|
||||
CREATE INDEX "landing_page_blocks_stats_items_order_idx" ON "landing_page_blocks_stats_items" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_stats_items_parent_id_idx" ON "landing_page_blocks_stats_items" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_stats_order_idx" ON "landing_page_blocks_stats" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_stats_parent_id_idx" ON "landing_page_blocks_stats" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_stats_path_idx" ON "landing_page_blocks_stats" USING btree ("_path");
|
||||
CREATE INDEX "landing_page_blocks_tech_stack_categories_technologies_order_idx" ON "landing_page_blocks_tech_stack_categories_technologies" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_tech_stack_categories_technologies_parent_id_idx" ON "landing_page_blocks_tech_stack_categories_technologies" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_tech_stack_categories_order_idx" ON "landing_page_blocks_tech_stack_categories" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_tech_stack_categories_parent_id_idx" ON "landing_page_blocks_tech_stack_categories" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_tech_stack_order_idx" ON "landing_page_blocks_tech_stack" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_tech_stack_parent_id_idx" ON "landing_page_blocks_tech_stack" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_tech_stack_path_idx" ON "landing_page_blocks_tech_stack" USING btree ("_path");
|
||||
CREATE INDEX "landing_page_blocks_testimonials_items_order_idx" ON "landing_page_blocks_testimonials_items" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_testimonials_items_parent_id_idx" ON "landing_page_blocks_testimonials_items" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_testimonials_order_idx" ON "landing_page_blocks_testimonials" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_testimonials_parent_id_idx" ON "landing_page_blocks_testimonials" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_testimonials_path_idx" ON "landing_page_blocks_testimonials" USING btree ("_path");
|
||||
CREATE INDEX "landing_page_blocks_pricing_plans_features_order_idx" ON "landing_page_blocks_pricing_plans_features" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_pricing_plans_features_parent_id_idx" ON "landing_page_blocks_pricing_plans_features" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_pricing_plans_order_idx" ON "landing_page_blocks_pricing_plans" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_pricing_plans_parent_id_idx" ON "landing_page_blocks_pricing_plans" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_pricing_order_idx" ON "landing_page_blocks_pricing" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_pricing_parent_id_idx" ON "landing_page_blocks_pricing" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_pricing_path_idx" ON "landing_page_blocks_pricing" USING btree ("_path");
|
||||
CREATE INDEX "landing_page_blocks_faq_items_order_idx" ON "landing_page_blocks_faq_items" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_faq_items_parent_id_idx" ON "landing_page_blocks_faq_items" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_faq_order_idx" ON "landing_page_blocks_faq" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_faq_parent_id_idx" ON "landing_page_blocks_faq" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_faq_path_idx" ON "landing_page_blocks_faq" USING btree ("_path");
|
||||
CREATE INDEX "landing_page_blocks_cta_order_idx" ON "landing_page_blocks_cta" USING btree ("_order");
|
||||
CREATE INDEX "landing_page_blocks_cta_parent_id_idx" ON "landing_page_blocks_cta" USING btree ("_parent_id");
|
||||
CREATE INDEX "landing_page_blocks_cta_path_idx" ON "landing_page_blocks_cta" USING btree ("_path");
|
||||
CREATE INDEX "landing_page__status_idx" ON "landing_page" USING btree ("_status");
|
||||
CREATE INDEX "_landing_page_v_blocks_hero_highlights_order_idx" ON "_landing_page_v_blocks_hero_highlights" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_hero_highlights_parent_id_idx" ON "_landing_page_v_blocks_hero_highlights" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_hero_order_idx" ON "_landing_page_v_blocks_hero" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_hero_parent_id_idx" ON "_landing_page_v_blocks_hero" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_hero_path_idx" ON "_landing_page_v_blocks_hero" USING btree ("_path");
|
||||
CREATE INDEX "_landing_page_v_blocks_logo_cloud_items_order_idx" ON "_landing_page_v_blocks_logo_cloud_items" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_logo_cloud_items_parent_id_idx" ON "_landing_page_v_blocks_logo_cloud_items" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_logo_cloud_order_idx" ON "_landing_page_v_blocks_logo_cloud" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_logo_cloud_parent_id_idx" ON "_landing_page_v_blocks_logo_cloud" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_logo_cloud_path_idx" ON "_landing_page_v_blocks_logo_cloud" USING btree ("_path");
|
||||
CREATE INDEX "_landing_page_v_blocks_features_items_order_idx" ON "_landing_page_v_blocks_features_items" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_features_items_parent_id_idx" ON "_landing_page_v_blocks_features_items" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_features_order_idx" ON "_landing_page_v_blocks_features" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_features_parent_id_idx" ON "_landing_page_v_blocks_features" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_features_path_idx" ON "_landing_page_v_blocks_features" USING btree ("_path");
|
||||
CREATE INDEX "_landing_page_v_blocks_stats_items_order_idx" ON "_landing_page_v_blocks_stats_items" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_stats_items_parent_id_idx" ON "_landing_page_v_blocks_stats_items" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_stats_order_idx" ON "_landing_page_v_blocks_stats" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_stats_parent_id_idx" ON "_landing_page_v_blocks_stats" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_stats_path_idx" ON "_landing_page_v_blocks_stats" USING btree ("_path");
|
||||
CREATE INDEX "_landing_page_v_blocks_tech_stack_categories_technologies_order_idx" ON "_landing_page_v_blocks_tech_stack_categories_technologies" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_tech_stack_categories_technologies_parent_id_idx" ON "_landing_page_v_blocks_tech_stack_categories_technologies" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_tech_stack_categories_order_idx" ON "_landing_page_v_blocks_tech_stack_categories" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_tech_stack_categories_parent_id_idx" ON "_landing_page_v_blocks_tech_stack_categories" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_tech_stack_order_idx" ON "_landing_page_v_blocks_tech_stack" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_tech_stack_parent_id_idx" ON "_landing_page_v_blocks_tech_stack" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_tech_stack_path_idx" ON "_landing_page_v_blocks_tech_stack" USING btree ("_path");
|
||||
CREATE INDEX "_landing_page_v_blocks_testimonials_items_order_idx" ON "_landing_page_v_blocks_testimonials_items" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_testimonials_items_parent_id_idx" ON "_landing_page_v_blocks_testimonials_items" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_testimonials_order_idx" ON "_landing_page_v_blocks_testimonials" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_testimonials_parent_id_idx" ON "_landing_page_v_blocks_testimonials" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_testimonials_path_idx" ON "_landing_page_v_blocks_testimonials" USING btree ("_path");
|
||||
CREATE INDEX "_landing_page_v_blocks_pricing_plans_features_order_idx" ON "_landing_page_v_blocks_pricing_plans_features" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_pricing_plans_features_parent_id_idx" ON "_landing_page_v_blocks_pricing_plans_features" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_pricing_plans_order_idx" ON "_landing_page_v_blocks_pricing_plans" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_pricing_plans_parent_id_idx" ON "_landing_page_v_blocks_pricing_plans" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_pricing_order_idx" ON "_landing_page_v_blocks_pricing" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_pricing_parent_id_idx" ON "_landing_page_v_blocks_pricing" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_pricing_path_idx" ON "_landing_page_v_blocks_pricing" USING btree ("_path");
|
||||
CREATE INDEX "_landing_page_v_blocks_faq_items_order_idx" ON "_landing_page_v_blocks_faq_items" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_faq_items_parent_id_idx" ON "_landing_page_v_blocks_faq_items" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_faq_order_idx" ON "_landing_page_v_blocks_faq" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_faq_parent_id_idx" ON "_landing_page_v_blocks_faq" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_faq_path_idx" ON "_landing_page_v_blocks_faq" USING btree ("_path");
|
||||
CREATE INDEX "_landing_page_v_blocks_cta_order_idx" ON "_landing_page_v_blocks_cta" USING btree ("_order");
|
||||
CREATE INDEX "_landing_page_v_blocks_cta_parent_id_idx" ON "_landing_page_v_blocks_cta" USING btree ("_parent_id");
|
||||
CREATE INDEX "_landing_page_v_blocks_cta_path_idx" ON "_landing_page_v_blocks_cta" USING btree ("_path");
|
||||
CREATE INDEX "_landing_page_v_version_version__status_idx" ON "_landing_page_v" USING btree ("version__status");
|
||||
CREATE INDEX "_landing_page_v_created_at_idx" ON "_landing_page_v" USING btree ("created_at");
|
||||
CREATE INDEX "_landing_page_v_updated_at_idx" ON "_landing_page_v" USING btree ("updated_at");
|
||||
CREATE INDEX "_landing_page_v_latest_idx" ON "_landing_page_v" USING btree ("latest");
|
||||
CREATE INDEX "_landing_page_v_autosave_idx" ON "_landing_page_v" USING btree ("autosave");`);
|
||||
};
|
||||
|
||||
export const down = async ({
|
||||
db,
|
||||
payload,
|
||||
req,
|
||||
}: MigrateDownArgs): Promise<void> => {
|
||||
await db.execute(sql`
|
||||
DROP TABLE "users_sessions" CASCADE;
|
||||
DROP TABLE "users" 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 "landing_page_blocks_hero_highlights" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_hero" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_logo_cloud_items" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_logo_cloud" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_features_items" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_features" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_stats_items" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_stats" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_tech_stack_categories_technologies" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_tech_stack_categories" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_tech_stack" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_testimonials_items" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_testimonials" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_pricing_plans_features" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_pricing_plans" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_pricing" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_faq_items" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_faq" CASCADE;
|
||||
DROP TABLE "landing_page_blocks_cta" CASCADE;
|
||||
DROP TABLE "landing_page" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_hero_highlights" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_hero" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_logo_cloud_items" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_logo_cloud" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_features_items" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_features" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_stats_items" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_stats" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_tech_stack_categories_technologies" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_tech_stack_categories" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_tech_stack" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_testimonials_items" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_testimonials" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_pricing_plans_features" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_pricing_plans" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_pricing" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_faq_items" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_faq" CASCADE;
|
||||
DROP TABLE "_landing_page_v_blocks_cta" CASCADE;
|
||||
DROP TABLE "_landing_page_v" CASCADE;
|
||||
DROP TYPE "public"."enum_landing_page_status";
|
||||
DROP TYPE "public"."enum__landing_page_v_version_status";`);
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
import * as migration_20261001_183341_baseline from './20261001_183341_baseline';
|
||||
|
||||
export const migrations = [
|
||||
{
|
||||
up: migration_20261001_183341_baseline.up,
|
||||
down: migration_20261001_183341_baseline.down,
|
||||
name: '20261001_183341_baseline',
|
||||
},
|
||||
];
|
||||
@@ -4,6 +4,7 @@ import { buildConfig } from 'payload';
|
||||
import sharp from 'sharp';
|
||||
|
||||
import { env } from './env';
|
||||
import { migrations } from './migrations';
|
||||
import { Users } from './payload/collections/users';
|
||||
import { LandingPage } from './payload/globals/landing-page';
|
||||
|
||||
@@ -17,6 +18,15 @@ export default buildConfig({
|
||||
pool: {
|
||||
connectionString: env.PAYLOAD_DB_URL,
|
||||
},
|
||||
// Schema changes ship as migrations (`bunx payload migrate:create <name>`
|
||||
// from apps/next, through `bun with-env`). Production runs pending ones on
|
||||
// startup. Dev push only ever touches a local database: a push against the
|
||||
// production database would mark it as push-managed, and the next startup
|
||||
// migration would stop on Payload's confirmation prompt.
|
||||
push: ['localhost', '127.0.0.1'].includes(
|
||||
new URL(env.PAYLOAD_DB_URL).hostname,
|
||||
),
|
||||
prodMigrations: migrations,
|
||||
}),
|
||||
sharp,
|
||||
});
|
||||
Reference in new issue
Block a user