]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix SQL output
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 12 Oct 2009 16:32:29 +0000 (16:32 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 12 Oct 2009 16:32:29 +0000 (16:32 +0000)
doc/build/metadata.rst

index 996fecdd0a3fce7f1a5b57f28165acdcf1e59262..078162f4648c37db58e71960e3ac1c090df5835e 100644 (file)
@@ -779,11 +779,12 @@ When using a callable, the callable is passed the ddl element, event name, the `
         PRIMARY KEY (user_id)
     )
 
-    select relname from pg_class where relname='users'
+    select conname from pg_constraint where conname='cst_user_name_length'
     ALTER TABLE users ADD CONSTRAINT cst_user_name_length  CHECK (length(user_name) >= 8){stop}
     
     {sql}users.drop(engine)
-    select relname from pg_class where relname='users'
+    select conname from pg_constraint where conname='cst_user_name_length'
+    ALTER TABLE users DROP CONSTRAINT cst_user_name_length
     DROP TABLE users{stop}
 
 Custom DDL