Closed (duplicate)
Project:
Default Content
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2016 at 10:26 UTC
Updated:
24 Mar 2023 at 11:41 UTC
Jump to comment: Most recent
Comments
Comment #2
idebr commentedComment #3
larowlanMy first thoughts
Comment #4
benjy commentedIt's not a bad idea but I don't think Migrate will make things much better for this module:
Comment #5
sam152 commentedThis has come up before, I've left my thoughts on it here. They key issue I can see is that migrate isn't at all concerned with exporting content, the current approach can import AND export with very little effort.
Comment #6
fgmWe have a process similar to this one on multiple sites:
We run this after deploying the install profile, as it allows deploying different data sets on different environments, like an anonymized reduced data set for developers outside the EU (privacy laws) or CI platforms, no data at all or only some entities (dev workstations), or the full data set (prod/preprod replication).
The big reasons for migrate are the ability to rollback, perform imports on demand, either in deploy or update mode, and most importantly, handle just about any volume of data thanks to batching, which this module does not use currently.
Comment #7
nedjoFor migrate, there is a parallel D8 project, Migrate Default Content. Effort towards a migrate-based default content solution can concentrate there.
Comment #8
ressaJust leaving a comment for those who don't need to export content, but looking for a way to create nodes and terms, for example for content during development, in which case Drupal core module Migrate offers an alternative solution.
There is a great ressource at https://understanddrupal.com/migrations, and with Migrate module, a custom module with three files is all that is needed to create nodes and terms--not connected in this example, though that is of course possible (code taken from ud_migrations_first and ud_migrations_multivalue_terms):
ud_migrations_first.info.yml
udm_first.yml
udm_first_terms.yml
File structure: