migrations

command
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

README

Migrations

This example demonstrates how to create and run database migrations using the schema builder.

Features Demonstrated

  • Creating tables with various column types
  • Adding foreign key constraints with cascade delete
  • Creating relationships between tables (users, posts, comments)
  • Adding indexes to existing tables
  • Adding columns to existing tables
  • Using default values and nullable columns
  • Timestamps and soft deletes

Running the Example

cd examples/migrations
go run main.go

Prerequisites

  • SQLite database (or modify the DSN to use your preferred database)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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