halvardssm / deno-nessie

A modular Deno library for PostgreSQL, MySQL, MariaDB and SQLite migrations
MIT License
527 stars 31 forks source link

[IDEA]: Add support for custom seed and migration template #132

Closed halvardssm closed 2 years ago

halvardssm commented 3 years ago

The Idea

For larger and company projects, there might be a benefit to provide a path (or URL) to a custom seed and migration template for the creation of new migration and seed files.

NewtTheWolf commented 3 years ago

this would be very nice because i dont generate the migrations with nessie, i created a own command to use my own template >.<

kluzzebass commented 3 years ago

I second this. Currently my template loads external up/down SQL files, because writing DDL as individual TS statements is a pain in the behind, and syntax highlighting is dodgy at best.

ebebbington commented 3 years ago

What would a template look like, other than the skeleton nessie provides when creating the file? Can't imagine much code could be shared - when it gets down to the query logic, it's very very specific right? Be interested to hear more about templates though