fixes to postgres, shell. removal of "run" module.
This commit is contained in:
parent
2e74b87df5
commit
6c0694417f
@ -1,9 +1,10 @@
|
||||
0.5.0
|
||||
- SA 0.5.x support.
|
||||
- TODO:py.test is no longer used for testing. (use nose)
|
||||
- py.test is no longer used for testing. (use nose)
|
||||
- Added --echo=True option for all commands, which will make the sqlalchemy connection echo SQL statements.
|
||||
- Better Postgres support, especially for schemas.
|
||||
- modification to the downgrade command to simplify the calling (old way still works just fine)
|
||||
- TODO: complete MySQL support
|
||||
|
||||
0.4.x
|
||||
- TODO: document changes
|
||||
|
@ -1 +0,0 @@
|
||||
from migrate.run import *
|
@ -11,19 +11,34 @@ class PGSchemaGeneratorMixin(object):
|
||||
return '"%s"'%identifier
|
||||
|
||||
class PGColumnGenerator(PGSchemaGenerator,ansisql.ANSIColumnGenerator, PGSchemaGeneratorMixin):
|
||||
pass
|
||||
def _do_quote_table_identifier(self, identifier):
|
||||
return identifier
|
||||
def _do_quote_column_identifier(self, identifier):
|
||||
return '"%s"'%identifier
|
||||
|
||||
class PGColumnDropper(ansisql.ANSIColumnDropper, PGSchemaGeneratorMixin):
|
||||
pass
|
||||
def _do_quote_table_identifier(self, identifier):
|
||||
return identifier
|
||||
def _do_quote_column_identifier(self, identifier):
|
||||
return '"%s"'%identifier
|
||||
|
||||
class PGSchemaChanger(ansisql.ANSISchemaChanger, PGSchemaGeneratorMixin):
|
||||
pass
|
||||
def _do_quote_table_identifier(self, identifier):
|
||||
return identifier
|
||||
def _do_quote_column_identifier(self, identifier):
|
||||
return '"%s"'%identifier
|
||||
|
||||
class PGConstraintGenerator(ansisql.ANSIConstraintGenerator, PGSchemaGeneratorMixin):
|
||||
pass
|
||||
def _do_quote_table_identifier(self, identifier):
|
||||
return identifier
|
||||
def _do_quote_column_identifier(self, identifier):
|
||||
return '"%s"'%identifier
|
||||
|
||||
class PGConstraintDropper(ansisql.ANSIConstraintDropper, PGSchemaGeneratorMixin):
|
||||
pass
|
||||
def _do_quote_table_identifier(self, identifier):
|
||||
return identifier
|
||||
def _do_quote_column_identifier(self, identifier):
|
||||
return '"%s"'%identifier
|
||||
|
||||
class PGDialect(ansisql.ANSIDialect):
|
||||
columngenerator = PGColumnGenerator
|
||||
|
@ -92,7 +92,8 @@ def parse_args(*args,**kwargs):
|
||||
if cmdname == 'downgrade':
|
||||
if not args[-1].startswith('--'):
|
||||
kwargs['version'] = args[-1]
|
||||
|
||||
args = args[:-1]
|
||||
|
||||
except IndexError:
|
||||
# No command specified: no error message; just show usage
|
||||
raise ShellUsageError(None)
|
||||
|
Loading…
Reference in New Issue
Block a user