small doc correction; fixes #67

This commit is contained in:
iElectric 2010-07-11 18:16:51 +02:00
parent a87d5ff53a
commit 811201d47b
4 changed files with 7 additions and 3 deletions

View File

@ -28,7 +28,7 @@ Summary of supported actions:
* :meth:`Create a column <ChangesetColumn.create>` * :meth:`Create a column <ChangesetColumn.create>`
* :meth:`Drop a column <ChangesetColumn.drop>` * :meth:`Drop a column <ChangesetColumn.drop>`
* :meth:`Alter a column <ChangesetColumn.alter>` (name, nullabe, type, server_default) * :meth:`Alter a column <ChangesetColumn.alter>` (follow a link for list of supported changes)
* :meth:`Rename a table <ChangesetTable.rename>` * :meth:`Rename a table <ChangesetTable.rename>`
* :meth:`Rename an index <ChangesetIndex.rename>` * :meth:`Rename an index <ChangesetIndex.rename>`
* :meth:`Create primary key constraint <migrate.changeset.constraint.PrimaryKeyConstraint>` * :meth:`Create primary key constraint <migrate.changeset.constraint.PrimaryKeyConstraint>`

View File

@ -474,6 +474,9 @@ class ChangesetColumn(object):
col.alter(name='foobar', type=Integer(), server_default=text("a")) col.alter(name='foobar', type=Integer(), server_default=text("a"))
Supported parameters: name, type, primary_key, nullable,
server_onupdate, server_default, autoincrement
""" """
if 'table' not in k: if 'table' not in k:
k['table'] = self.table k['table'] = self.table

View File

@ -83,6 +83,7 @@ class TestVersion(fixture.Pathed):
self.assertEquals(str_to_filename('Abc "D" Ef'), 'Abc_D_Ef') self.assertEquals(str_to_filename('Abc "D" Ef'), 'Abc_D_Ef')
self.assertEquals(str_to_filename("Abc's Stuff"), 'Abc_s_Stuff') self.assertEquals(str_to_filename("Abc's Stuff"), 'Abc_s_Stuff')
self.assertEquals(str_to_filename("a b"), 'a_b') self.assertEquals(str_to_filename("a b"), 'a_b')
self.assertEquals(str_to_filename("a.b to c"), 'a_b_to_c')
def test_collection(self): def test_collection(self):
"""Let's see how we handle versions collection""" """Let's see how we handle versions collection"""

View File

@ -208,7 +208,7 @@ def str_to_filename(s):
and double underscores to underscores and double underscores to underscores
""" """
s = s.replace(' ', '_').replace('"', '_').replace("'", '_') s = s.replace(' ', '_').replace('"', '_').replace("'", '_').replace(".", "_")
while '__' in s: while '__' in s:
s = s.replace('__', '_') s = s.replace('__', '_')
return s return s