migration

package
v0.0.0-...-30a92e5 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

func DB(db *gorm.DB)

DB migrates the database models to the most recent version.

func Seed

func Seed(db *gorm.DB, seed string)

Seed will load data from a seed to prepopulate the database with important data before the server startup.

Types

type SeedData

type SeedData struct {
	Authorization struct {
		Policies    []string `json:"policies"`
		GlobalRoles []string `json:"global_roles"`
	} `json:"authorization"`
	Users                   []models.User                   `json:"users"`
	AuthenticationProviders []models.AuthenticationProvider `json:"authentication_providers"`
}

SeedData describes the structure of the data, which is loaded into the database initially.

Jump to

Keyboard shortcuts

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