small doc correction; fixes #67
This commit is contained in:
parent
a87d5ff53a
commit
811201d47b
@ -28,7 +28,7 @@ Summary of supported actions:
|
||||
|
||||
* :meth:`Create a column <ChangesetColumn.create>`
|
||||
* :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 an index <ChangesetIndex.rename>`
|
||||
* :meth:`Create primary key constraint <migrate.changeset.constraint.PrimaryKeyConstraint>`
|
||||
|
@ -178,7 +178,7 @@ class ColumnDelta(DictMixin, sqlalchemy.schema.SchemaItem):
|
||||
|
||||
* :class:`ColumnDelta`.current_name is current name of column in db
|
||||
|
||||
|
||||
|
||||
"""
|
||||
|
||||
# Column attributes that can be altered
|
||||
@ -474,6 +474,9 @@ class ChangesetColumn(object):
|
||||
|
||||
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:
|
||||
k['table'] = self.table
|
||||
|
@ -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's Stuff"), 'Abc_s_Stuff')
|
||||
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):
|
||||
"""Let's see how we handle versions collection"""
|
||||
|
@ -208,7 +208,7 @@ def str_to_filename(s):
|
||||
and double underscores to underscores
|
||||
"""
|
||||
|
||||
s = s.replace(' ', '_').replace('"', '_').replace("'", '_')
|
||||
s = s.replace(' ', '_').replace('"', '_').replace("'", '_').replace(".", "_")
|
||||
while '__' in s:
|
||||
s = s.replace('__', '_')
|
||||
return s
|
||||
|
Loading…
x
Reference in New Issue
Block a user