home-assistant / architecture

Repo to discuss Home Assistant architecture
317 stars 100 forks source link

ADR: Supported databases #644

Closed emontnemery closed 2 years ago

emontnemery commented 2 years ago

We currently have no restrictions on supported database engines for the recorder, and the documentation states:

Home Assistant uses SQLAlchemy, which is an Object Relational Mapper (ORM). This means that you can use any SQL backend for the recorder that is supported by SQLAlchemy, like MySQL, MariaDB, PostgreSQL, or MS SQL Server.

This claim is not correct, SQLAlchemy will behave differently on different databases, and features relied on by the recorder may work differently, or not at all, in different databases.

We advertise a lot of different databases being supported, without version limitation mentioned. This causes the end-user to think their database and version of choice will work with Home Assistant. Unfortunately, that is not always the case; the user experience for those using a less popular database engine or an outdated version is very poor, with frequent issues preventing the recorder from working after an upgrade of Home Assistant.

This ADR is limiting the supported databases in order to improve the experience, testability, maintenance, and provide clarity.

frenck commented 2 years ago

Alright, this looks ready to go!

Thanks, @emontnemery 👍