migration

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetColumnName added in v0.36.0

func GetColumnName(db *gorm.DB, column string) string

func MigrateFieldFromGobToJSON

func MigrateFieldFromGobToJSON[T any, S any](ctx context.Context, db *gorm.DB, fieldName string) error

MigrateFieldFromGobToJSON migrates a column from Gob encoding to JSON encoding. T is the type of the model that contains the field to be migrated. S is the type of the field to be migrated.

func MigrateNetIPFieldFromBlobToJSON added in v0.27.5

func MigrateNetIPFieldFromBlobToJSON[T any](ctx context.Context, db *gorm.DB, fieldName string, indexName string) error

MigrateNetIPFieldFromBlobToJSON migrates a Net IP column from Blob encoding to JSON encoding. T is the type of the model that contains the field to be migrated.

func MigrateNewField added in v0.36.0

func MigrateNewField[T any](ctx context.Context, db *gorm.DB, columnName string, defaultValue any) error

func MigrateSetupKeyToHashedSetupKey added in v0.31.0

func MigrateSetupKeyToHashedSetupKey[T any](ctx context.Context, db *gorm.DB) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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