database

package
v0.0.0-...-a24ed69 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MongoDB = ""
)
View Source
var (
	// Singleton instance of the GORM database connection.
	Postgres = func() *gorm.DB {

		psql_props := config.PostgresProperties

		dsn := psql_props.DSN

		db, err := gorm.Open(postgres.Open(dsn))

		if err != nil {
			log.Fatalf("failed to connect to database - %v", err)
		}

		AutoMigrate(db)

		return db
	}()
)

Functions

func AutoMigrate

func AutoMigrate(db *gorm.DB)

AutoMigrate handles the automatic migration of the database schema.

Types

This section is empty.

Jump to

Keyboard shortcuts

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