migrate

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package migrate provides internal utilities for database schema migrations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SQLType

func SQLType(dialectName string, t reflect.Type, isPK bool) string

SQLType maps Go types to SQL types for the given dialect name.

When isPK is true the column DDL includes the PRIMARY KEY constraint. The exact type depends on the Go field kind:

  • int / int64 → dialect-native auto-increment (SERIAL, AUTO_INCREMENT, IDENTITY…)
  • string → VARCHAR(36) PRIMARY KEY — UUID-friendly; no auto-increment
  • anything else → its natural SQL type + PRIMARY KEY (no auto-increment)

Types

This section is empty.

Jump to

Keyboard shortcuts

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