How can I replicate the structure and attributes in different databases in the same project.
Ex: Database 01: [client collection]: {name, age, address}
replicate to existing database 02 that contains the following attribute
Database 02: [client collection]:{name, age}
Summary
User is asking how to replicate a structure and attributes in different databases within the same project in Appwrite. They mention that there is no native support for this, but it can be done using the Appwrite CLI. Another user provides a script on GitHub to automate the deployment process. The original poster marks the thread as solved.
Christy Jacob
Mar 10, 2023, 15:44
unfortunately there is no support for it natively, however you could hack your way to get it done using the Appwrite CLI
rafagazani
Rank 3: Container
Mar 10, 2023, 16:04
Hey guys!. building a structure to create my projects due to this limitation, helps me a lot mainly in the development stage, I will share an example in git for you. It's nothing magnificent but it helps me a lot
I added it to login the appwrite cli and the automatic deployment of the functions that are inside the function folder, I hope it will be useful for you
rafagazani
Rank 3: Container
Mar 10, 2023, 21:49
@wilStark43 can we Mark it as solved?
rafagazani
Rank 3: Container
Mar 10, 2023, 21:50
If you have any questions about how to use it, I'm at your disposal.
wilStark43
Rank 1: Thread
Mar 10, 2023, 22:30
Rafa, thank you for your attention! The script is very useful for creating new collections, my goal is to go developing and in case I need to update some new attribute do this cascade into other existing databases.
rafagazani
Rank 3: Container
Mar 10, 2023, 23:18
I'm happy to help, just put the variables in env.py that it takes care of creating. I added the treatments to check if each item already exists, if not, it solves it
rafagazani
Rank 3: Container
Mar 10, 2023, 23:21
in my case I have more than one appwrite on different servers. deploying it was a lot of work, you had to log out through the cli, then log in to the other server and then be able to deploy.
With this script I just need to put the env and it does what it needs
rafagazani
Rank 3: Container
Mar 10, 2023, 23:22
If you think this solved your problem. mark it with [SOLVED]