poeml / mirrorbrain

MirrorBrain
http://mirrorbrain.org/
Other
75 stars 37 forks source link

Database upgrade to 2.18.0 does not work #148

Open poeml opened 9 years ago

poeml commented 9 years ago
                                                                                                           [          ]

Issue migrated (2015-06-05) from old issue tracker http://mirrorbrain.org/issues/issue148

Title    Database upgrade to 2.18.0 does not work
 Priority   feature    Status    chatting
Superseder            Nosy List  dagobert, poeml
Assigned To           Keywords
msg531 (view) Author: dagobert Date: 2014-02-09.11:06:51

When trying the latest mirrorbrain the "mb" program throws an error on database upgrade instead of updating the tables:

mirror-test# mb help Your database needs to be upgraded (to 2.18.0): creating "version" table... Traceback (most recent call last): File "/opt/csw/bin/mb", line 1677, in r = mirrordoctor.main() File "/opt/csw/lib/python2.7/site-packages/cmdln.py", line 249, in main self.postoptparse() File "/opt/csw/bin/mb", line 83, in postoptparse self.conn = mb.conn.Conn(self.config.dbconfig, debug = self.options.debug) File "/opt/csw/lib/python2.7/site-packages/mb/conn.py", line 177, in init SQLObject._connection.query(query) File "/opt/csw/lib/python2.7/site-packages/sqlobject/dbconnection.py", line 414, in query return self._runWithConnection(self._query, s) File "/opt/csw/lib/python2.7/site-packages/sqlobject/dbconnection.py", line 327, in _runWithConnection val = meth(conn, *args) File "/opt/csw/lib/python2.7/site-packages/sqlobject/dbconnection.py", line 411, in _query self._executeRetry(conn, conn.cursor(), s) File "/opt/csw/lib/python2.7/site-packages/sqlobject/postgres/pgconnection.py", line 176, in _executeRetry raise ProgrammingError(ErrorMessage(e)) sqlobject.dberrors.ProgrammingError: relation "version" already exists

msg532 (view) Author: dagobert Date: 2014-02-09.11:11:40

This error may be thrown if the database permissions are not correct. As an aid to new users it would be nice if the permissions would be checked prior to actions to point the user in the right direction.

msg541 (view) Author: poeml Date: 2014-02-11.22:52:23

Hm, database permissions? I was relatively sure that this is just to broken upgrade logic (not fully implemented yet)...

I was a bit too fast when making the new tarball (with version number 2.19.0 attached to it), and I didn't really test upgrading from 2.18.* yet... Sorry...

History
         Date           User   Action            Args
2014-02-11 22:52:23 poeml    set    nosy: + poeml
                                      messages: + msg541
                                      priority: urgent -> feature
2014-02-09 11:11:41 dagobert set    status: unread -> chatting
                                      messages: + msg532
2014-02-09 11:06:51 dagobert create
(end of migrated issue)