Compare two schemas on Linux

Aberta
#3,656 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
38/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
postgresql, swift
Domínio
databases, desktop

Direção de pesquisa

Read linux/ROADMAP.md and the Structure changes section of linux/docs/adding-drivers.md; compare the existing macOS implementation in features/compare-sync.mdx for context. The issue proposes first deciding whether schema diff belongs in the backlog, then implementing comparison and script generation for Linux. Done means PostgreSQL schemas differing by a column and index produce both differences, and running the generated script on the target makes a subsequent comparison empty.

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

Descrição

enhancement platform-linux
Problem

The Linux app cannot compare two schemas. linux/ROADMAP.md, Backlog, Ideas lists "schema diff and data sync between connections" as not committed. The macOS app has both (features/compare-sync.mdx).

Checking that staging matches production today means opening Show CREATE TABLE for each table on both connections and reading them side by side.

Proposed solution
  • Decide whether schema diff moves from Ideas into the backlog, and record it in linux/ROADMAP.md. Data sync can stay an idea.
  • If yes, a first version:
    • Compare Schemas between two connections of the same engine, or two schemas on one connection.
    • A list of tables, columns, indexes and foreign keys that were added, removed or changed, built from the table definitions the drivers already fetch (linux/docs/adding-drivers.md, section 7, Structure changes).
    • Generate Script writes the statements that make the target match, planned by the engine's DdlDialect, so a change the engine cannot make is refused the same way the structure tab refuses it.
    • The script opens in an editor tab, previewed and never run on its own, with data loss marked as the structure review marks it.
  • Comparing across engines is out of the first version.

Done means: two PostgreSQL schemas that differ by a column and an index show both differences, and the generated script, run on the target, makes the next comparison come back empty.

Alternatives considered

Compare Show CREATE TABLE output by hand, or with a text diff tool on two dumps.

Platform

Linux

Related database type

N/A / General

Linguagem predominante
Swift
Estrelas
6.2k
Forks
412
Merge médio
3h 56min
PRs com merge (30d)
669

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

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 TableProApp/TablePro

Todas as issues de TableProApp/TablePro

Issues semelhantes

Mais issues de Swift

Receba novas issues na sua caixa de entrada

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