migrations

package
v0.0.0-...-98a7bba Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MigrationHelper

type MigrationHelper struct {
	Conn *sql.DB
}

func (MigrationHelper) AddColumn

func (db MigrationHelper) AddColumn(tableName string, columnName string, columnType migrationHelper.SQLType) error

func (MigrationHelper) AddColumns

func (db MigrationHelper) AddColumns(tableName string, columns migrationHelper.AddColumnDefinitions) error

func (MigrationHelper) AddCompoundIndex

func (db MigrationHelper) AddCompoundIndex(tableName string, columnNames []string) error

func (MigrationHelper) AddIndex

func (db MigrationHelper) AddIndex(tableName string, columnName string) error

func (MigrationHelper) AddUniqueCompoundIndex

func (db MigrationHelper) AddUniqueCompoundIndex(tableName string, columnNames []string) error

func (MigrationHelper) AddUniqueIndex

func (db MigrationHelper) AddUniqueIndex(tableName string, columnName string) error

func (MigrationHelper) CreateTable

func (db MigrationHelper) CreateTable(tableName string, columns migrationHelper.AddColumnDefinitions) error

func (MigrationHelper) DropIndex

func (db MigrationHelper) DropIndex(tableName string, columnName string) error

func (MigrationHelper) Insert

func (db MigrationHelper) Insert(tableName string, params migrationHelper.InsertColumnValues) error

func (MigrationHelper) Now

func (db MigrationHelper) Now() string

func (MigrationHelper) SQLTypes

type SQLTypes

type SQLTypes struct{}

func (SQLTypes) BigInt

func (s SQLTypes) BigInt() migrationHelper.SQLType

func (SQLTypes) Bool

func (s SQLTypes) Bool() migrationHelper.SQLType

func (SQLTypes) Bytes

func (s SQLTypes) Bytes() migrationHelper.SQLType

func (SQLTypes) Date

func (s SQLTypes) Date() migrationHelper.SQLType

func (SQLTypes) ForeignKeyID

func (s SQLTypes) ForeignKeyID() migrationHelper.SQLType

func (SQLTypes) ID

func (SQLTypes) IndexTypeFullText

func (s SQLTypes) IndexTypeFullText() migrationHelper.IndexType

func (SQLTypes) IndexTypeUnique

func (s SQLTypes) IndexTypeUnique() migrationHelper.IndexType

func (SQLTypes) Int

func (SQLTypes) JSON

func (s SQLTypes) JSON() migrationHelper.SQLType

func (SQLTypes) Text

func (s SQLTypes) Text() migrationHelper.SQLType

func (SQLTypes) Timestamp

func (s SQLTypes) Timestamp() migrationHelper.SQLType

func (SQLTypes) UUID

func (s SQLTypes) UUID() migrationHelper.SQLType

func (SQLTypes) VarChar

func (s SQLTypes) VarChar(size int) migrationHelper.SQLType

Jump to

Keyboard shortcuts

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