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

Aberta
#374 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
postgresql, sql, typescript
Domínio
databases

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
TypeScript
Estrelas
2
Forks
2
Merge médio
11h 40min
PRs com merge (30d)
104

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de fells-code/seamless-auth-api

Todas as issues de fells-code/seamless-auth-api

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.