qizhiyi / sqlalchemy-migrate

Automatically exported from code.google.com/p/sqlalchemy-migrate
MIT License
0 stars 0 forks source link

sqlalchemy-migrate does not support gaps in the repository versioing numbering #79

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try to define versions numbers with gaps and to upgrade between them
2. The gaps are to support bugs fixes between versions

What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "/usr/bin/migrate", line 8, in <module>
    load_entry_point('sqlalchemy-migrate==0.4.5', 'console_scripts',
'migrate')()
  File
"/usr/lib/python2.5/site-packages/sqlalchemy_migrate-0.4.5-py2.5.egg/migrate/ver
sioning/shell.py",
line 132, in main
    ret = command(**kwargs)
  File
"/usr/lib/python2.5/site-packages/sqlalchemy_migrate-0.4.5-py2.5.egg/migrate/ver
sioning/api.py",
line 188, in upgrade
    return _migrate(url,repository,version,upgrade=True,err=err,**opts)
  File
"/usr/lib/python2.5/site-packages/sqlalchemy_migrate-0.4.5-py2.5.egg/migrate/ver
sioning/api.py",
line 209, in _migrate
    changeset = schema.changeset(version)
  File
"/usr/lib/python2.5/site-packages/sqlalchemy_migrate-0.4.5-py2.5.egg/migrate/ver
sioning/schema.py",
line 149, in changeset
    changeset = self.repository.changeset(database,start_ver,version)
  File
"/usr/lib/python2.5/site-packages/sqlalchemy_migrate-0.4.5-py2.5.egg/migrate/ver
sioning/repository.py",
line 152, in changeset
    changes = [self.version(v).script(database,op) for v in versions]
  File
"/usr/lib/python2.5/site-packages/sqlalchemy_migrate-0.4.5-py2.5.egg/migrate/ver
sioning/repository.py",
line 127, in version
    return self.versions.version(*p,**k)
  File
"/usr/lib/python2.5/site-packages/sqlalchemy_migrate-0.4.5-py2.5.egg/migrate/ver
sioning/version.py",
line 72, in version
    return self.versions[VerNum(vernum)]
KeyError: 8

What version of the product are you using? On what operating system?
sqlalchemy_migrate-0.4.5-py2.5.egg

Please provide any additional information below.

Original issue reported on code.google.com by eso...@gmail.com on 14 Feb 2010 at 1:55

GoogleCodeExporter commented 8 years ago
There is a debate going on versioning on ML 
http://groups.google.com/group/migrate-
users/browse_thread/thread/f95ac435aa27280c

Basically linear versioning is not even near to cover all use cases. Help on 
specification is needed:)

Original comment by iElect...@gmail.com on 20 Feb 2010 at 1:02

GoogleCodeExporter commented 8 years ago

Original comment by iElect...@gmail.com on 6 Aug 2010 at 2:18

GoogleCodeExporter commented 8 years ago
We have an (optional) timestamp versioning implementation (issue 115) that will 
be available in release 0.7.2

Original comment by jan.ditt...@gmail.com on 28 Oct 2011 at 8:51

GoogleCodeExporter commented 8 years ago
This seems to still be a huge problem because the timestamp generated will 
inevitably have gaps in them.

Original comment by wyue...@gmail.com on 3 Jun 2012 at 7:16