Skip to content
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

Remove RAISE NOTICE statements #256

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions pkg/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,21 +274,18 @@ BEGIN
ELSIF tg_event = 'ddl_command_end' THEN
-- Guess the schema from ddl commands, ignore migrations that touch several schemas
IF (SELECT pg_catalog.count(DISTINCT schema_name) FROM pg_catalog.pg_event_trigger_ddl_commands() WHERE schema_name IS NOT NULL) > 1 THEN
RAISE NOTICE 'pgroll: ignoring migration that changes several schemas';
RETURN;
END IF;

SELECT schema_name INTO schemaname FROM pg_catalog.pg_event_trigger_ddl_commands() WHERE schema_name IS NOT NULL;
END IF;

IF schemaname IS NULL THEN
RAISE NOTICE 'pgroll: ignoring migration with null schema';
RETURN;
END IF;

-- Ignore migrations done during a migration period
IF %[1]s.is_active_migration_period(schemaname) THEN
RAISE NOTICE 'pgroll: ignoring migration during active migration period';
RETURN;
END IF;

Expand Down
Loading