6 ms·
I use Rails migrations, via the standalone_migrations gem, and code-generate the basic CRUD Go stuff from the schema. I've tried a bunch of other migration too
by tptacek 9y ago
I use Rails migrations, via the standalone_migrations gem, and code-generate the basic CRUD Go stuff from the schema.
I've tried a bunch of other migration tools but I don't think anyone has done a better job of it than Rails has.
- bauerd 9y agoCool, because this is actually what I ended up with myself in a dummy Go setup of mine (after having reinvented AR's migrations poorly with a Bash script). I'm not really accustomed to Go's ecosystem yet, so: >and code-generate the basic CRUD Go stuff from the schema I guess you read schema.rb and output some structs and methods? Because a quick Google search only yielded some Yeoman plugins …
- tptacek 9y agoNo, I use Postgres and just query information_schema, and use the row/column information to populate text/template Go templates. There's a bunch of tools that do this already (one I know works is "xo"), but I wanted join-table support.