chop-dbhi / data-models-sqlalchemy

SQLAlchemy models and DDL and ERD generation from chop-dbhi/data-models style JSON endpoints.
Other
11 stars 3 forks source link

Make version_history creation idempotent #17

Closed gracebrownecodes closed 9 years ago

gracebrownecodes commented 9 years ago

Make version_history table creation dependent on non-existence of the table, which requires some fiddling for database compatability, since SQLAlchemy doesn't support this operation atomically and MSSQL has no 'CREATE TABLE IF NOT EXISTS' syntax. Also, since it is now idempotent, this statement is added to the front of every DDL script produced by the service.

Fixes #16

Signed-off-by: Aaron Browne aaron0browne@gmail.com

bruth commented 9 years ago

LGTM