command
Version:
v0.0.0-...-3fab713
Opens a new window with list of versions in this module.
Published: Sep 15, 2024
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
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
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.