comparison roundup/backends/rdbms_common.py @ 2828:3a2f138fcb28

use integer IDs in multilink tables
author Alexander Smishlajev <a1s@users.sourceforge.net>
date Mon, 25 Oct 2004 10:20:58 +0000
parents e3cd28cec23d
children 23ed4195e442
comparison
equal deleted inserted replaced
2827:43e3a7ac1190 2828:3a2f138fcb28
1 # $Id: rdbms_common.py,v 1.137 2004-10-14 22:27:59 richard Exp $ 1 # $Id: rdbms_common.py,v 1.138 2004-10-25 10:20:58 a1s Exp $
2 ''' Relational database (SQL) backend common code. 2 ''' Relational database (SQL) backend common code.
3 3
4 Basics: 4 Basics:
5 5
6 - map roundup classes to relational tables 6 - map roundup classes to relational tables
546 def create_multilink_table(self, spec, ml): 546 def create_multilink_table(self, spec, ml):
547 ''' Create a multilink table for the "ml" property of the class 547 ''' Create a multilink table for the "ml" property of the class
548 given by the spec 548 given by the spec
549 ''' 549 '''
550 # create the table 550 # create the table
551 sql = 'create table %s_%s (linkid varchar(255), nodeid varchar(255))'%( 551 sql = 'create table %s_%s (linkid INTEGER, nodeid INTEGER)'%(
552 spec.classname, ml) 552 spec.classname, ml)
553 self.sql(sql) 553 self.sql(sql)
554 self.create_multilink_table_indexes(spec, ml) 554 self.create_multilink_table_indexes(spec, ml)
555 555
556 def create_multilink_table_indexes(self, spec, ml): 556 def create_multilink_table_indexes(self, spec, ml):

Roundup Issue Tracker: http://roundup-tracker.org/