directus-labs / directus-template-cli

Apply "templates" to a new, empty Directus project.
MIT License
85 stars 15 forks source link

Add V11 Compatibility #61

Open bryantgillespie opened 2 months ago

bryantgillespie commented 2 months ago

Currently the CLI doesn't work with V11 because of the new database migrations to support access policies.

arladmin commented 2 months ago

@bryantgillespie

Could you suggest a workaround, for the meanwhile, to duplicate entire projects (Schema + Data)?

bryantgillespie commented 2 months ago

@bryantgillespie

Could you suggest a workaround, for the meanwhile, to duplicate entire projects (Schema + Data)?

Just taking a snapshot or dump of the entire database and then restoring it would probably be the simplest one. Might be to copy assets over as well if you're hosting those locally vs S3 (or S3 compatible storage).

There's a few other community built solutions for migrating / syncing schema and data from one instance to another if you search here on GH or within the Directus Discord community. No idea if they support V11 at this time or not though.

arladmin commented 2 months ago

Is there any roadmap for this?

bryantgillespie commented 2 months ago

Is there any roadmap for this?

For this individual project directus-template-cli? For Directus itself?

Add V11 support is on the docket for this tool but I can't provide any ETA. Hopefully soon though.

arladmin commented 2 months ago

@bryantgillespie

For this individual project directus-template-cli? For Directus itself?

For adding V11 support to this tool.


Do note: so far, this was the primary (official) method to share Directus Projects (as templates), which is particularly required for use-cases where sharing Custom Directus projects is part of one's profession.

alexvdvalk commented 2 months ago

I've done some updates here https://github.com/directus-labs/directus-template-cli/tree/v11-updates which still needs some testing.

Templates to be updated shortly.

you can continue to use this tool by loading up directus v10, loading the template, and then updating the directus version to the lastest. This will run the required migration scripts.

arladmin commented 2 months ago

@alexvdvalk

you can continue to use this tool by loading up directus v10, loading the template, and then updating the directus version to the lastest. This will run the required migration scripts.

That's only for projects that are still on v1, right? (Currently, all of my projects are already on v11) 🫤

alexvdvalk commented 2 months ago

We're adding support for extracting and loading v11 projects