migrations

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MigrationList = []*gormigrate.Migration{
	addAdapterStatus(),
	addResources(),
	addConditionStatusIndex(),
	addResourceTenancy(),
	addScopeResourceNameByTenant(),
}

MigrationList rules:

  1. IDs are numerical timestamps that must sort ascending. Use YYYYMMDDHHMM w/ 24 hour time for format Example: August 21 2018 at 2:54pm would be 201808211454.

  2. Include models inline with migrations to see the evolution of the object over time. Using our internal type models directly in the first migration would fail in future clean installs.

  3. Migrations must be backwards compatible. There are no new required fields allowed. See $project_home/g2/README.md

4. Create one function in a separate file that returns your Migration. Add that single function call to this list.

Functions

This section is empty.

Types

type Model

type Model struct {
	ID        string `gorm:"primary_key"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

Model represents the base model struct. All entities will have this struct embedded.

Jump to

Keyboard shortcuts

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