Fixed - timestamp Primary key

Merged
#5 · Created  · Last updated

Merged pull request

Breaking change: Merged in ghthor/goose/primary-key-bug (pull request #5: Fixed - timestamp Primary key)

430f2bf·Author: ·Closed by: ·2013-01-17

Description

Issue

I ran into this issue when I created a blank database and a single migration file. goose would create the goose_db_version table and insert a version statement. Then it would apply the migration. The initial version statement and the completed migration statement had the same time-stamp and MySQL complains about non-unique Primary key.

Fix

Fixed this by creating an id column that is auto incremented so it is guaranteed to be unique for each version statement.

Testing

Have you any plans to cover this project in tests? I'd be interested in helping out. I've used gospec pretty extensively and would recommend it's use.

I didn't get a chance to test this with pg backend. Would be nice to begin adding some automated integration tests.

Cheers, I'm pretty excited about goose

0 attachments

0 comments

Loading commits...