Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9ea4f2c
Add migrations:
Jul 20, 2023
1092b84
Start work on Firebase docs
PineappleIOnic Jul 31, 2023
7e10cc9
Did some formatting
Jul 31, 2023
a76e1ea
Added instructions for setup to include adding platforms
Aug 2, 2023
b4fb738
Add docs for cloud to local and visa-versa
PineappleIOnic Aug 2, 2023
573755c
Fix cloud -> local
Aug 3, 2023
b844531
Complete appwrite->appwrite guides
Aug 4, 2023
46ffc50
Add NHost and Supabase Docs
PineappleIOnic Aug 15, 2023
7d7c029
update index to have all pages
Aug 15, 2023
fc5ba40
Fix ordered list tags and headings
Aug 15, 2023
4b51858
Fix migrations index
Aug 15, 2023
3b7d63e
Fix language in migration guides for firebase, supabase, and nhost
Aug 15, 2023
1819b32
Fixed code tags in local to cloud page
Aug 15, 2023
7d3c347
Merge Bradley's PR into mine!
Aug 15, 2023
30bc686
Fix titles in index
Aug 15, 2023
1b974fe
Fix missing ul tag in index
Aug 15, 2023
fd8e391
Don't use images and emojis for Appwrite migration docs
Aug 22, 2023
e6f2aac
Reformat support table to be in overview
Aug 22, 2023
7de3dd7
Instead of not support, call it manual
Aug 22, 2023
1d465e5
Change partial to yellow
Aug 22, 2023
2b868da
Add alot more details around service account key creation
PineappleIOnic Aug 24, 2023
3596659
Merge branch 'feat-migration' into feat-migration-bradley
PineappleIOnic Aug 24, 2023
f7fe08e
Update app/views/docs/migrations-firebase.phtml
Aug 24, 2023
255224e
Update app/views/docs/migrations-firebase.phtml
Aug 24, 2023
d33d223
Update app/views/docs/migrations-firebase.phtml
Aug 24, 2023
6f67e62
Update app/views/docs/migrations-firebase.phtml
Aug 24, 2023
124826a
fix some style and grammar
Aug 24, 2023
d782600
Merge pull request #420 from appwrite/feat-migration-bradley
Aug 24, 2023
eaa9683
Update app/views/docs/migrations-supabase.phtml
Aug 24, 2023
f6dff91
Update app/views/docs/migrations-cloud-to-local.phtml
Aug 25, 2023
5430008
Update app/views/docs/migrations-cloud-to-local.phtml
Aug 25, 2023
635ee8d
Update app/views/docs/migrations-cloud-to-local.phtml
Aug 25, 2023
47dd217
Update app/views/docs/migrations-cloud-to-local.phtml
Aug 25, 2023
3cdd52d
Update app/views/docs/migrations-cloud-to-local.phtml
Aug 25, 2023
98f2b36
Update app/views/docs/migrations-cloud-to-local.phtml
Aug 25, 2023
0960769
Update app/views/docs/migrations-local-to-cloud.phtml
Aug 25, 2023
b8d7caf
Update app/views/docs/migrations-local-to-cloud.phtml
Aug 25, 2023
d21952e
Update app/views/docs/migrations-local-to-cloud.phtml
Aug 25, 2023
d186876
Update app/views/docs/migrations-local-to-cloud.phtml
Aug 25, 2023
3b6ca9a
Update app/views/docs/migrations-local-to-cloud.phtml
Aug 25, 2023
70d285e
Update app/views/docs/migrations-local-to-cloud.phtml
Aug 25, 2023
7051886
Update app/views/docs/migrations.phtml
Aug 25, 2023
645eb61
Update app/views/docs/migrations.phtml
Aug 25, 2023
6ddde09
Update app/views/docs/migrations-nhost.phtml
Aug 25, 2023
7e06a30
Update app/views/docs/migrations-supabase.phtml
Aug 25, 2023
bf58e0f
Update app/views/docs/migrations-firebase.phtml
Aug 25, 2023
2e5216e
Resolve conflicts with upstream
Aug 25, 2023
eb9d20a
Address matej's comments
Aug 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/views/docs/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ $cols = [
</ul>
</li>
<li><a href="/docs/functions">Functions</a></li>
<li>
<a href="/docs/migrations"><i class="icon-right-dir"></i> Migrations</a>
<ul class="margin-top-small margin-bottom-small">
<li>&nbsp;&nbsp;<a href="/docs/migrations-firebase" data-selected="/docs/migrations"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> Firebase</a></li>
<li>&nbsp;&nbsp;<a href="/docs/migrations-supabase" data-selected="/docs/migrations"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> Supabase</a></li>
<li>&nbsp;&nbsp;<a href="/docs/migrations-nhost" data-selected="/docs/migrations"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> NHost</a></li>
<li>&nbsp;&nbsp;<a href="/docs/migrations-cloud-to-self-hosted" data-selected="/docs/migrations"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> Cloud to Self-hosted</a></li>
<li>&nbsp;&nbsp;<a href="/docs/migrations-self-hosted-to-cloud" data-selected="/docs/migrations"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> Self-hosted to Cloud</a></li>
</ul>
</li>
</ul>

<div class="margin-bottom-small">
Expand Down
34 changes: 34 additions & 0 deletions app/views/docs/migrations-cloud-to-local.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is called cloud-to-local, why not cloud-to-self-hosted? If you decide to change, make sure to also update all links here and in appwrite/homepage

If you're moving your projects from Appwrite Cloud to self-hosted, we've got you covered.
Migrations makes it as easy as a couple clicks to move all of your Appwrite Cloud project data to a self-hosted instance.
</p>

<h2><a href="#notices" id="notices">Things to keep in mind</a></h2>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>Data transferred by migrations will reset `$createdAt` and `$updatedAt` timestamps to the date of the migration.</li>
<li>Your self-hosted Appwrite project must be accessible from the internet for the migration to work.</li>
<li>Migrations are non-destructive. No data will be deleted or lost in the source project.</li>
</ol>

<h2><a href="#migrations-process" id="migrations-process">Migrating to Self-hosted from Cloud</a></h2>

<p>
To begin migrating to Appwrite Self-hosted, make sure to read the <a href="/docs/migrations">migrations overview</a>
and <a href="#notices">things to keep in mind</a> sections above.
</p>

<h3>Steps in Cloud Console</h3>
<ol class="margin-top margin-bottom-large text-size-normal">
<li>Navigate to your Appwrite Cloud Console and click on the <b>Migrations</b> tab in <b>Project Settings</b>.</li>
<li>Click <b>Export to Self-hosted</b>, you will be prompted to input the URL of your self-hosted Appwrite project.</li>
<li>Optionally, tell us about why you're moving to self-hosted.</li>
<li>After clicking <b>Continue</b>, you'll be redirected to your self-hosted project to complete the process.</li>
</ol>

<h3>Steps in Self-hosted Console</h3>
<ol class="margin-top margin-bottom-large text-size-normal">
<li>Once redirected to your self-hosted server, you'll be prompted to select a project. If you have multiple organizations, you will also be asked to pick one. You can migrate to an existing project or create a new one.</li>
<li>Select the data you wish to migrate. You can choose among accounts, databases, documents, files, and functions.</li>
<li>Click <b>Start migration</b> to begin the migration process. You do not need to keep the Appwrite Console open through the process.</li>
</ol>
34 changes: 34 additions & 0 deletions app/views/docs/migrations-cloud-to-self-hosted.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<p>
Moving to a self-hosted instance? We've got you covered.
Migrations makes it as easy as a couple clicks to move all of your Appwrite Cloud project data to a self-hosted instance.
</p>

<h2><a href="#notices" id="notices">Things to keep in mind</a></h2>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>Data transferred by migrations will reset `$createdAt` and `$updatedAt` timestamps to the date of the migration.</li>
<li>Your self-hosted Appwrite project must be accessible from the internet for the migration to work.</li>
<li>Migrations are non-destructive. No data will be deleted or lost in the source project.</li>
</ol>

<h2><a href="#migrations-process" id="migrations-process">Migrating to Self-hosted from Cloud</a></h2>

<p>
To begin migrating to Appwrite Self-hosted, make sure to read the <a href="/docs/migrations">migrations overview</a>
and <a href="#notices">things to keep in mind</a> sections above.
</p>

<h3>Steps on Your Cloud Project</h3>
<ol class="margin-top margin-bottom-large text-size-normal">
<li>Navigate to your Appwrite Cloud Console and click on the <b>Migrations</b> tab.</li>
<li>Click <b>Export to Self-hosted</b>, you will be prompted to input the URL of your self-hosted Appwrite project.</li>
<li>Optionally, tell us about why you're moving to self-hosted.</li>
<li>After clicking <b>Continue</b>, you'll be directed back to your self-hosted project to complete the process.</li>
</ol>

<h3>Steps on Your Self-hosted Project</h3>
<ol class="margin-top margin-bottom-large text-size-normal">
<li>Once redirected to your self-hosted project, you'll be prompted to select an organization and a project. You can migrate to an existing project or create a new one.</li>
<li>Select the data you wish to migrate. You can choose among accounts, databases, documents, files, and functions.</li>
<li>Click <b>Start migration</b> to start the migration process. You do not need to keep the Appwrite Console open through the process.</li>
</ol>
154 changes: 154 additions & 0 deletions app/views/docs/migrations-firebase.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure to merge my PR on firebase to add more information Project keys

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Moving your project from Firebase to Appwrite?
Appwrite Migrations can help you streamline the process.

Here's what you need to know to get started.
</p>

<h2><a href="#notices" id="notices">Things to keep in mind</a></h2>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>Appwrite will not incur usage charges during migrations, but Firebase may still incur service charges.</li>
<li>Appwrite Migrations only supports Firestore as a database source. Realtime Database is <b>currently not supported</b>.</li>
<li>At the moment only top level document migration is supported. Nested documents will not be migrated automatically.</li>
<li>OAuth users will not be migrated because the sessions are managed by the third-party OAuth provider. Users will need to re-authenticate with your OAuth provider after the migration is complete.</li>
<li>Functions are not automatically migrated because of syntax and runtime differences.</li>
</ol>

<h2><a href="#migration-process" id="migration-process">Migrating to Appwrite from Firebase</a></h2>
<p>
To begin migrating to Appwrite make sure to read the <a href="/docs/migrations">migration overview</a>
and <a href="#notices">things to keep in mind</a> sections above.
</p>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>
Create a new project and click on the <b>Migrations</b> tab in <b>Project Settings</b>.
</li>
<li>
Click on the <b>Create Migration</b> button and select <b>Firebase</b> as your source.
</li>
<li>
Navigate to your Firebase console.
</li>
<li>
Click the gear icon to access your <b>Project Settings</b>.
</li>
<li>
Click on <b>Service Accounts</b>, then click on the <b>Manage service account permissions</b> link redirecting you to the Google Cloud Console.
</li>
<li>
Click on <b>Create Service Account</b>, give it a name, id and description you want, then click <b>Continue</b>.
</li>
<li>
Next you'll be prompted to grant the service account roles. You need to grant the following roles.
</li>
<table class="full text-size-small">
<thead>
<tr>
<th>Role</th>
<th>Reason<br></th>
</tr>
</thead>
<tbody>
<tr>
<td>Firebase Viewer</td>
<td>Read access to your entire Firebase project including Database and Storage.<br></td>
</tr>
<tr>
<td>Identity Toolkit Viewer</td>
<td>Read access to your users including their hash config.<br></td>
</tr>
</tbody>
</table>
<li>If you prefer to create a custom role, you can use the following permissions.</li>
<table class="full text-size-small">
<thead>
<tr>
<th>Permission</th>
<th>Reason</th>
</tr>
</thead>
<tbody>
<tr>
<td>datastore.databases.get</td>
<td>Read access to your Firestore database.</td>
</tr>
<tr>
<td>datastore.databases.list</td>
<td>Read access to your Firestore database.</td>
</tr>
<tr>
<td>datastore.entities.get</td>
<td>Read access to your Firestore database's documents.</td>
</tr>
<tr>
<td>datastore.entities.list</td>
<td>Read access to your Firestore database's documents.</td>
</tr>
<tr>
<td>datastore.indexes.get</td>
<td>Read access to your Firestore database's indexes.</td>
</tr>
<tr>
<td>datastore.indexes.list</td>
<td>Read access to your Firestore database's indexes.</td>
</tr>
<tr>
<td>firebaseauth.configs.get</td>
<td>Read access to your Firebase project's authentication configs.</td>
</tr>
<tr>
<td>firebaseauth.configs.getHashConfig</td>
<td>Read access to your Firebase project's authentication configs including hash salt.</td>
</tr>
<tr>
<td>firebaseauth.configs.getSecret</td>
<td>Read access to your Firebase project's authentication configs including secret.</td>
</tr>
<tr>
<td>firebaseauth.users.get</td>
<td>Read access to your Firebase project's users.</td>
</tr>
<tr>
<td>identitytoolkit.tenants.get</td>
<td>Read access to your Firebase project's users.</td>
</tr>
<tr>
<td>identitytoolkit.tenants.list</td>
<td>Read access to your Firebase project's users.</td>
</tr>
<tr>
<td>storage.buckets.get</td>
<td>Read access to your Firebase project's storage buckets.</td>
</tr>
<tr>
<td>storage.buckets.list</td>
<td>Read access to your Firebase project's storage buckets.</td>
</tr>
<tr>
<td>storage.objects.get</td>
<td>Read access to your Firebase project's storage objects.</td>
</tr>
<tr>
<td>storage.objects.list</td>
<td>Read access to your Firebase project's storage objects.</td>
</tr>
</tbody>
</table>
<li>
Click <b>Done</b> to create the service account. After that you'll be redirected back to the service accounts page. Select the service account you just created and click <b>Keys</b>.
</li>
<li>
Click <b>Add Key</b> and select <b>Create new key</b>. Select <b>JSON</b> as the key type and click <b>Create</b>. This will download a JSON file to your computer.
</li>
<li>
Upload the JSON file to Appwrite and follow the migration wizard.
</li>
<li>
After completing the migration wizard, migration will begin. Return to step 4 of <a href="#migration-process">the migration steps</a>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cant see step 4 in this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll see it when it's rendered

</li>
<li>
Finally, add the platforms for your <a href="/docs/getting-started-for-web">Web</a>, <a href="getting-started-for-flutter/docs/getting-started-for-flutter">Flutter</a>, <a href="/docs/getting-started-for-android">Android</a>, and <a href="/docs/getting-started-for-apple">iOS</a> apps.
</li>
</ol>
38 changes: 38 additions & 0 deletions app/views/docs/migrations-local-to-cloud.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<p>
If you're moving your self-hosted projects to Appwrite Cloud, we've got your back.
Migrations makes it as easy as a couple clicks to move all of your self-hosted project data to a Cloud instance.
</p>

<h2><a href="#notices" id="notices">Things to keep in mind</a></h2>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>Data transferred by migrations will reset <code>$createdAt</code> and <code>$updatedAt</code> timestamps to the date of the migration.</li>
<li>Your self-hosted Appwrite project must be accessible from the internet for the migration to work.</li>
<li>Migrations are non-destructive. No data will be deleted or lost in the source project.</li>
</ol>

<h2><a href="#migration-process" id="migration-process">Migrating to Cloud from Self-hosted</a></h2>
<p>
To begin migrating to self-hosted, make sure to read the <a href="/docs/migrations">migration overview</a>
and <a href="#notices">things to keep in mind</a> sections above.
</p>

<h3>Steps in Self-hosted Console</h3>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>Navigate to your self-hosted project's console and click on the <b>Migrations</b> tab in <b>Project Settings</b>.</li>
<li>Click <b>Deploy to cloud</b>, and you will be redirected to Appwrite Cloud.</li>
<li>You will complete the migration on Appwrite Cloud.</li>
</ol>

<h3>Steps in Cloud Console</h3>
<ol class="margin-top margin-bottom-large text-size-normal">
<li>Once redirected to Appwrite Cloud, you'll be prompted to select a project. If you have multiple organizations, you will also be asked to pick one. You can migrate to an existing project or create a new one.</li>
<li>Select the data you wish to migrate. You can choose among accounts, databases, documents, files, and functions.</li>
<li>Click <b>Start migration</b> to start the migration process. You do not need to keep the Appwrite Console open through the process.</li>
</ol>

<div class="notice">
<h2>Keep in mind</h2>
<p>Your Self-hosted instance will generate a API Key in the background to pass to Cloud. You can revoke this key after the migration process is complete.</p>
</div>
64 changes: 64 additions & 0 deletions app/views/docs/migrations-nhost.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<p>
Moving your project from NHost to Appwrite?
Appwrite Migrations can help you streamline the process.

Here's what you need to know to get started.
</p>

<h2><a href="#notices" id="notices">Things to keep in mind</a></h2>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>Appwrite will not incur usage charges during migrations, but NHost may still incur service charges.</li>
<li>Appwrite's Database doesn't support all the features of the postgreSQL database so more advanced postgres centric things things like advanced indexes, postgres functions and scheduling will not be migrated.</li>
<li>OAuth users will not be migrated because the sessions are managed by the third-party OAuth provider. Users will need to re-authenticate with your OAuth provider after the migration is complete.</li>
<li>Functions are not automatically migrated because of syntax and runtime differences.</li>
</ol>

<h2><a href="#migration-process" id="migration-process">Migrating to Appwrite from NHost</a></h2>
<p>
To begin migrating to Appwrite make sure to read the <a href="/docs/migrations">migration overview</a>
and <a href="#notices">things to keep in mind</a> sections above.
</p>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>
Create a new project and click on the <b>Migrations</b> tab in <b>Project Settings</b>.
</li>
<li>
Click on the <b>Create Migration</b> button and select <b>NHost</b> as your source.
</li>
<li>
Enter the credentials following the <a href="#credentials">instructions below</a> and click <b>Next</b>.
</li>
<li>
Select the resources you want to migrate and finally click <b>Start migration</b> to begin the migration process.
</li>
<li>
Finally, add the platforms for your <a href="/docs/getting-started-for-web">Web</a>, <a href="getting-started-for-flutter/docs/getting-started-for-flutter">Flutter</a>, <a href="/docs/getting-started-for-android">Android</a>, and <a href="/docs/getting-started-for-apple">iOS</a> apps.
</li>
</ol>

<h3><a href="#credentials" id="credentials">NHost Credentials</a></h3>
<p>
Enter all the following credentials from your NHost project.
</p>
<ol class="margin-top margin-bottom-large text-size-normal">
<li>
<b>Region</b> - The region your NHost project is hosted in. This can be found in your NHost project environment variables as <b>NHOST_REGION</b>.
</li>
<li>
<b>Subdomain</b> - The subdomain of your NHost project. This can be found in your NHost project environment variables as <b>NHOST_SUBDOMAIN</b>.
</li>
<li>
<b>Database</b> - The name of your NHost database. This can be found in your NHost project Database settings.
</li>
<li>
<b>Username</b> - The username of your NHost database. This can be found in your NHost project Database settings.
</li>
<li>
<b>Password</b> - The password of your NHost database. You set this when you created your NHost project, if you don't remember it you can reset it from your NHost project Database settings.
</li>
<li>
<b>Admin Secret</b> - The admin secret of your NHost project. This can be found in your NHost project environment variables as <b>NHOST_ADMIN_SECRET</b>. We use this to transfer your NHost files to Appwrite.
</li>
</ol>
38 changes: 38 additions & 0 deletions app/views/docs/migrations-self-hosted-to-cloud.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<p>
Making the move to Appwrite Cloud? We've got your back.
Migrations makes it as easy as a couple clicks to move all of your self-hosted project data to a Cloud instance.
</p>

<h2><a href="#notices" id="notices">Things to keep in mind</a></h2>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>Data transferred by migrations will reset <code>$createdAt</code> and <code>$updatedAt</code> timestamps to the date of the migration.</li>
<li>Your self-hosted Appwrite project must be accessible from the internet for the migration to work.</li>
<li>Migrations are non-destructive. No data will be deleted or lost in the source project.</li>
</ol>

<h2><a href="#migration-process" id="migration-process">Migrating to Self-hosted from Cloud</a></h2>
<p>
To begin migrating to self-hosted, make sure to read the <a href="/docs/migrations">migration overview</a>
and <a href="#notices">things to keep in mind</a> sections above.
</p>

<h3>Steps on Your Self-hosted Project</h3>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>Navigate to your self-hosted project's console and click on the <b>Migrations</b> tab.</li>
<li>Click <b>Deploy to cloud</b>, you will be redirected to Appwrite Cloud.</li>
<li>You will complete the migration on Appwrite Cloud.</li>
</ol>

<h3>Steps on Your Cloud Project</h3>
<ol class="margin-top margin-bottom-large text-size-normal">
<li>Once redirected to Appwrite Cloud, you'll be prompted to select an organization and a project. You can migrate to an existing project or create a new one.</li>
<li>Select the data you wish to migrate. You can choose among accounts, databases, documents, files, and functions.</li>
<li>Click <b>Start migration</b> to start the migration process. You do not need to keep the Appwrite Console open through the process.</li>
</ol>

<div class="notice">
<h2>Keep in mind</h2>
<p>Your Self-hosted instance will generate a API Key in the background to pass to Cloud. You can revoke this key after the migration process is complete.</p>
</div>
Loading