Difference between revisions of "Revisions"
(Created page with "Revisions on socialstack are a currently incomplete mechanism for tracking historical changes to the contents of your database. Revisions just work for most content types and...") |
|||
| Line 11: | Line 11: | ||
= Making a module use revisions = | = Making a module use revisions = | ||
If you [[generate|generated]] a module then it will be setup to use revisions by default. The [[ | If you [[generate|generated]] a module then it will be setup to use revisions by default. The [[entities|content type]] (socialstack g Api/Things and then the file Thing.cs) will be a VersionedContent which means it will use revisions if revisions are installed. | ||
Revision as of 20:29, 7 February 2023
Revisions on socialstack are a currently incomplete mechanism for tracking historical changes to the contents of your database. Revisions just work for most content types and will start being stored by simply installing the revisions module.
Getting started
socialstack i Api/Revisions
The first time an API starts with the revisions module installed will result in a lot of new database tables being created. This is because revisions are stored out of your "hot" tables to avoid them clogging up your performance or complicating your queries. The tables that get generated are almost identical to the table that they are revisions of, plus a few extra columns, so querying through historical records is quite straight forward too.
Making a module use revisions
If you generated a module then it will be setup to use revisions by default. The content type (socialstack g Api/Things and then the file Thing.cs) will be a VersionedContent which means it will use revisions if revisions are installed.