Microfeed relies on Cloudflare's D1 database to store metadata. If you set up a Microfeed instance last year or earlier, it's likely running on the D1 alpha version. Recently, Cloudflare announced plans to discontinue and eventually delete databases created with D1 alpha. To keep your existing Microfeed instances functioning, migration from the alpha to the production version of D1 is necessary.
This guide will walk you through the process of migrating your Microfeed D1 alpha database to the production version.
Cloudflare has sent out notifications regarding the depreciation and subsequent deletion of D1 alpha databases. This announcement necessitates action from our users to prevent any loss of functionality.
Migrating your database involves two primary steps:
The migration process begins with creating a copy of your current database:
With the SQL dump ready, proceed to set up a new D1 production database:
Reconfigure your Microfeed instance to connect to the new database:
1) Update your codebase: Ensure your Microfeed fork is up-to-date on GitHub.
2) Set a new environment secret: Add the D1_DATABASE_NAME secret on GitHub with the name of your new D1 database (<new_database_name>).
3) Deploy changes: Re-deploy your Microfeed instance by triggering the deploy GitHub action.
After migration, create an unlisted item in your Microfeed admin panel to verify that the new item appears in the new D1 database. This test confirms that the migration was successful.
Unfortunately, Cloudflare does not provide a one-click solution for this migration. However, following these detailed steps should guide you through the process smoothly. If you encounter any issues or have questions, please reach out to us at support@microfeed.com. We're here to help ensure your transition is as seamless as possible.