Open rtrudel opened 3 weeks ago
If I may suggest: Adding a CLI command that would provide certain presets to simplify storage strategy management and make it easy to switch between different configurations.
The data:schema
command could help manage storage strategies for both content and structure:
# Predefined storage strategy presets
php please data:schema --preset=flat-file # Everything in files
php please data:schema --preset=database-only # Everything in database
php please data:schema --preset=hybrid-standard # Content in DB, structure in files
# Custom storage strategy configuration
php please data:schema --content=db --structure=file
# Granular repository configuration
php please data:schema --collections=file --entries=db --forms=db --taxonomies=file
This would:
The command could also provide helpful feedback about the implications of each change and ensure data integrity during transitions.
Good idea!
I think we can probably adjust the install:eloquent-driver
command (which is the CLI wizard you see) to ask what you want to move:
^ those options would also be available when creating new sites
We can also improve the existing documentation around the Eloquent Driver to mention content vs config repos to clarify what actually gets moved.
I believe indeed that what I call structure is named config here, but we're talking about the same thing :)
Since Statamic's default mode is flat-file, it could also be interesting to have a simple way to manage .gitignore
files if we wanted, for example, to keep everything without a database, while still ensuring that content remains independent between environments. This could also be kind of preset "flat-config" or something.
Since Statamic's default mode is flat-file, it could also be interesting to have a simple way to manage
.gitignore
files if we wanted, for example, to keep everything without a database, while still ensuring that content remains independent between environments. This could also be kind of preset "flat-config" or something.
That's probably a little opinionated for us to do in Core. As far as I know, most folks using flat file share the same content between sites.
However, you're more than welcome to do that in your own projects or create a starter kit that does that (although, that would be a very small kit 😄).
That's probably a little opinionated for us to do in Core. As far as I know, most folks using flat file share the same content between sites.
I understand the concern, and probably I just do not "get it", but I'm curious how a site would work when being modified by several developers working locally (so push/pull their changes without conflicts), while the site is in production and users or writers are modifying its content (ex: new articles, e-commerce orders, user comments and reviews, etc.). Why would we sync locally all the website content when only config matters on local environment? As I said, I'm just unsure to understand this bit, maybe the answer is very simple and I'm overcomplicating things...
That's probably a little opinionated for us to do in Core. As far as I know, most folks using flat file share the same content between sites.
I understand the concern, and probably I just do not "get it", but I'm curious how a site would work when being modified by several developers working locally (so push/pull their changes without conflicts), while the site is in production and users or writers are modifying its content (ex: new articles, e-commerce orders, user comments and reviews, etc.). Why would we sync locally all the website content when only config matters on local environment? As I said, I'm just unsure to understand this bit, maybe the answer is very simple and I'm overcomplicating things...
We often pull content down so we are working from the latest client content, especially when developing new functionality. You get around conflicts by using a branch other than main/master.
Context
When installing the eloquent package, users are presented with repository choices without clear explanations of their purposes. This is particularly challenging for users migrating from other CMS platforms (like Craft CMS, WordPress) where terminology and concepts may differ.
Current Issues
Proposed Improvements
1. Repository Documentation
2. Content vs Structure Classification
3. Content Synchronization Behaviors
4. Environment Management
.gitignore
configurations for:5. Migration Guide
6. Configuration Examples
Include practical examples for common setups:
Expected Benefits
Implementation Suggestions