rubenv / sql-migrate

SQL schema migration tool for Go.
MIT License
3.23k stars 280 forks source link

Add new command as specified in #23 #54

Closed yageek closed 7 years ago

yageek commented 7 years ago

Implement the new command as proposed within the issue #23.

rubenv commented 7 years ago

I like the idea of a new command. The only thing here that is probably less than ideal is the use of the unix epoch. It's just a completely meaningless number.

Perhaps we should use a format like YYYYMMDDHHII? Or in Go: time.Now().Format("200602021504").

yageek commented 7 years ago

I just followed the proposition within the mentioned bug ticket. Are you sure with the format ? I just also noticed that the generated script is not contained inside the correct migrations folder. I will update the PR during the day.

rubenv commented 7 years ago

There's talk about making it configurable (which is okay, but can be added later) and making it smart (which is hard). We have to start somewhere, so having a date is fine for me :-)

It's time we get the ball rolling, which you are setting in motion, so thanks a lot for that.

yageek commented 7 years ago

I think that we should ensure that running the command twice do not give the same output. What do you think about 20060201150405?

rubenv commented 7 years ago

Also good for me!

rubenv commented 7 years ago

Merged, thanks a lot!

rubenv commented 7 years ago

Let's move the discussion back over to #23.