Upgrade (projects must change): each table in config_postgres_schema_<name> is an object: "task": {"my": ["create", "read"], "admin": ["create", "read", "update", "delete"], "column": [...]} (the old column list goes in column). Move each removed setting onto its table: config_table_public_create_allowed, _public_read_allowed → "public"; config_table_private_read_allowed → "private"; config_table_my_create_blocked, _my_read_blocked, _my_delete_all_allowed → "my"; config_table_write_blocked → "admin": ["read"]; config_table_exclude_from_users_delete → "users_delete_skip": True; config_buffer_limit_default, config_buffer_limit_<table> → "buffer_limit"; config_retention_day_table_<table> → "retention_day"; control.table_row_update_disable, table_row_delete_disable, table_row_delete_disable_bulk → "row_lock", "row_delete_max"; config_column_int_mapping → "int_mapping" on each column, with role labels in config_users_role_label ({**base_config_users_role_label, 2: "User"}); config_column_private_read_blocked → "is_private_read_blocked": True on the column; config_postgres_db_log_api is gone (the database whose schema has log_api gets the logs). Pages read labels from /info int_mapping.<db>.<table>.<column> (was config_column_int_mapping.<table>.<column>). Startup names the replacement for every removed setting.
- The schema is each table's blueprint. A table carries who may do what through Atom's object routes (
public,private,my,admin: lists of actions), its database guards (row_lock,row_delete_max),users_delete_skip,buffer_limitandretention_day; a column carries its labels (int_mapping) andis_private_read_blocked. Onlycolumnis required. These keys never change the database; startup refuses an unknown key or an action a route group does not have. - Closed unless listed. A table, or an action, its schema does not list is refused by every object route with 403 (
my delete not allowed for table: task (add "delete" to "my" of task in config_postgres_schema_master)), relation reads included, on whichever database the request uses (?connection=). The*wildcard is gone.usersmay list only reads (its rows are written by the user routes);/admin/postgres-importstill imports users. - Every database works the same. A second database's tables take the same keys, so access, labels, buffers and retention are per database with no suffixed settings.
/inforeturnsint_mappingby database;users.permissionslabels come fromconfig_api(each route withuser_check_permission: its path), so projects no longer label ids. - Retention for any table.
script.postgres_cleanupdeletes rows older than a table'sretention_dayin every database (steps<db>.<table>; found by(tableoid, ctid), so tables without id and partitioned ones work); Atom's defaults stay (otp 1, log_api 7, script_run 90 days).func_table_retention_cleanupreplacesfunc_otp_cleanup,func_log_api_cleanupandfunc_script_run_cleanup. - Schema isolation. Atom's triggers go only on the tables of that database's schema (a table the project manages itself is left alone), and the root user and users triggers only where the schema has
users. The users-delete worker only touches tables inconfig_postgres_schema_masterwithoutusers_delete_skip.