database

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: AGPL-3.0 Imports: 21 Imported by: 0

README

PENDING REMOVALS

NONE

MYSQL ENCODING

https://stackoverflow.com/questions/37307146/difference-between-utf8mb4-unicode-ci-and-utf8mb4-unicode-520-ci-collations-in-m

https://mathiasbynens.be/notes/mysql-utf8mb4

https://medium.com/@adamhooper/in-mysql-never-use-utf8-use-utf8mb4-11761243e434

MIGRATE ENCODING

ALTER DATABASE documize CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE account CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE attachment CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE block CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE config CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE document CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE feedback CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE label CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE labelrole CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE link CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE organization CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE page CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE pagemeta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE participant CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE pin CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE revision CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE search CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE share CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE user CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE useraction CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE useractivity CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE userconfig CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE userevent CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(runtime *env.Runtime) bool

Check that the database is configured correctly and that all the required tables exist. It must be the first function called in this package.

func GetSQLVariant added in v0.39.0

func GetSQLVariant(dbType, vc string) env.DbVariant

GetSQLVariant uses database value form @@version_comment to deduce MySQL variant.

func GetSQLVersion added in v0.39.0

func GetSQLVersion(v string) (ints []int, err error)

GetSQLVersion returns SQL version as major,minor,patch numerics.

func Migrate

func Migrate(runtime *env.Runtime, ConfigTableExists bool) error

Migrate the database as required, consolidated action.

Types

type Handler added in v1.51.0

type Handler struct {
	Runtime *env.Runtime
	Store   *domain.Store
}

Handler contains the runtime information such as logging and database.

func (*Handler) Setup added in v1.53.2

func (h *Handler) Setup(w http.ResponseWriter, r *http.Request)

Setup the tables in a blank database

Jump to

Keyboard shortcuts

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