Skip to content

Commit

Permalink
Migration docs WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Mihovil Ilakovac <[email protected]>
  • Loading branch information
infomiho committed Sep 20, 2024
1 parent a2402cf commit d3af5e6
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Migration from 0.11.X to 0.12.X
---

import { EmailPill, UsernameAndPasswordPill, GithubPill, GooglePill } from "./auth/Pills";
import { EmailPill, UsernameAndPasswordPill, GithubPill, GooglePill } from "../auth/Pills";

:::note Migrating to the latest version

Expand Down Expand Up @@ -71,9 +71,9 @@ The main differences are:
no longer start with `@server` or `@client`.
- Your project now features a top-level `public` dir. Wasp will publicly serve
all the files it finds in this directory. Read more about it
[here](/project/static-assets.md).
[here](../project/static-assets.md).

Our [Overview docs](./tutorial/02-project-structure.md) explain the new
Our [Overview docs](../tutorial/02-project-structure.md) explain the new
structure in detail, while this page provides a [quick guide](#migrating-your-project-to-the-new-structure) for migrating existing
projects.

Expand Down Expand Up @@ -160,7 +160,7 @@ Auth field customization is no longer possible using the `_waspCustomValidations

:::

You can read more about the new auth system in the [Accessing User Data](./auth/entities) section.
You can read more about the new auth system in the [Accessing User Data](../auth/entities) section.

## How to Migrate?

Expand Down Expand Up @@ -597,7 +597,7 @@ You can follow these steps to migrate to the new auth system (assuming you alrea

If you want to properly type the `profile` object, we recommend you use a validation library like Zod to define the shape of the `profile` object.

Read more about this and the `defineUserSignupFields` function in the [Auth Overview - Defining Extra Fields](./auth/overview.md#1-defining-extra-fields) section.
Read more about this and the `defineUserSignupFields` function in the [Auth Overview - Defining Extra Fields](../auth/overview.md#1-defining-extra-fields) section.

</TabItem>
</Tabs>
Expand Down Expand Up @@ -693,7 +693,7 @@ Your app should be working correctly and using new auth, but to finish the migra

After doing the steps above successfully locally and making sure everything is working, it is time to push these changes to the deployed app again.

_Deploy the app again_, either via `wasp deploy` or manually. Check our [Deployment docs](advanced/deployment/overview.md) for more details.
_Deploy the app again_, either via `wasp deploy` or manually. Check our [Deployment docs](../advanced/deployment/overview.md) for more details.

The database migrations will automatically run on successful deployment of the server and delete the now redundant auth-related `User` columns from the database.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Follow the steps below to migrate:

If you are migrating a deployed app, you will need to define the `WASP_SERVER_URL` server env variable in your deployment environment.

Read more about setting env variables in production [here](./project/env-vars#defining-env-vars-in-production).
Read more about setting env variables in production [here](../project/env-vars#defining-env-vars-in-production).
:::

2. **Update the redirect URLs** for the OAuth providers
Expand All @@ -64,7 +64,7 @@ Follow the steps below to migrate:
</TabItem>
</Tabs>
Check the new redirect URLs for [Google](./auth/social-auth/google.md#3-creating-a-google-oauth-app) and [GitHub](./auth/social-auth/github.md#3-creating-a-github-oauth-app) in Wasp's docs.
Check the new redirect URLs for [Google](../auth/social-auth/google.md#3-creating-a-google-oauth-app) and [GitHub](../auth/social-auth/github.md#3-creating-a-github-oauth-app) in Wasp's docs.
3. **Update the `configFn`** for the OAuth providers
Expand Down Expand Up @@ -129,7 +129,7 @@ Follow the steps below to migrate:
</TabItem>
</Tabs>
Wasp now directly forwards what it receives from the OAuth providers. You can check the data format for [Google](./auth/social-auth/google.md#data-received-from-google) and [GitHub](./auth/social-auth/github.md#data-received-from-github) in Wasp's docs.
Wasp now directly forwards what it receives from the OAuth providers. You can check the data format for [Google](../auth/social-auth/google.md#data-received-from-google) and [GitHub](../auth/social-auth/github.md#data-received-from-github) in Wasp's docs.
That's it!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ All that's left to do is migrate the database.
To avoid type errors, it's best to take care of database migrations after you've migrated the rest of the code.
So, just keep reading, and we will remind you to migrate the database as [the last step of the migration guide](#migrate-the-database).

Read more about the [Prisma Schema File](./data-model/prisma-file.md) and how Wasp uses it to generate the database schema and Prisma client.
Read more about the [Prisma Schema File](../data-model/prisma-file.md) and how Wasp uses it to generate the database schema and Prisma client.

### Migrate how you access user auth fields

Expand Down Expand Up @@ -659,8 +659,8 @@ wasp db migrate-dev

This command generates the Prisma client based on the `schema.prisma` file.

Read more about the [Prisma Schema File](./data-model/prisma-file.md) and how Wasp uses it to generate the database schema and Prisma client.
Read more about the [Prisma Schema File](../data-model/prisma-file.md) and how Wasp uses it to generate the database schema and Prisma client.

That's it!

You should now be able to run your app with the new Wasp 0.14.0. We recommend reading through the updated [Accessing User Data](./auth/entities/entities.md) section to get a better understanding of the new API.
You should now be able to run your app with the new Wasp 0.14.0. We recommend reading through the updated [Accessing User Data](../auth/entities/entities.md) section to get a better understanding of the new API.
40 changes: 40 additions & 0 deletions web/docs/migration-guides/migrate-from-0-14-to-0-15.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Migration from 0.14.X to 0.15.X
---

## What's new in 0.15.0?

### TS SDK for Wasp (preview)

TODO: write this section

### Prisma 5

TODO: write this section

### React Router 6

TODO: write this section

## How to migrate?

To migrate your app to Wasp 0.15.x, you must:

1. Bump the version in `main.wasp` ...

### Bump the version

Let's start with something simple. Update the version field in your Wasp file to `^0.15.0`:

```wasp title="main.wasp"
app MyApp {
wasp: {
// highlight-next-line
version: "^0.15.0"
},
}
```

That's it!

You should now be able to run your app with the new Wasp 0.15.0.
8 changes: 6 additions & 2 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 16 additions & 12 deletions web/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
{
type: 'link',
label: 'Examples',
href: 'https://github.com/wasp-lang/wasp/tree/release/examples'
href: 'https://github.com/wasp-lang/wasp/tree/release/examples',
},
{
type: 'category',
Expand All @@ -50,7 +50,7 @@ module.exports = {
},
'data-model/crud',
'data-model/backends',
'data-model/prisma-file'
'data-model/prisma-file',
],
},
{
Expand All @@ -76,7 +76,7 @@ module.exports = {
],
},
'auth/entities/entities',
'auth/auth-hooks'
'auth/auth-hooks',
],
},
{
Expand Down Expand Up @@ -139,18 +139,22 @@ module.exports = {
},
{
type: 'category',
label: 'Miscellaneous',
collapsed: false,
label: 'Migration guides',
collapsed: true,
collapsible: true,
items: [
'contributing',
'telemetry',
'vision',
'contact',
'migrate-from-0-11-to-0-12',
'migrate-from-0-12-to-0-13',
'migrate-from-0-13-to-0-14'
'migration-guides/migrate-from-0-14-to-0-15',
'migration-guides/migrate-from-0-13-to-0-14',
'migration-guides/migrate-from-0-12-to-0-13',
'migration-guides/migrate-from-0-11-to-0-12',
],
},
{
type: 'category',
label: 'Miscellaneous',
collapsed: true,
collapsible: true,
items: ['contributing', 'telemetry', 'vision', 'contact'],
},
],
}

0 comments on commit d3af5e6

Please sign in to comment.