migrate

package
v0.0.0-...-26742bf Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(db *gorm.DB) error

Start starts the migration process

Types

type Article

type Article struct {
	gorm.Model
	Title    string
	Slug     string `gorm:"unique_index"`
	Body     string
	Author   Author
	AuthorID uint
	Tags     []Tag `gorm:"many2many:article_tags;"`
}

type Author

type Author struct {
	gorm.Model
	Name string

	Articles []Article
}

type Tag

type Tag struct {
	gorm.Model
	Name     string
	Articles []Article `gorm:"many2many:article_tags;"`
}

Jump to

Keyboard shortcuts

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