Skip to content

feat: init detects existing Data/*.sql files and proposes trackedTables#54

Merged
zacateras merged 5 commits intomainfrom
copilot/enhance-init-command-detect-sql-files
Apr 10, 2026
Merged

feat: init detects existing Data/*.sql files and proposes trackedTables#54
zacateras merged 5 commits intomainfrom
copilot/enhance-init-command-detect-sql-files

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

  • Scan Data/*.sql files in InitCommand.Execute and extract table names via SyncCommandService.TryParseDataFileName
  • In interactive mode: show proposed trackedTables list and ask for confirmation before adding to config
  • In non-interactive mode: auto-include discovered tables in config (no prompt available)
  • Update InitResult record to carry TrackedTables added during init
  • Update OutputFormatter.WriteInit to show added tracked tables (plain-text and JSON)
  • Add tests for the new behavior (files found + confirm, files found + decline, no files, malformed filenames)
  • Update CHANGELOG.md
  • Code review feedback applied (rename method, simplify null check)
  • Update specs/01-cli.md with full init Data/*.sql scan behavior spec
  • Update README.md selective data scripting section
  • Update PACKAGE_README.md selective data scripting section
  • Integrate main (resolve CHANGELOG conflict, all 290 tests pass)

Copy link
Copy Markdown
Member

@zacateras zacateras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify if there is a need to update specs/* (cli?), README.md and PACKAGE_README.md.

Copilot AI changed the title [WIP] Enhance init command to detect existing Data/*.sql files and propose trackedTables feat: init detects existing Data/*.sql files and proposes trackedTables Apr 10, 2026
Copilot AI requested a review from zacateras April 10, 2026 08:11
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 10, 2026

Verify if there is a need to update specs/* (cli?), README.md and PACKAGE_README.md.

Updated in 31452a4:

  • specs/01-cli.md: added full behavior spec for the Data/*.sql scan under the init section (interactive vs. non-interactive, confirmation prompt, no-files fallback)
  • README.md: added a bullet in the "Selective data scripting" section describing the init-time scanning behavior
  • PACKAGE_README.md: same addition to the "Selective Data Scripting" section

@zacateras
Copy link
Copy Markdown
Member

@copilot integrate main

…command-detect-sql-files

# Conflicts:
#	CHANGELOG.md

Co-authored-by: zacateras <1332231+zacateras@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 10, 2026

@copilot integrate main

Done — merged origin/main into this branch in 6e194fc. The CHANGELOG conflict was resolved by keeping both sets of ### Added entries. All 290 tests pass.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • non-existent-server-for-auth-test
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/sql-change-tracker/sql-change-tracker/tests/SqlChangeTracker.Tests/bin/Debug/net8.0/SqlChangeTracker.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/sql-change-tracker/sql-change-tracker/tests/SqlChangeTracker.Tests/bin/Debug/net8.0/SqlChangeTracker.Tests.deps.json /home/REDACTED/work/sql-change-tracker/sql-change-tracker/tests/SqlChangeTracker.Tests/bin/Debug/net8.0/testhost.dll --port 45343 --endpoint 127.0.0.1:045343 --role client --parentprocessid 4476 --telemetryoptedin false (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@zacateras zacateras marked this pull request as ready for review April 10, 2026 09:46
@zacateras zacateras merged commit af12b78 into main Apr 10, 2026
4 checks passed
@zacateras zacateras deleted the copilot/enhance-init-command-detect-sql-files branch April 10, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance init command to detect existing Data/*.sql files and propose trackedTables

2 participants