Compare two schemas on Linux

オープン
#3,656 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
postgresql, swift
領域
databases, desktop

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Swift
スター
6.2k
フォーク
412
平均マージ
3時間 56分
マージ済み PR(30日)
669

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TableProApp/TablePro のほかの issue

TableProApp/TablePro の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。