equal
deleted
inserted
replaced
102 """ |
102 """ |
103 try: |
103 try: |
104 if migrscript.endswith('.sql'): |
104 if migrscript.endswith('.sql'): |
105 if self.execscript_confirm(migrscript): |
105 if self.execscript_confirm(migrscript): |
106 sqlexec(open(migrscript).read(), self.session.system_sql) |
106 sqlexec(open(migrscript).read(), self.session.system_sql) |
107 else: |
107 elif migrscript.endswith('.py'): |
108 return super(ServerMigrationHelper, self).cmd_process_script( |
108 return super(ServerMigrationHelper, self).cmd_process_script( |
109 migrscript, funcname, *args, **kwargs) |
109 migrscript, funcname, *args, **kwargs) |
|
110 else: |
|
111 print |
|
112 print ('-> ignoring %s, only .py and .sql scripts are considered' % |
|
113 migrscript) |
|
114 print |
110 self.commit() |
115 self.commit() |
111 except: |
116 except: |
112 self.rollback() |
117 self.rollback() |
113 raise |
118 raise |
114 |
119 |