From 82b7937d77a1c99f6e1af003d9030dc8c4d82bc9 Mon Sep 17 00:00:00 2001 From: Andrew Farries Date: Mon, 15 Jan 2024 10:09:28 +0000 Subject: [PATCH] Remove unused function (#228) --- pkg/state/state.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pkg/state/state.go b/pkg/state/state.go index da9575db..882b4ec7 100644 --- a/pkg/state/state.go +++ b/pkg/state/state.go @@ -401,17 +401,6 @@ func (s *State) Status(ctx context.Context, schema string) (*Status, error) { }, nil } -// ReadSchema reads & returns the current schema from postgres -func ReadSchema(ctx context.Context, conn *sql.DB, stateSchema, schemaname string) (*schema.Schema, error) { - var res schema.Schema - err := conn.QueryRowContext(ctx, fmt.Sprintf("SELECT %[1]s.read_schema($1)", pq.QuoteIdentifier(stateSchema)), schemaname).Scan(&res) - if err != nil { - return nil, err - } - - return &res, nil -} - // Start creates a new migration, storing its name and raw content // this will effectively activate a new migration period, so `IsActiveMigrationPeriod` will return true // until the migration is completed