Project

General

Profile

« Previous | Next » 

Revision 2163

sql.py: next_version(): Versions start from 1, because first existing name was version 0

View differences:

sql.py
328 328

  
329 329
def next_version(name):
330 330
    '''Prepends the version # so it won't be removed if the name is truncated'''
331
    version = 0
331
    version = 1 # first existing name was version 0
332 332
    match = re.match(r'^v(\d+)_(.*)$', name)
333 333
    if match:
334 334
        version = int(match.group(1))+1

Also available in: Unified diff