ameingast / postgresql-simple-migration

PostgreSQL Schema Migrations for Haskell
Other
85 stars 48 forks source link

add create command to generate timestamp-based migration scripts #24

Closed tungd closed 5 years ago

tungd commented 6 years ago

Hi, this PR adds a convenient command to generate timestamp-prefixed migration script.

I've been using this for a couple of weeks, and in practice keeping the migration script name in order is a little bit inconvenient. We were increasing the prefix, for example 1.sql, 2.sql .etc, however there is a case when two team members create change and the increment conflict. Django and Rails prefix their migration script name with timestamp, which I think is quite reasonable.

ameingast commented 6 years ago

Accidentally closed this. If you can provide some tests for your PR, I will merge this in.

tungd commented 6 years ago

Hi, I'm not sure what kind of test is required? The command is actually quite simple that it just get the current timestamp and create an empty file, which are all IO actions.

ameingast commented 5 years ago

Closing due to inactivity.