Branch
#
DefinitionThe first time a data-container
is created from a data-image
, a new timeline is created by default.
You can think of the default timeline as the default Git branch (main
).
Changes made to your database (data-container
) can be recorded along this timeline as revisions.
When you load a previous revision, a new timeline is created.
You can think of this as a new branch.
#
ExampleIn this example we create a new data-container
and make 3 revisions to it.
Notice the created data container has revision rev.0
.
You can now make changes to that container by executing any SQL you like.
In this example we connect to the PostgreSQL data container (database) using psql.
We can now perform a save operation on this data container.
Notice the data container has now revision rev.1
.
If you perform more save operations, revisions will be created as you do so.
After 3 save
operations, this branch now contains rev1
, rev2
and rev3
.
You can now load any revision you like
In our case we load rev1
. A new branch is created.
If we connect to that new container and made more saves, your new branch would now have rev1.xxxx.1
, rev1.xxxx.2
, and rev1.xxxx.3
rev1 | xxxx | 3 |
---|---|---|
name of the data container | branch identifier | revision number on this branch |