Improve documentation for timestamp helpers #1891
I just started working with Diesel as part of a Rocket server app I'm building, and I'm working my way through Rocket's guide to get up to speed on the ins and outs of working with Rocket. I've gotten to the point where I need to set up my database, so I jumped from Rocket's section on state with databases (using Diesel) to Diesel's guide and started following along.
In the past I've used ORMs like Sequelize, which automatically adds columns for
First, the guide mentions:
As far as I can tell, this hasn't been true since #991 landed; the
I think it would also be really helpful to see these files be written in a similar way to how the path of user-generated migrations are output to the console when migrations are created.
$ diesel setup Creating migrations directory at: /absolute/path/to/project/migrations
I think it would be helpful to see:
$ diesel setup Creating migrations directory at: /absolute/path/to/project/migrations Creating migrations/00000000000000_diesel_initial_setup/up.sql Creating migrations/00000000000000_diesel_initial_setup/down.sql
Next, I think the explanation comment inside
I think "
It also wasn't immediately clear to me, but am I correct that the example in the explanation comment is SQL for an example migration to create a
If the example would in fact live in a different file, I think it would be very helpful to annotate the SQL snipped with an example file name, such as
I would be very happy to put up a PR (or more) to address the above, and I would really appreciate any feedback you might have about these suggestions. As I only just started working with Diesel today, there may have been something I missed in the guide or other docs about this feature, but I'd still like to see if we can improve this feature and make it a bit more visible.
The text was updated successfully, but these errors were encountered: