summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2009-06-05 16:26:27 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2009-06-05 16:26:27 +0200
commit5d8f38cb9491365af78dfbecabc1853075430603 (patch)
treefe01a30676398e98df4dec341fee934e6efd8fc7
parent630a517219464f3113449b5984c04e18b96f265c (diff)
downloadlogilab-common-5d8f38cb9491365af78dfbecabc1853075430603.tar.gz
fix default set_null_allowed implementation
-rw-r--r--adbh.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/adbh.py b/adbh.py
index d371173..7749abe 100644
--- a/adbh.py
+++ b/adbh.py
@@ -231,7 +231,7 @@ INSERT INTO %s VALUES (0);''' % (seq_name, seq_name)
table, column, coltype)
def sql_set_null_allowed(self, table, column, coltype, null_allowed):
- cmd = null_allowed and 'SET' or 'DROP'
+ cmd = null_allowed and 'DROP' or 'SET'
return 'ALTER TABLE %s ALTER COLUMN %s %s NOT NULL' % (
table, column, cmd)