Discussed in #1772
if I make a file_template like this:
file_template = %%(year)d/%%(month).2d/%%(day).2d_%%(hour).2d%%(minute).2d%%(second).2d_%%(rev)s_%%(slug)s
it should Just Work
so this means:
- in script/base.py in generate_revision() there should be a
self._ensure_directory() for the final calculated path of the output file
- the alembic.ini.mako / pyproject.toml.mako templates should include an additional example with a line like the above, as well as in tutorial.rst editing-the-ini-file
- the bulletpoint in editing-the-ini-file for file_template also needs a new paragraph /example for this with a
.. versionadded:: directive afterwards.
- all of 2,3 above also need to mention that recursive_version_locations=true must be set
- tests in tests/test_script_produciton.py. generation of new file with directory scheme, use a mocked datetime, check for directory path exists, then test creating a ScriptDirectory against it and the new file is loctable
Discussed in #1772
if I make a file_template like this:
it should Just Work
so this means:
self._ensure_directory()for the final calculated path of the output file.. versionadded::directive afterwards.