Categorygithub.com/asticode/go-astipatch
modulepackage
0.5.0
Repository: https://github.com/asticode/go-astipatch.git
Documentation: pkg.go.dev

# README

Patch manager written in GO.

Languages

SQL

Patches are described as an array of transactions in yaml. Each transaction can contain multiple queries and/or rollbacks.

A transaction must only describe:

-
  queries:
    - >      
      CREATE TABLE test (
        name VARCHAR(255) NOT NULL
      )
  rollbacks:
    - DROP TABLE test
-
  queries:
    - INSERT INTO test (name) VALUES ('test 1'), ('test2')
    - UPDATE test SET name = 'test 2' WHERE id = 2
  rollbacks:
    - DELETE FROM test WHERE id IN (1, 2)
-
  queries:
    - ALTER TABLE test ADD id int NOT NULL AUTO_INCREMENT PRIMARY KEY
  rollbacks:
    - ALTER TABLE test DROP COLUMN id

# Functions

FlagConfig generates a Configuration based on flags.
NewPatcherSQL creates a new SQL patcher.
NewStorerSQL creates a new SQL storer.

# Variables

# Structs

Configuration represents the patcher configuration.
No description provided by the author

# Interfaces

Patcher represents an object capable of patching.
Storer represents an object capable of storing patch's state.

# Type aliases

No description provided by the author