Skip to content

asticode/go-astipatch

Repository files navigation

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

About

Patch manager written in GO

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages