Compare two schemas on Linux

Đang mở
#3,656 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
38/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
postgresql, swift
Lĩnh vực
databases, desktop

Hướng nghiên cứu

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.

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

Mô tả

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

Ngôn ngữ chính
Swift
Star
6.2k
Fork
412
Merge trung bình
3 giờ 56 phút
Pull request đã merge (30 ngày)
669

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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

Tất cả issue của TableProApp/TablePro

Issue tương tự

Thêm issue về Swift

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.