migrator

package
v0.0.0-...-8d187f3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDatabase

func CreateDatabase(cfg config.MySqlConfig) (databaseExisted bool, err error)

func DropDatabase

func DropDatabase(cfg config.MySqlConfig) error

func Migrate

func Migrate(cfg config.MySqlConfig) error

if configured database does not exist, it is considered a new deployment, will create database and init tables; if configured database exists, but db_version table does not exist, it is also considered a new deployment,

maybe we do not have permission to create database or other reasons, then will init all tables.

if configured database exists, and db_version table exists, check whether db_version is the latest version

and upgrade based the result.

Types

This section is empty.

Directories

Path Synopsis
edition module
rawsql
DO NOT DELETE for go list to grab directory
DO NOT DELETE for go list to grab directory

Jump to

Keyboard shortcuts

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