Back

Database Migrations from Code?

  • 0
  • Self Hosted
  • Web
Lorenz
2 Jun, 2024, 11:15

There is a whole section for migrations in the docs https://appwrite.io/docs/advanced/migrations.

But is it possible to create common migrations to get your collections on appwrite created?

For example I create myself a starter kit in which I want to define some tables(collections) that I always need. Can I create a migration or a template to create those tables instantly when creating a new repo and connecting it with a new appwrite project?

TL;DR
Developers can perform database migrations using the Appwrite CLI by defining the structure in the appwrite.json file. A dedicated section in the documentation covers migrations at https://appwrite.io/docs/advanced/migrations. To create common migrations for frequently needed collections, consider making a starter kit with tables already defined for instant creation when connecting a new repo to an Appwrite project.
D5
2 Jun, 2024, 11:18

You can do that with the appwrite CLI by defining the structure in the appwrite.json file

Lorenz
2 Jun, 2024, 11:27

@D5 thanks, is there a docs article for that?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more