Skip to content

chore(db): redeploy Supabase bootstrap#139

Merged
support371 merged 1 commit into
mainfrom
chore/redeploy-supabase-bootstrap
Jul 6, 2026
Merged

chore(db): redeploy Supabase bootstrap#139
support371 merged 1 commit into
mainfrom
chore/redeploy-supabase-bootstrap

Conversation

@support371

@support371 support371 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Force the current database bootstrap, environment compatibility, and Supabase activation documentation through a normal PR merge so Vercel deploys the latest main branch.

Summary by Sourcery

Document Supabase as the canonical database provider and add a controlled first-time schema bootstrap runbook for Tokmetric activation.

Documentation:

  • Update activation runbook to specify Supabase PostgreSQL as the canonical database provider and supported environment variables.
  • Add guidance for configuring pooled and non-pooled Supabase connections and for performing a controlled initial schema bootstrap via environment flags.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sourcery-ai

sourcery-ai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Reviewer's Guide

Updates the Tokmetric activation runbook to document Supabase as the canonical database provider and to define a controlled first-time schema bootstrap process using environment variables for the Next.js/Prisma app and Vercel builds.

Flow diagram for controlled first-time Supabase schema bootstrap

flowchart LR
    A[New or empty Supabase PostgreSQL project] --> B[Configure pooled and direct URLs
POSTGRES_PRISMA_URL
POSTGRES_URL_NON_POOLING]
    B --> C[Set bootstrap env vars
AUTO_DB_PUSH=true
AUTO_DB_SEED=true
ADMIN_EMAIL
ADMIN_INITIAL_PASSWORD
SEED_DEMO_DATA=false]
    C --> D[Vercel build script runs
- generate Prisma
- synchronize schema
- create admin record
- seed initial products
- build Next.js]
    D --> E[After successful bootstrap
AUTO_DB_PUSH=false
AUTO_DB_SEED=false]
    E --> F[Redeploy once more with bootstrap disabled]
    F --> G[Production runtime uses pooled URL for serverless traffic]
    F --> H[Admin workflows use direct URL for schema administration]
Loading

File-Level Changes

Change Details Files
Document Supabase as the canonical PostgreSQL provider and define a controlled environment-driven first-time schema bootstrap procedure for the Tokmetric app.
  • Replaces the generic required database variables section with a canonical database provider section that specifies Supabase PostgreSQL as the standard and warns against unapproved provider changes during recovery.
  • Lists all supported Prisma/Next.js database-related environment variable names commonly injected by Vercel and clarifies their role in the application.
  • Defines the recommended Supabase pooled and non-pooled connection string configuration via POSTGRES_PRISMA_URL and POSTGRES_URL_NON_POOLING, emphasizing project consistency and secrecy of values.
  • Adds a controlled first-time schema bootstrap flow using AUTO_DB_PUSH, AUTO_DB_SEED, admin credentials, and SEED_DEMO_DATA, describing how the Vercel build orchestrates Prisma generation, schema sync, admin creation, seeding, and Next.js build.
  • Describes the post-bootstrap steps to disable AUTO_DB_* flags, redeploy, and back up existing production databases before any schema synchronization.
docs/tokmetric/activation-runbook.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gem-enterprise Error Error Open in v0 Jul 6, 2026 2:59am

@support371
support371 merged commit cc21a6d into main Jul 6, 2026
6 of 21 checks passed
@support371
support371 deleted the chore/redeploy-supabase-bootstrap branch July 6, 2026 02:59

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant