Skip to content

Conversation

@gfx
Copy link
Collaborator

@gfx gfx commented Sep 24, 2025

No description provided.

gfx added 8 commits September 24, 2025 14:55
…B setup

- Replace docker compose with native GitHub Actions services for PostgreSQL and MySQL
- Use direct docker run for MSSQL (services not easily available)
- Update README to show GitHub Actions services approach
- Simplify workflow configuration and improve CI reliability
- Replace direct docker run with service container configuration
- Add health check using sqlcmd for proper startup detection
- Simplify database setup by removing manual container management
- All databases now use consistent service container approach
- Add complete service configuration for all database types
- Include POSTGRES_DB in PostgreSQL example for consistency
- Expand MySQL and SQL Server examples with full workflow structure
- Add necessary database creation step for SQL Server
- Replace generic service section with multiple database types section
- Ensure all examples are self-contained and ready to use
- Use plain text passwords for CI database examples
- Remove github token parameter (uses default)
- Replace MYSQL_PASSWORD secret with testpassword
- Replace MSSQL_PASSWORD secret with YourStrong@Passw0rd
- Makes examples more straightforward for CI environments
The action.yml had an invalid default value for github-token that doesn't work
in GitHub Actions (action defaults don't support expressions). Now explicitly
passing the token in example workflow.
Each job now creates a separate PR comment identified by command and schema file.
Comments use HTML comment IDs to prevent collision between different sqldef commands.
The action was checking '!baselineSchemaFile' which prevented comments
when baseline-schema-file was explicitly provided in the workflow.
Now comments are created for all PR events with baseline comparisons.
@github-actions
Copy link
Contributor

github-actions bot commented Sep 24, 2025

SQLDef Migration Preview

Migration is performed by sqlite3def 3.0.0 (0f84233) with the schema file: examples/sqlite3def-desired.sql

-- Apply --
BEGIN;
ALTER TABLE `users` ADD COLUMN `email` text NULL;
CREATE INDEX idx_users_email ON users(email);
-- Skipped: ALTER TABLE `users` DROP COLUMN `updated_at`;
COMMIT;

This comment was created by sqldef-preview-action.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 24, 2025

SQLDef Migration Preview

Migration is performed by psqldef 3.0.0 (0f84233) with the schema file: examples/psqldef-desired.sql

-- Apply --
BEGIN;
ALTER TABLE "public"."users" ADD COLUMN "email" varchar(255) NULL;
-- Skipped: ALTER TABLE "public"."users" DROP COLUMN "updated_at";
COMMIT;
CREATE INDEX CONCURRENTLY idx_users_email ON users(email);

This comment was created by sqldef-preview-action.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 24, 2025

SQLDef Migration Preview

Migration is performed by mysqldef 3.0.0 (0f84233) with the schema file: examples/mysqldef-desired.sql

-- Apply --
BEGIN;
ALTER TABLE `users` ADD COLUMN `email` varchar(255) NULL AFTER `username`;
CREATE INDEX idx_users_email ON users(email);
-- Skipped: ALTER TABLE `users` DROP COLUMN `updated_at`;
COMMIT;

This comment was created by sqldef-preview-action.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 24, 2025

SQLDef Migration Preview

Migration is performed by mssqldef 3.0.0 (0f84233) with the schema file: examples/mssqldef-desired.sql

-- Apply --
BEGIN TRANSACTION;
ALTER TABLE [dbo].[users] ADD [email] nvarchar(255) NULL;
GO
CREATE INDEX idx_users_email ON users(email);
GO
-- Skipped: ALTER TABLE [dbo].[users] DROP COLUMN [updated_at];
COMMIT TRANSACTION;

This comment was created by sqldef-preview-action.

gfx added 8 commits September 24, 2025 15:55
- Removed command from title (now just 'SQLDef Migration Preview')
- Added separate lines for command/version and schema file
- Better visual hierarchy in the comment structure
Now displays the actual output from 'command --version' instead of
the version parameter, providing more accurate version information
in the PR comment.
The versionOutput already contains command name and version together
(e.g., 'psqldef v0.17.15'), so the PR comment correctly shows them
on the same line.
@gfx gfx merged commit 808eb0d into main Sep 24, 2025
5 checks passed
@gfx gfx deleted the gfx/no_compose branch September 24, 2025 12:49
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.

2 participants