migrator

package
v0.0.0-...-d53fb41 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DestructiveMigrateForTests

func DestructiveMigrateForTests(pgURL, migrationsPath string, l logger.Logger, verbose bool) error

DestructiveMigrateForTests will: * Drop the database to give you a clean slate * Run all your migrations * Forcibly run all the migrations again to verify that they are idempotent.

Obviously you don't want this for production, but you should use it instead of the plain Migrate function in your tests if you can.

func Drop

func Drop(pgURL, migrationsPath string, l logger.Logger, verbose bool) error

func Migrate

func Migrate(pgURL, migrationsPath string, l logger.Logger, verbose bool) error

Migrate executes all migrations we have Addind the filePath check in the below code to avoid the execution for the Migation code on the other than First Frontend node. Migration code will execute on the First node (Bootstrap_automate node) On the remaining node migration code execution is not required

func MigrateWithMigrationsTable

func MigrateWithMigrationsTable(pgURL, migrationsPath, migrationsTable string, l logger.Logger, verbose bool) error

MigrateWithMigrationsTable executes all migrations we have, using the specified migrations table.

Types

This section is empty.

Jump to

Keyboard shortcuts

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