- Database: Postgresql v10+, with JSONB columns for storing ActivityStreams data as-is
- Data modeling tools:
Defining our relational database
Starting off with Pleroma's Postgres DB, imported into SQLEditor:
The database is generated based on migrations defined in Elixir, so any changes should be done there. One can also generate an SQL definition files by running
pg_dump -U postgres -h localhost pleroma -s -f db_definition.sql
activities.data JSONB fields, which contain ActivityStreams data as a JSON document (in binary form, with indexes on certain paths).
DB structure for MoodleNet
ActivityStreams represents entities capable of carrying out an Activity as
Actors(possible types of Actors: Application | Group | Organization | Person | Service). Actors are elsewhere also known as Agents.
Pleroma only had a traditional concept of
users though, so changes we need to make to the database include:
actors(new table with fields relocated from the
userstable) which can represent both profiles (to enable one
Personidentities) and groups (like
userlinked to that
Actor, or who originally created that group
actor_opennessis optional and could include
ap_id) indicates the
actor_relationships(to store memberships and permissions of groups)
subject_actor_idcould refer to a Person agent like Alice
target_actor_idcould refer to a
Groupagent like 'Geographers of the world'
relationship_confirmedindicates whether the object has confirmed the relationship requested by the subject (for example a moderator has approved Alice's request to join the group)
Here's an updated DB structure:
Available as an SQL file (not meant to be used as-is).
Options to research
- Standards: https://docs.google.com/document/d/1HyhOe06nJOnrhQxkfowJKMZDEBak1yEBSuX-qv7AhKo/edit?ts=5b30e143#
- Metadata for MoodleNet: https://docs.google.com/document/d/1dXAaj9iME1Hvw8E5IhJD5UtAZBLwFI7TkiVK7HkgbZI/edit?ts=5b30e134#heading=h.rmppti8baa65
- OER platforms' metadata: https://gitlab.com/moodlenet/meta/wikis/OER-metadata
- Taxonomies and common metadata values: https://gitlab.com/moodlenet/meta/wikis/Taxonomies-and-common-metadata-values
Also see comments on deprecated Trello card: https://trello.com/c/cFtUI5Kb/69-databases-models-data-metadata