← 输入框|github.com|刷新
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NpgsqlRest/pgdev
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: NpgsqlRest/pgdev
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: develop
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 9 commits
  • 37 files changed
  • 2 contributors

Commits on Mar 7, 2026

  1. Add diff command, grants support, type normalization, and CSV catalog…

    … queries
    
    - Add `diff` command: compares SQL files in routines_dir against database
      catalog, reports missing/different/extra routines with full signatures
      and clickable file paths
    - Add optional grants/ACL tracking (`[project].grants` config toggle):
      parses GRANT/REVOKE statements, compares with pg_catalog ACL entries
    - Add type alias normalization (int→integer, varchar→character varying, etc.)
      to prevent false positives when comparing parsed vs catalog types
    - Migrate catalog queries from pipe-delimited to `psql --csv` for safe
      parsing of bodies containing pipes/newlines
    - Add `ignore_body_whitespace` config option to skip formatting-only diffs
    - Fix test DB safety: only read from test.env, never process.env
    - Fix RETURNS TABLE/SETOF rows default (1000 vs 0 for scalar)
    - Group project settings in config dashboard under "Project Settings"
    
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    vbilopav and claude committed Mar 7, 2026
    Configuration menu
    Copy the full SHA
    b2abb10 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2026

  1. Add sync command, formatter, configurable skip prefixes, and TUI dash…

    …board reorganization
    
    - Add sync command to dump database routines to formatted SQL files
    - Add SQL formatter with DROP IF EXISTS, CREATE OR REPLACE, and extensive options
    - Add directory grouping by API/internal type and by name segment
    - Replace skip_generic_prefixes boolean with configurable skip_prefixes array
    - Add exec command, env utilities, file helpers, and parser improvements
    - Reorganize config TUI dashboard into logical sections (Project, Diff, Sync, Format)
    
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    vbilopav and claude committed Mar 12, 2026
    Configuration menu
    Copy the full SHA
    682010a View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2026

  1. Add quoted identifier support, flexible directory grouping, and VIEW …

    …extraction
    
    - Fix parser to handle double-quoted SQL identifiers (e.g. _."exists")
      in CREATE, COMMENT ON, and GRANT/REVOKE statements
    - Formatter preserves quoting via nameQuoted/schemaQuoted flags
    - Replace group_order string with ordered array of dimensions:
      "type", "schema", "name", "kind" for flexible directory nesting
    - Add routine_types config to control which object types are extracted
      into individual files (default: FUNCTION, PROCEDURE)
    - Add VIEW support in sync: TOC parsing, extraction as raw SQL,
      existing file indexing by filename stem
    - Add routine_types validation against supported types
    - Warn when group_order dimensions have missing config
    
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    vbilopav and claude committed Mar 13, 2026
    Configuration menu
    Copy the full SHA
    a22ab6e View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2026

  1. Fix SET attribute parsing, PG array parsing, and diff display consist…

    …ency
    
    - Fix SET attribute regex to capture comma-separated values
      (e.g. SET search_path TO 'public', 'pg_catalog' was truncated)
    - Fix parsePgArray to handle quoted elements containing commas
      (proconfig values like "search_path=public, pg_catalog" were split)
    - Fix compare.ts to strip quotes from individual SET values
    - Fix diff display keys to use types-only for consistent output
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    vbilopav and claude committed Mar 14, 2026
    Configuration menu
    Copy the full SHA
    da4d781 View commit details
    Browse the repository at this point in the history
  2. Add diff --fix-comments, fix parser for DO blocks and multi-value types

    - Add --fix-comments/--fix-grants/--fix-definitions/--fix-all flags to diff
      command. --fix-comments inserts or replaces COMMENT ON statements in source
      files using comments from the database catalog.
    - Fix stripDollarBodies to preserve DO block content (only strip AS bodies)
    - Fix extractBody to pick nearest body marker (dollar vs single-quoted)
    - Fix extractReturns to bound search within the attribute zone
    - Add timestamp/time type aliases, handle array suffixes and char(1)
      normalization in type comparison
    - Fix COMMENT_ON_RE and GRANT_REVOKE_RE to handle nested parens in type
      modifiers like char(1), numeric(10,2)
    - Update README with diff fix switches and new features
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    vbilopav and claude committed Mar 14, 2026
    Configuration menu
    Copy the full SHA
    fe66ade View commit details
    Browse the repository at this point in the history
  3. Move selective sync from diff to sync command

    - diff is now purely read-only (compare only, no file modifications)
    - sync gains --comments/--grants/--definitions/--all flags for
      surgical updates to existing source files without full overwrite
    - Extract fix utilities into src/parser/fix.ts (shared module)
    - Update help text and README to reflect new command structure
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    vbilopav and claude committed Mar 14, 2026
    Configuration menu
    Copy the full SHA
    4873eb9 View commit details
    Browse the repository at this point in the history
  4. Add diff --script for SQL migration script generation

    - diff --script [file] generates a procedural DO block migration script
      matching pgmigrations format (useProceduralScript style)
    - Script includes CREATE, UPDATE (definition/comment/grants), and DROP
    - Each migration step has raise info with timing, routine signature, and file path
    - Optional file path argument; defaults to temp directory
    - diff remains read-only (--script only writes the migration file)
    - Export formatComment, formatGrants, qualifiedName from formatter
    - Update help text and README
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    vbilopav and claude committed Mar 14, 2026
    Configuration menu
    Copy the full SHA
    643f885 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2026

  1. Add interactive sync, functional comparison, and surgical updates

    - Sync is interactive by default: shows changes, prompts Y/n/N/a/q
    - Functional comparison: only updates files with real differences
      (definition, comments, grants), preserves user formatting
    - Surgical updates: patches only changed parts of existing files
      (body, comments, grants) instead of full file overwrite
    - Multi-routine files: groups routines by target file, writes together
    - sync_skip config: "Never" option remembers files to skip
    - --force flag skips interactive prompts
    - --format flag rewrites all files with configured formatting
    - Comment removal: removes COMMENT ON when DB has no comment
    - Ctrl+C handling in prompts
    - Fix backfillConfig duplicate sync_skip entries
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    vbilopav and claude committed Mar 15, 2026
    Configuration menu
    Copy the full SHA
    6137e51 View commit details
    Browse the repository at this point in the history
  2. Add migration system with project_dir, TOML headers, history tracking…

    …, and resolver
    
    - Replace routines_dir + migrations_dir with single project_dir
    - Schema dump is now V000_schema.sql with interactive prompt in sync
    - New files get pgdev TOML header (type, version, run_before, rerun_with)
    - Header parser supports two formats: line comments (-- [pgdev]) and block comments (/* --- [pgdev] --- */)
    - File scanner classifies files as routine/versioned/repeatable by header, naming convention, or parser detection
    - Resolver computes execution plan: hash/version diff, rerun_with cascade (transitive), run_before topological sort
    - History module reads migration state from database comment or dedicated table
    - diff --script generates migration scripts using the full pipeline
    - Flexible file references: bare name, filename, relative path, version number
    - 91 new tests (473 total), all passing
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    vbilopav and claude committed Mar 15, 2026
    Configuration menu
    Copy the full SHA
    834c89e View commit details
    Browse the repository at this point in the history
Loading