6

kerrialn/static-data-importer-bundle - Packagist

 2 years ago
source link: https://packagist.org/packages/kerrialn/static-data-importer-bundle
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

kerrialn/static-data-importer-bundle

v1.0.4

2022-08-17 20:46 UTC

MIT a594a6f4f9521f833e9c39af1c63bf8425ca9438

This package is auto-updated.

Last update: 2022-08-18 07:44:55 UTC


README

A Symfony CLI Bundle for importing json, csv and/or xml directly into a database via an entity object.

Install:

composer require kerrialn/static-data-importer-bundle

Configure: add json, xml or csv files to ./data (name this anything you want) root directory in your project

  1. File naming convention {order number}_{entity name}.{format} Eg... 10_Blog.json, 20_category.csv or 30_User.xml (entity name is case-insensitive)
  2. Change the import order, with the order number in the file name.
  3. Add _SKIP (case-sensitive) to the filename to skip the file.

Run:

bin/console import data/

Please note: id fields will be ignored and will generate id as per your entity annotation/attribute definition.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK