feat(db): own a dedicated Postgres schema and ship SQL migrations with migrate and export commands

Đang mở
#374 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
postgresql, sql, typescript
Lĩnh vực
databases

Hướng nghiên cứu

Start by reading the existing sequelize-cli migration chain and the schema setup around assertSchemaCurrent; the issue does not name specific files or tests. The work spans configurable schema ownership, SQL migration conversion and upgrade compatibility, migration execution and export formats, plus documentation. Done means these paths work together for existing and new deployments and the listed ORM integrations are documented.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement P4 safe v1.0

Part of fells-code/seamless-auth-api#371.

Problem

The API's tables live in the default schema, alongside whatever the adopter's app owns. Adopters sharing a database with their app hit ORM drift detection (prisma migrate dev sees unknown tables and offers a reset; drizzle-kit needs a schemaFilter). Migrations are sequelize-cli .cjs files that only this repo's tooling can run.

Proposal

  • Tables in a configurable schema (default seamless_auth) via search_path, with the migrations table inside it
  • Plain numbered SQL as the migration source of truth, converted from the existing sequelize-cli chain, with an upgrade path for existing deployments
  • Run on boot or through a migrate command for teams that do not run DDL at boot; assertSchemaCurrent keeps its role
  • migrations export --format prisma|drizzle|knex|flyway|raw for organisations that review every DDL change
  • Docs: one-line ORM config to ignore the schema, and referencing users by ID
Ngôn ngữ chính
TypeScript
Star
2
Fork
2
Merge trung bình
11 giờ 40 phút
Pull request đã merge (30 ngày)
104

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fells-code/seamless-auth-api

Tất cả issue của fells-code/seamless-auth-api

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.