[INFO] Is there any DB schema somewhere to look up to? #325

Closed
opened 2022-11-30 20:22:42 +00:00 by ThePra · 4 comments

I would like to study tha pleroma/akkoma is structured from the POV of the DB but can't find anywhere any kind of documentation or schema file. Is there any?

I would like to study tha pleroma/akkoma is structured from the POV of the DB but can't find anywhere any kind of documentation or schema file. Is there any?
Contributor

Pleroma and Akkoma use Ecto for database operations, that includes migration and schema management. If you want to take a look at how all the current entities are declared, you want to search for "use Ecto.Schema" across the codebase, and for the schemas that describe database upgrades, they're all in the priv/repo/migrations folder.

Pleroma and Akkoma use [Ecto](https://github.com/elixir-ecto/ecto) for database operations, that includes migration and schema management. If you want to take a look at how all the _current_ entities are declared, you want to search for "use Ecto.Schema" across the codebase, and for the schemas that describe database upgrades, they're all in the `priv/repo/migrations` folder.
Author

What about the database structure, with it's tables and foreign keys, is there anything that I could throw to diagram maker and see graph?

What about the database structure, with it's tables and foreign keys, is there anything that I could throw to diagram maker and see graph?

as said above, that is defined by ecto

as said above, that is defined by ecto
Contributor

Ecto is a pseudo-ORM, there is no direct schema.sql file you can inspect. If you wish to introspect into all the current table structure with SQL-specific tooling, you want to install Akkoma manually in your machine, and play with a tool like DBeaver for such.

Ecto is a pseudo-ORM, there is no direct `schema.sql` file you can inspect. If you wish to introspect into all the current table structure with SQL-specific tooling, you want to install Akkoma manually in your machine, and play with a tool like DBeaver for such.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#325
No description provided.