Skip to content

Commit

Permalink
Fix bug with minute component in file_template and make sure it is te…
Browse files Browse the repository at this point in the history
…sted correctly
  • Loading branch information
dhaaker committed Oct 20, 2012
1 parent 894afbf commit 4b9229b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
from operations.create_table() documentation.
#81

- [bug] Fixed the minute component in file_template
which returned the month part of the create date.

0.4.0
=====
- [feature] Support for tables in alternate schemas
Expand Down
2 changes: 1 addition & 1 deletion alembic/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def _rev_path(self, rev_id, message, create_date):
'month': create_date.month,
'day': create_date.day,
'hour': create_date.hour,
'minute': create_date.month,
'minute': create_date.minute,
'second': create_date.second
}
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_revision_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ def test_args(self):
"%(day)s_%(hour)s_"
"%(minute)s_%(second)s"
)
create_date = datetime.datetime(2012, 5, 25, 15, 8, 5)
create_date = datetime.datetime(2012, 7, 25, 15, 8, 5)
eq_(
script._rev_path("12345", "this is a message", create_date),
"%s/versions/12345_this_is_a_"
"message_2012_5_25_15_5_5.py" % staging_directory
"message_2012_7_25_15_8_5.py" % staging_directory
)


Expand Down

0 comments on commit 4b9229b

Please sign in to comment.