- make test_shell not assume Python code is compiled
- update results in test_shell so that it works in Postgresql - make Oracle changesets generate valid sql syntax when a modified column's default value changes to NULL
This commit is contained in:
parent
562052de91
commit
bf45f7da6d
@ -45,7 +45,7 @@ class OracleSchemaChanger(OracleSchemaGenerator,ansisql.ANSISchemaChanger):
|
||||
|
||||
|
||||
if dropdefault_hack:
|
||||
column.default = sa.PassiveDefault(sa.func.null())
|
||||
column.default = sa.PassiveDefault(sa.sql.null())
|
||||
if notnull_hack:
|
||||
column.nullable = True
|
||||
colspec=self.get_column_specification(column,override_nullable=null_hack)
|
||||
|
@ -10,8 +10,7 @@ from sqlalchemy import MetaData,Table
|
||||
python_version = sys.version[0:3]
|
||||
|
||||
class Shell(fixture.Shell):
|
||||
_cmd=os.path.join('python build', 'scripts-%s' % python_version,
|
||||
'migrate')
|
||||
_cmd=os.path.join('python migrate', 'versioning', 'shell.py')
|
||||
@classmethod
|
||||
def cmd(cls,*p):
|
||||
p = map(lambda s: str(s),p)
|
||||
@ -341,11 +340,11 @@ class TestShellDatabase(Shell,fixture.DB):
|
||||
|
||||
self.assertSuccess(self.cmd('commit',upgrade_path,repos_path,'postgres','upgrade'))
|
||||
self.assertEquals(self.cmd_version(repos_path),1)
|
||||
self.assertEquals(len(os.listdir(os.path.join(repos_path,'versions','1'))),1)
|
||||
self.assertEquals(len(os.listdir(os.path.join(repos_path,'versions','1'))),2)
|
||||
|
||||
# Add, not replace
|
||||
self.assertSuccess(self.cmd('commit',downgrade_path,repos_path,'postgres','downgrade','--version=1'))
|
||||
self.assertEquals(len(os.listdir(os.path.join(repos_path,'versions','1'))),2)
|
||||
self.assertEquals(len(os.listdir(os.path.join(repos_path,'versions','1'))),3)
|
||||
self.assertEquals(self.cmd_version(repos_path),1)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user