You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into some issues trying to use your tool as documented:
The documentation is missing the fact that we need to enable the mechanism first via MIGRATION_SNAPSHOT_MODEL = True
MIGRATION_SNAPSHOT_DIR has no effect until we run makemigrations, as you are directly using the value in a FileFieldupload_to option. Changing the value would require another migration afterwards. I think you can define your FileFieldupload_to as a module-level function instead that reads from current settings, then no migrations are needed at all, which would be a more intuitive API.
Your date commandline argument defaults to the empty string, but will still be passed as date_end to dateutil.parser.parse(), failing with dateutil.parser._parser.ParserError: String does not contain a date:. You should make this optional, handling the empty/None default.
If record_snapshot() fails (like with the problem above), you will still try and remove the files that have not been created in the finally: block, which raises a different exception (os.remove(graph_name) FileNotFoundError: [Errno 2] No such file or directory: 'migration_snapshot') and somewhat overshadows any actual underlying issue. Maybe there's a better way to handle this, at least using a more explicit error like failed to create graph file, reason:.
Changing DEFAULT_SNAPSHOT_FORMAT had no effect for me, would always try to create a .pdf output file
The text was updated successfully, but these errors were encountered:
Description
I ran into some issues trying to use your tool as documented:
MIGRATION_SNAPSHOT_MODEL = True
MIGRATION_SNAPSHOT_DIR
has no effect until we run makemigrations, as you are directly using the value in aFileField
upload_to
option. Changing the value would require another migration afterwards. I think you can define yourFileField
upload_to
as a module-level function instead that reads from current settings, then no migrations are needed at all, which would be a more intuitive API.dateutil.parser.parse()
, failing withdateutil.parser._parser.ParserError: String does not contain a date:
. You should make this optional, handling the empty/None default.record_snapshot()
fails (like with the problem above), you will still try and remove the files that have not been created in thefinally:
block, which raises a different exception (os.remove(graph_name) FileNotFoundError: [Errno 2] No such file or directory: 'migration_snapshot'
) and somewhat overshadows any actual underlying issue. Maybe there's a better way to handle this, at least using a more explicit error like failed to create graph file, reason:.DEFAULT_SNAPSHOT_FORMAT
had no effect for me, would always try to create a .pdf output fileThe text was updated successfully, but these errors were encountered: