migration_003_entity

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityMigration

type EntityMigration struct {
	// contains filtered or unexported fields
}

EntityMigration adds the `entity` field to all tenant and destination records. This field is used by RediSearch FILTER to distinguish tenants from destinations since both share the same key prefix pattern (tenant:{id}:*).

- Tenants get `entity: "tenant"` - Destinations get `entity: "destination"`

This migration is idempotent - records with an existing entity field are skipped.

func New

func New(client redis.Client, logger migratorredis.Logger, deploymentID string) *EntityMigration

New creates a new EntityMigration instance. deploymentID is optional - pass empty string for single-tenant deployments.

func (*EntityMigration) Apply

func (*EntityMigration) AutoRunnable

func (m *EntityMigration) AutoRunnable() bool

func (*EntityMigration) Cleanup

func (m *EntityMigration) Cleanup(ctx context.Context, state *migratorredis.State) error

func (*EntityMigration) Description

func (m *EntityMigration) Description() string

func (*EntityMigration) IsApplicable

func (m *EntityMigration) IsApplicable(ctx context.Context) (bool, string)

func (*EntityMigration) Name

func (m *EntityMigration) Name() string

func (*EntityMigration) Plan

func (*EntityMigration) PlanCleanup

func (m *EntityMigration) PlanCleanup(ctx context.Context) (int, error)

func (*EntityMigration) Verify

func (*EntityMigration) Version

func (m *EntityMigration) Version() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL