-
Notifications
You must be signed in to change notification settings - Fork 0
not to use docker compose for examples #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…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.
SQLDef Migration PreviewMigration is performed by -- 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. |
SQLDef Migration PreviewMigration is performed by -- 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. |
SQLDef Migration PreviewMigration is performed by -- 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. |
SQLDef Migration PreviewMigration is performed by -- 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. |
- 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.
No description provided.