Comments (3)
I've just been prefixing the seed files with a number (like 10_my_seed_file.ts
), which seems to work fine.
from deno-nessie.
@halvardssm why not take the laravel approach, and the user create/define a base seeder class that runs the other seeders? for example from a php project:
<?php
// database/seeders/DatabaseSeeder.php
namespace Database\Seeds;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
// Run in this order
$this->call(A::class);
$this->call(B::class);
$this->call(C::class);
$this->call(D::class);
}
}
from deno-nessie.
I am inclined to the approach from @ebebbington but the question is then the implementation. I would say that the default behaviour should be the seed name in ascending order, and then an optional property in the config object (or a CLI flag) can give a path to a seed runner file. The only thing on my end which I am not too sure about is whether this should be a class or a function, but seeing as Nessie is fully class-based, we might as well continue on this path. I won't have time to implement this in the forseable future, so anyone are free to pick this up and send a PR :)
from deno-nessie.
Related Issues (20)
- [IDEA] Nessie Docker image HOT 2
- [IDEA]: Status command
- [IDEA]: Add sponsor notices
- [IDEA]: Consider removing the latest and next tag from docker image HOT 1
- [IDEA]: Add support for custom seed and migration template HOT 3
- [Bug]: Using nessie with import maps HOT 3
- [IDEA]: Restrict permissions in README HOT 3
- [IDEA]: Add foundation when creating a seed or migration and remove raw imports HOT 5
- [IDEA]: Use a deps file for imports in config HOT 4
- [Bug]: Argument of type 'string | URL' is not assignable to parameter of type 'string'. HOT 2
- [Bug]: NessieConfig not found HOT 3
- [IDEA]: Mariadb example HOT 2
- [Bug]: Seed database HOT 1
- [IDEA]: Add support for cockroachdb HOT 3
- [Bug]: mysql dependency breaks after new deno_std release 0.160.1 HOT 3
- [Docs]: Remove jsdoc comment about `exposeQueryBuilder` HOT 1
- [Bug]: hash no longer in 1.27.0 of deo HOT 3
- Future of Nessie HOT 2
- [Bug]: god crypto error HOT 3
- [Bug]: TypeError: Module not found "https://deno.land/std/hash/mod.ts". HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deno-nessie.