supabase-reset-test-gen-types

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Supabase Reset/Test/Gen Types

Supabase 重置/测试/生成类型

Workflow

工作流程

  1. Confirm the working directory is the intended project root:
    • It contains
      supabase/
      configuration.
    • It contains a type-generation script (for example
      npm run gen-types
      ).
  2. Execute the one-shot command:
bash
supabase db reset --yes && supabase test db && npm run gen-types
  1. If the command succeeds, summarize:
    • database reset succeeded
    • database tests passed
    • types were generated
  2. If any step fails, stop and report the failing command output clearly.
  1. 确认工作目录为目标项目根目录:
    • 包含
      supabase/
      配置文件。
    • 包含类型生成脚本(例如
      npm run gen-types
      )。
  2. 执行一次性命令:
bash
supabase db reset --yes && supabase test db && npm run gen-types
  1. 如果命令执行成功,总结:
    • 数据库重置成功
    • 数据库测试通过
    • 类型已生成
  2. 如果任何步骤失败,停止操作并清晰报告失败命令的输出。

Notes

注意事项

  • Use
    --yes
    to avoid prompts during
    supabase db reset
    .
  • Use
    supabase test db
    (not
    supabase db test
    ) for pgTAP tests.
  • If local services are not running, start required Supabase services before retrying.
  • 使用
    --yes
    参数避免
    supabase db reset
    过程中的交互式提示。
  • 对于pgTAP测试,使用
    supabase test db
    (而非
    supabase db test
    )。
  • 如果本地服务未运行,在重试前启动所需的Supabase服务。