go-zero-postgres-flyway

command
v0.0.0-...-3fab713 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 7 Imported by: 0

README

go-zero-postgres-flyway

This example service supports database versioning, seamless migration, and service side schema validation.

More to see commands.sh

      │
  API │
┌─────▼────────────────────┐
│ Service Logic            │
│ (Get/Set in internal/)   │
└─────┬────────────────────┘
      ├───────── OR ───────────────────────┐
┌─────▼────────────────────┐     ┌─────────▼────────────────┐
│ Model V1                 │     │ Model V2                 │
│ (model/modelv1/)         │     │ (model/modelv2/)         │
└─────┬────────────────────┘     └─────────┬────────────────┘
┌─────▼────────────────────┐     ┌─────────▼────────────────┐
│ Schema V1                │     │ Schema V2                │
│ (model/db/schema/V1.sql) │     │ (model/db/schema/V2.sql) │
└─────▲───────────────────┬┘     └────▲─────────────────────┘
      │ Init db           │ Flyway    │
      │                   │ migration │
┌─────┴────────────────┬──▼───────────┴────────┐
│ Migration 0->1       │ Migration 1->2        │
│ V1__create_schema.sql│ V2_value_not_null.sql │
└──────────────────────┴───────────────────────┘

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
handler
Code generated by goctl.
Code generated by goctl.
svc
types
Code generated by goctl.
Code generated by goctl.
model

Jump to

Keyboard shortcuts

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