server/schemahooks.py
changeset 2011 758ccc0a9d16
parent 1990 59507a12a7f4
parent 2007 62d72d65e50d
child 2019 399a930e10ef
equal deleted inserted replaced
2010:c594323929cb 2011:758ccc0a9d16
   586             if self.values['cardinality'][0] == '1':
   586             if self.values['cardinality'][0] == '1':
   587                 cmd = 'SET'
   587                 cmd = 'SET'
   588             else:
   588             else:
   589                 cmd = 'DROP'
   589                 cmd = 'DROP'
   590             sqlexec('ALTER TABLE %s ALTER COLUMN %s %s NOT NULL' % (
   590             sqlexec('ALTER TABLE %s ALTER COLUMN %s %s NOT NULL' % (
   591                 table, SQL_PREFIX + etype, SQL_PREFIX + rtype))
   591                 SQL_PREFIX + etype, SQL_PREFIX + rtype, cmd))
   592 
   592 
   593     def commit_event(self):
   593     def commit_event(self):
   594         # structure should be clean, not need to remove entity's relations
   594         # structure should be clean, not need to remove entity's relations
   595         # at this point
   595         # at this point
   596         self.rschema._rproperties[self.kobj].update(self.values)
   596         self.rschema._rproperties[self.kobj].update(self.values)