X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=tests%2Ftest-fddl.lisp;h=0e321f85632fb6d196fc28bbcfb97500f1dab785;hp=961cc3d578a0478dc4d876f13bc3bef64ae275ee;hb=967266c94b00f91e5967b8330fe2b9134b0c0447;hpb=cc92d162f24648d65ad872098353305a5baf91d7 diff --git a/tests/test-fddl.lisp b/tests/test-fddl.lisp index 961cc3d..0e321f8 100644 --- a/tests/test-fddl.lisp +++ b/tests/test-fddl.lisp @@ -172,26 +172,29 @@ ;; test list-table-indexes (deftest :fddl/index/3 (progn - (clsql:execute-command "CREATE TABLE I3TEST (a char(10), b integer)") - (clsql:create-index [bar] :on [i3test] :attributes - '([a]) :unique t) + (clsql:create-table [i3test] '(([a] (string 10)) + ([b] integer))) (clsql:create-index [foo] :on [i3test] :attributes - '([b]) :unique nil) + '([b]) :unique nil) + (clsql:create-index [bar] :on [i3test] :attributes + '([a]) :unique t) (values - + (clsql:table-exists-p [i3test]) + (clsql:index-exists-p [foo]) + (clsql:index-exists-p [bar]) (sort (mapcar #'string-downcase (clsql:list-table-indexes [i3test] :owner *test-database-user*)) - #'string-lessp) + #'string-lessp) (sort (clsql:list-table-indexes [company] :owner *test-database-user*) #'string-lessp) (progn (clsql:drop-index [bar] :on [i3test]) (clsql:drop-index [foo] :on [i3test]) - (clsql:execute-command "DROP TABLE I3TEST") + (clsql:drop-table [i3test]) t))) - ("bar" "foo") nil t) + t t t ("bar" "foo") nil t) ;; create an sequence, test for existence, drop it and test again (deftest :fddl/sequence/1