Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shagital/adonisjs-seeder-generator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shagital/adonisjs-seeder-generator

An AdonisJS (nodejs) package to generate seeder files from existing DB table data

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

AdonisJS Seeder Generator

npm npm (scoped) NPM

This package allows you easily generate seeder files for your AdonisJS app from existing Database table files!

Currently Supported

  • MySQL
  • SQLite
  • PostgreSQL

Installation

You can install the package via composer:

npm install @shagital/adonisjs-seeder-generator

Or with yarn

yarn add @shagital/adonisjs-seeder-generator

Usage

Open start/app.js and add @shagital/adonisjs-seeder-generator/src/Commands/SeederGeneratorCommand to the commands array

  • Note that you can replace the adonis with node ace if adonis is not installed globally on your system.
Basic usage

Will generate migration files for all tables in the DB set as default, and save files in database/seeds directory

adonis seed:generate
Specify tables to generate seeders for
adonis seed:generate  --include=table1,table2

Exclude specific tables

adonis seed:generate  --exclude=table1,table2

Specify DB connection to use

NOTE: Connection type must have been specified in config/databases

adonis seed:generate  --connection=mysql2

Save seeders files in specified path

NOTE: The package will attempt to create the specified directory if it doesn't exist

adonis seed:generate  --path=/var/www/html/backups

Truncate table before inserting.

This option is suitable for an application that hasn't gotten to production

#f03c15 NOTE: The table content will be wiped! ENSURE THE TABLE IS BACKED UP JUST IN CASE!!!

adonis seed:generate --force

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

If you have a feature you'd like to add, kindly send a Pull Request (PR)

Security

If you discover any security related issues, please email zacchaeus@shagital.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Keywords

FAQs

Package last updated on 23 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc