Mercurial > p > roundup > code
changeset 3553:e0b3a91519c3
whoops
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 09 Feb 2006 04:46:22 +0000 |
| parents | 4cf7f9b7cb37 |
| children | 5e70726a86dd |
| files | roundup/backends/rdbms_common.py templates/minimal/html/page.html |
| diffstat | 2 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/backends/rdbms_common.py Thu Feb 09 04:45:43 2006 +0000 +++ b/roundup/backends/rdbms_common.py Thu Feb 09 04:46:22 2006 +0000 @@ -1,4 +1,4 @@ -# $Id: rdbms_common.py,v 1.165 2006-02-06 21:00:47 richard Exp $ +Id$ ''' Relational database (SQL) backend common code. Basics: @@ -181,9 +181,9 @@ We should now confirm that the schema defined by our "classes" attribute actually matches the schema in the database. ''' - save = self.upgrade_db() - - # now detect changes in the schema + save = 0 + + # handle changes in the schema tables = self.database_schema['tables'] for classname, spec in self.classes.items(): if tables.has_key(classname): @@ -202,6 +202,10 @@ del tables[classname] save = 1 + # now upgrade the database for column type changes, new internal + # tables, etc. + save = save | self.upgrade_db() + # update the database version of the schema if save: self.save_dbschema()
--- a/templates/minimal/html/page.html Thu Feb 09 04:45:43 2006 +0000 +++ b/templates/minimal/html/page.html Thu Feb 09 04:46:22 2006 +0000 @@ -74,9 +74,13 @@ </td> <td> <p tal:condition="options/error_message | nothing" class="error-message" - tal:repeat="m options/error_message" tal:content="structure m">error</p> - <p tal:condition="options/ok_message | nothing" class="ok-message" - tal:repeat="m options/ok_message" tal:content="structure m">error</p> + tal:repeat="m options/error_message" tal:content="structure m" /> + <p tal:condition="options/ok_message | nothing" class="ok-message"> + <span tal:repeat="m options/ok_message" + tal:content="structure string:$m <br/ > " /> + <a class="form-small" tal:attributes="href string:issue${context/id}" + i18n:translate="">clear this message</a> + </p> </td> </tr> <tr>
