github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/internal/datastore/crdb/migrations/zz_migration.0005_remove_stats_table.go (about) 1 package migrations 2 3 import ( 4 "context" 5 6 "github.com/jackc/pgx/v5" 7 ) 8 9 const ( 10 dropStatsTable = `DROP TABLE relationship_estimate_counters;` 11 ) 12 13 func init() { 14 err := CRDBMigrations.Register("remove-stats-table", "add-caveats", removeStatsTable, noAtomicMigration) 15 if err != nil { 16 panic("failed to register migration: " + err.Error()) 17 } 18 } 19 20 func removeStatsTable(ctx context.Context, conn *pgx.Conn) error { 21 if _, err := conn.Exec(ctx, dropStatsTable); err != nil { 22 return err 23 } 24 return nil 25 }