Repository navigation
Datanotes 3.8.0
Datanotes 3.8.0 keeps a named token's grants on a table when you rename or move it, removes a schema left empty and lets set_table_bases take over a table's own ref: self column. No operation, argument or setting goes away.
Tokens follow a renamed table
A renamed table keeps its grants explains the rules.
- Exact names follow:
alter_tablerenames a table or moves it to another schema or catalog. Each exact name in a token'sreadorwritebecomes the new name. - Patterns stay:
catalog.schema.*,catalog.*and*still match by name. - Undo follows back:
undo_migrationof the rename puts the tokens' lists back exactly as they were. - A restart catches up: a stop between a rename and the save of
tokens.jsonloses nothing. The next start follows the journaled renames. tokens_followed: a new answer field of the writes, in the owner's answer. It lists the tokens that followed a rename or its undo.
Schemas and bases
- Empty schemas go: a schema left with no tables, no views and no description is removed from
metastore.yamlby the write that empties it (dropping or moving its last table or view, or removing its description withcomment_on); undo brings it back. ref: selfmeets a base:set_table_basesaccepts a base column that a table already has asref: self. The table's ownparentgives way to the base's, its rows untouched.
Before you update
- Programs:
describe_databaseno longer lists a schema left with no tables, no views and no description, andcomment_onon such a schema answers that the schema is unknown. Create a table in it first, or give it a description before you empty it. - Tokens of tables renamed before: they keep the old name. Update them with
tokens/update/. - Renames by hand: a hand edit of
metastore.yamlor agit pullstill changes no token. - Going back to 3.7: after you update again, the tokens follow at start the renames made under 3.7 too. A grant can move away from a new table that took the old name. Check them with
tokens/permissions/.