[Zeitgeist] [Bug 642898] Re: Upgrading database scheme is broken for newly created databases

2010-09-25 Thread Siegfried Gevatter
I am closing this since the affected code was never released.

** Changed in: zeitgeist
   Status: Fix Committed = Fix Released

-- 
Upgrading database scheme is broken for newly created databases
https://bugs.launchpad.net/bugs/642898
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.

Status in Zeitgeist Framework: Fix Released

Bug description:
Todays newly created database version 2 broke the upgrade path, we have no 
upgrade script for 0 (which means 'no version entry found') to 2. This happens 
because no-existing databases do not have such table.


$ ZEITGEIST_DATABASE_PATH=/tmp/dfgdsfsddf ./zeitgeist-daemon
 :(
DEBUG:root:Checking for another running instance...
DEBUG:root:No running instances found.
INFO:zeitgeist.sql:Using database: /tmp/dfgdsfsddf
DEBUG:zeitgeist.sql:Schema 'core' not found: no such table: schema_version
INFO:zeitgeist.sql:Upgrading database 'core' from version 0 to 2. This may take 
a while
CRITICAL:zeitgeist.sql:Failed to upgrade database 'core' from version 0 to 2: 
No module named core_0_2

We have to check if we are operating on a new database.
(Side note: we need tests for upgrades)



___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 642898] Re: Upgrading database scheme is broken for newly created databases

2010-09-20 Thread Markus Korn

revno: 1595
fixes bug(s): https://launchpad.net/bugs/642898
committer: Markus Korn thek...@gmx.de
branch nick: trunk
timestamp: Mon 2010-09-20 09:29:32 +0200
message:
  always create core schema for new databases (LP: #642898)


** Changed in: zeitgeist
   Status: In Progress = Fix Committed

-- 
Upgrading database scheme is broken for newly created databases
https://bugs.launchpad.net/bugs/642898
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.

Status in Zeitgeist Framework: Fix Committed

Bug description:
Todays newly created database version 2 broke the upgrade path, we have no 
upgrade script for 0 (which means 'no version entry found') to 2. This happens 
because no-existing databases do not have such table.


$ ZEITGEIST_DATABASE_PATH=/tmp/dfgdsfsddf ./zeitgeist-daemon
 :(
DEBUG:root:Checking for another running instance...
DEBUG:root:No running instances found.
INFO:zeitgeist.sql:Using database: /tmp/dfgdsfsddf
DEBUG:zeitgeist.sql:Schema 'core' not found: no such table: schema_version
INFO:zeitgeist.sql:Upgrading database 'core' from version 0 to 2. This may take 
a while
CRITICAL:zeitgeist.sql:Failed to upgrade database 'core' from version 0 to 2: 
No module named core_0_2

We have to check if we are operating on a new database.
(Side note: we need tests for upgrades)



___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 642898] Re: Upgrading database scheme is broken for newly created databases

2010-09-20 Thread Launchpad Bug Tracker
** Branch linked: lp:zeitgeist

-- 
Upgrading database scheme is broken for newly created databases
https://bugs.launchpad.net/bugs/642898
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.

Status in Zeitgeist Framework: Fix Committed

Bug description:
Todays newly created database version 2 broke the upgrade path, we have no 
upgrade script for 0 (which means 'no version entry found') to 2. This happens 
because no-existing databases do not have such table.


$ ZEITGEIST_DATABASE_PATH=/tmp/dfgdsfsddf ./zeitgeist-daemon
 :(
DEBUG:root:Checking for another running instance...
DEBUG:root:No running instances found.
INFO:zeitgeist.sql:Using database: /tmp/dfgdsfsddf
DEBUG:zeitgeist.sql:Schema 'core' not found: no such table: schema_version
INFO:zeitgeist.sql:Upgrading database 'core' from version 0 to 2. This may take 
a while
CRITICAL:zeitgeist.sql:Failed to upgrade database 'core' from version 0 to 2: 
No module named core_0_2

We have to check if we are operating on a new database.
(Side note: we need tests for upgrades)



___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Bug 642898] Re: Upgrading database scheme is broken for newly created databases

2010-09-19 Thread Markus Korn
There are two possible solutions for this issue:
1.) check if we are operating on an empty database
2.) change our upgrade function in a way that if a upgrade script is not found 
for X - Z it tries to run X - Y - Z

For 1.) there are two possible ways:
1.a.) check if file already exists before sqlite3.connect() to this file
1.b.) change _get_schema_version() to return -1 if SQLITE_MASTER is empty

I vote for 1.a.) as a fix for this bug, and work on 2.) for the future.

-- 
Upgrading database scheme is broken for newly created databases
https://bugs.launchpad.net/bugs/642898
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.

Status in Zeitgeist Framework: In Progress

Bug description:
Todays newly created database version 2 broke the upgrade path, we have no 
upgrade script for 0 (which means 'no version entry found') to 2. This happens 
because no-existing databases do not have such table.


$ ZEITGEIST_DATABASE_PATH=/tmp/dfgdsfsddf ./zeitgeist-daemon
 :(
DEBUG:root:Checking for another running instance...
DEBUG:root:No running instances found.
INFO:zeitgeist.sql:Using database: /tmp/dfgdsfsddf
DEBUG:zeitgeist.sql:Schema 'core' not found: no such table: schema_version
INFO:zeitgeist.sql:Upgrading database 'core' from version 0 to 2. This may take 
a while
CRITICAL:zeitgeist.sql:Failed to upgrade database 'core' from version 0 to 2: 
No module named core_0_2

We have to check if we are operating on a new database.
(Side note: we need tests for upgrades)



___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Bug 642898] Re: Upgrading database scheme is broken for newly created databases

2010-09-19 Thread Mikkel Kamstrup Erlandsen
+1 for 1.a)

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp