diff roundup/backends/back_sqlite.py @ 2093:3f6024ab2c7a

That's the last of the RDBMS migration steps done! Yay! Note that the code currently has some unit testing issues: - Metakit needs some attention in a couple of areas - RDBMS backends are having trouble ordering their journal entries correctly. I'm going to be migrating them to use TIMESTAMP for the date column, but that's not necessarily going to fix things as mysql and postgresql both appear to have second granularity. Sqlite will ignore the data type as usual ;) Next up is the datatype-ification of the RDBMS backends. Part of that will involve the migration to numeric IDs, which will also be done in the *dbm backends (already done in metakit). The ID exposed *above* the hyperdb will be String, since so many things assume a string ID now.
author Richard Jones <richard@users.sourceforge.net>
date Sun, 21 Mar 2004 23:39:08 +0000
parents c091cacdc505
children 85d8ebe34c40
line wrap: on
line diff
--- a/roundup/backends/back_sqlite.py	Fri Mar 19 05:27:55 2004 +0000
+++ b/roundup/backends/back_sqlite.py	Sun Mar 21 23:39:08 2004 +0000
@@ -1,4 +1,4 @@
-# $Id: back_sqlite.py,v 1.17 2004-03-18 01:58:45 richard Exp $
+# $Id: back_sqlite.py,v 1.18 2004-03-21 23:39:08 richard Exp $
 '''Implements a backend for SQLite.
 
 See https://pysqlite.sourceforge.net/ for pysqlite info
@@ -65,6 +65,15 @@
         self.cursor.execute('create index sessions_key_idx on '
                 'sessions(session_key)')
 
+        # full-text indexing store
+        self.cursor.execute('CREATE TABLE _textids (_class varchar, '
+            '_itemid varchar, _prop varchar, _textid integer) ')
+        self.cursor.execute('CREATE TABLE _words (_word varchar, '
+            '_textid integer)')
+        self.cursor.execute('CREATE INDEX words_word_ids ON _words(_word)')
+        sql = 'insert into ids (name, num) values (%s,%s)'%(self.arg, self.arg)
+        self.cursor.execute(sql, ('_textids', 1))
+
     def add_actor_column(self):
         # update existing tables to have the new actor column
         tables = self.database_schema['tables']

Roundup Issue Tracker: http://roundup-tracker.org/