feat: adds name shortening for relations & temp tables, test timezone handling #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes:
Features:
Add new model_config option: shorten_temp_table_names: When true, long temp names (table, or relation table) will be truncated at 30 chars and appended with the MD5 hex digest of the name to ensure uniqueness of the name. These are not human readable. This is helpful especially for rel tables or table names that are close to the 2^6 char limit.
Add new model_config option: shorten_rel_table_names: When true, long relation table names (for nested tags you can wind up with very long names even on simple table names) will be trimmed to the nearest word. For instance if max_len is set to 20, the relation name table_foo_table_bar_baz would be trimmed to table_foo_table_bar. If the name is not unique, the first 8 characters of the table name MD5 hex digest will be appended: table_foo_12345ABC. This attempts to create human readable and usable names which are still unique and reflective of the relations.
In most cases these changes will prevent length based table creation failures without modifying the XSD schema. This is helpful when the schema is not under the developer's control (e.g. provided by standards committee or other 3rd party).