Closed hoegaarden closed 10 years ago
If I read this correctly, this patch let's you can store a version like 1 in the schema_version table. Why did you need (or prefer) this over than using the current timestamp as the version?
hi @mbucc ...
Yes, that's right, you can use versions like '1'. I use this, to make it very clear that this is a special migration. However, I think it's just an error, when the system falls over when the char-length of the migration version is smaller than 10 .. but that's my point of view ...
Bye
OK, the downside of more lines of code is minor compared to the benefit. I don't see any risk. Committed, thanks.
Thank you!
Your patch made me wonder what would happen if someone inserted a version number that was really long, say 20 digits. I think this would break shmig; any new migrations would never be applied.
I should add a check constraint on schema_version.version that the integer must be less than or equal to NOW() + 10 seconds.
On Sep 25, 2014, at 2:57 AM, hoegaarden notifications@github.com wrote:
Thank you!
— Reply to this email directly or view it on GitHub.
needed, for example, when you have pseudo migrations like '0000000001-initial_schema.sql'