Commit Graph

3 Commits

Author SHA1 Message Date
Andrew Farries
1a7eb3271a
Format the examples with jq (#21) 2023-07-06 15:26:29 +01:00
Carlos Pérez-Aradros Herce
a8c4fddd14
Add migrations state handling (#7)
This migrations introduces state handling by creating a dedicated
`pgroll` schema (name configurable). We will store migrations there, as
well as their state. So we keep some useful information, ie the
migration definition (so we don't need it for the `complete` state).

Schema includes the proper constraints to guarantee that:
* Only a migration is active at a time
* Migration history is linear (all migrations have a unique parent,
except the first one which is NULL)
* We now the current migration at all times

Some helper functions are included:

* `is_active_migration_period()` will return true if there is an active
migration.
* `latest_version()` will return the name of the latest version of the
schema.
2023-06-28 11:10:03 +02:00
Carlos Pérez-Aradros Herce
bdaf08f54c Initial commit
Basic skeleton and simple op
2023-06-22 17:30:40 +02:00