Upgrade (projects must change): config_postgres is now config_postgres_schema_master. In config_extend.py, rename the import (from config import config_postgres_schema_master as base_config_postgres_schema_master), the variable and every base_config_postgres use; code that read app_state.config_postgres reads app_state.config_postgres_schema_master. .env config_postgres_schema_lock_timeout_sec becomes config_postgres_lock_timeout_sec. A project with config_postgres_db_log_api other than master moves log_api into that database's schema (docs/database.md).
- A schema per database:
config_postgres_schema_<name>inconfig_extend.pyis applied at startup to the database ofconfig_postgres_url_<name>(extensions, tables, indexes, checks, triggers,sql), master first, with the same lock, lock timeout and check mode as master. That database gets exactly what its schema lists, nothing of Atom's. Startup stops when a schema names a database without a URL, or when API logging is on andlog_apiis not in the schema ofconfig_postgres_db_log_api's database, or is in another one too (before, Atom createdlog_apithere on its own).script.postgres_schema_planplans every database (--db <name>for one) (docs/database.md). idis optional: a table may haveid, a primary key over several columns (is_primaryon each, such asdeviceandtimefor a TimescaleDB hypertable) or none; a column namedidis an integer. On a table withoutid, create and read work (read with anorder), while update, delete and relation fetch answer 400table '<name>' has no id: ... needs onebefore any SQL, and a read withoutorderanswers 400table has no id: pass order.- TimescaleDB in config: the guide now defines the time-series database as
config_postgres_schema_<name>: tables intable, hypertables, compression, policies and rollups insql; no separate schema file to run by hand (docs/timescaledb.md).