[elephant-cvs] CVS elephant/src/db-clsql
ieslick
ieslick at common-lisp.net
Mon Feb 20 15:45:37 UTC 2006
Update of /project/elephant/cvsroot/elephant/src/db-clsql
In directory common-lisp:/tmp/cvs-serv24854/src/db-clsql
Modified Files:
sql-controller.lisp
Log Message:
Migration implementation; indexed class migration is broken but all else passes basic tests
--- /project/elephant/cvsroot/elephant/src/db-clsql/sql-controller.lisp 2006/02/19 20:06:03 1.4
+++ /project/elephant/cvsroot/elephant/src/db-clsql/sql-controller.lisp 2006/02/20 15:45:37 1.5
@@ -314,20 +314,14 @@
(the sql-store-controller
(let* ((dbtype (car (second (controller-spec sc))))
(con (clsql:connect (cdr (second (controller-spec sc)))
-;; WARNING: This line of code forces us to use postgresql.
-;; If this were parametrized upwards we could concievably try
-;; other backends.
:database-type dbtype
-;; DNK :postgresql
-;; :database-type :postgresql
:if-exists :old)))
(setf (slot-value sc 'db) con)
;; Now we should make sure that the KEYVALUE table exists, and, if
;; it does not, we need to create it..
- ;; This kind of thing is typically database-specific, but at least we
- ;; can put it in a function....
(unless (keyvalue-table-exists con)
- (create-keyvalue-table con))
+ (with-transaction (:store-controller sc)
+ (create-keyvalue-table con)))
;; These should get oid 0 and 1 respectively
(setf (slot-value sc 'root) (make-instance 'sql-btree :sc sc :from-oid 0))
(setf (slot-value sc 'class-root) (make-instance 'sql-indexed-btree :sc sc :from-oid 1))
More information about the Elephant-cvs
mailing list