weavejester / ragtime

Database-independent migration library
Eclipse Public License 1.0
610 stars 85 forks source link

Add create-migration repl function #81

Closed ghost closed 7 years ago

ghost commented 9 years ago

Add a function to create migrations with DateTime stamps and string description

(create-migration "alter_table_foo_docstring_set_null")
=> 20150816234204_alter_table_foo_docstring_set_null.edn

with the contents

{:up [""]
 :down [""]}

I've been using this and it's worked well thus far. If it's something that looks useful, I can expand it out for SQL files.

weavejester commented 8 years ago

Rather than make this part of ragtime.core, I want to have a separate library for generating templates. However, I haven't quite figured out the best way to set it up.