migrations

package
v0.0.0-...-45785f3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type V001Migration

type V001Migration struct {
	gorm.DB
}

V001Migration represents the first migration, creates the user, settings and number repoisitories

func InitializeV001Migration

func InitializeV001Migration(db gorm.DB) *V001Migration

InitializeV001Migration initializes the first migration

func (*V001Migration) Down

func (m *V001Migration) Down(ctx context.Context, tx *sql.Tx) error

Down drops the user, settings and number tables

func (*V001Migration) Up

func (m *V001Migration) Up(ctx context.Context, tx *sql.Tx) error

Up creates the user, settings and number tables

type V002Migration

type V002Migration struct {
	gorm.DB
}

V002Migration represents the second migration, adds a cookie encryption key to the settings table

func InitializeV002Migration

func InitializeV002Migration(db gorm.DB) *V002Migration

InitializeV002Migration initializes the V002Migration

func (*V002Migration) Down

func (m *V002Migration) Down(ctx context.Context, tx *sql.Tx) error

Down removes the cookie encryption key from the settings table

func (*V002Migration) Up

func (m *V002Migration) Up(ctx context.Context, tx *sql.Tx) error

Up adds a cookie encryption key to the settings table

type V003Migration

type V003Migration struct {
	gorm.DB
}

V003Migration represents the third migration, creates the default admin user

func InitializeV003Migration

func InitializeV003Migration(db gorm.DB) *V003Migration

InitializeV003Migration initializes the V003Migration

func (*V003Migration) Down

func (m *V003Migration) Down(ctx context.Context, tx *sql.Tx) error

Down removes the default admin user

func (*V003Migration) Up

func (m *V003Migration) Up(ctx context.Context, tx *sql.Tx) error

Up creates the default admin user

type V004Migration

type V004Migration struct {
	gorm.DB
}

V004Migration represents the second migration, adds a jwt signing key to the settings table

func InitializeV004Migration

func InitializeV004Migration(db gorm.DB) *V004Migration

InitializeV004Migration initializes the V004Migration

func (*V004Migration) Down

func (m *V004Migration) Down(ctx context.Context, tx *sql.Tx) error

Down removes the cookie encryption key from the settings table

func (*V004Migration) Up

func (m *V004Migration) Up(ctx context.Context, tx *sql.Tx) error

Up adds a jwt signing key to the settings table

Jump to

Keyboard shortcuts

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