Revision 2875
Added by Aaron Marcuse-Kubitza over 12 years ago
csv2db | ||
---|---|---|
114 | 114 |
log('Adding indexes') |
115 | 115 |
for col in typed_cols[1:]: # exclude pkey |
116 | 116 |
log('Adding index on '+col.name) |
117 |
sql.add_index(db, col.name, table) |
|
117 |
sql.add_index(db, col.name, table, ensure_not_null=False)
|
|
118 | 118 |
db.db.commit() |
119 | 119 |
|
120 | 120 |
log('Vacuuming table') |
Also available in: Unified diff
csv2db: Adding indexes: Create plain indexes using ensure_not_null=False because the indexes will primarily be used by the user to search for specific values, rather than by the mapping script which uses the ensure_not_null