Skip to content

[+] apply admin functions migrations for v5, fixes #1180#1181

Open
0xgouda wants to merge 4 commits intomasterfrom
add-pg-sink-migration
Open

[+] apply admin functions migrations for v5, fixes #1180#1181
0xgouda wants to merge 4 commits intomasterfrom
add-pg-sink-migration

Conversation

@0xgouda
Copy link
Collaborator

@0xgouda 0xgouda commented Feb 4, 2026

closes #1180

@0xgouda 0xgouda self-assigned this Feb 4, 2026
@0xgouda 0xgouda added the sinks Where and how to store monitored data label Feb 4, 2026
@0xgouda 0xgouda changed the title [+] apply admin functions migrations for v5 [+] apply admin functions migrations for v5, fixes #1180 Feb 4, 2026
Comment on lines +606 to +617
&migrator.Migration{
Name: "01180 Apply admin functions migrations for v5",
Func: func(ctx context.Context, tx pgx.Tx) error {
_, err := tx.Exec(ctx, `DROP FUNCTION IF EXISTS admin.ensure_partition_metric_dbname_time`)
if err != nil {
return err
}

_, err = tx.Exec(ctx, sqlMetricEnsurePartitionPostgres)
if err != nil {
return err
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added DROP FUNCTION IF EXISTS admin.ensure_partition_metric_dbname_time for users migrating from v4.0.0 to v5, as in v4.1 we forgot to add the migration for that.

And it will be re-created with the v5 migration in script sqlMetricEnsurePartitionPostgres

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sinks Where and how to store monitored data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apply admin functions migrations for v5

1 participant