Skip to content

Commit

Permalink
docs: clarify migration commands for testing plugins (#3336)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpplumber authored Feb 1, 2025
1 parent 34cf27a commit 100adb2
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions docs/docs/guides/developer-guide/plugins/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -621,13 +621,27 @@ export const config: VendureConfig = {
};
```

### Test the plugin
### Test the Plugin

Now that the plugin is installed, we can test it out. Since we have defined a custom field, we'll need to generate and run a migration to add the new column to the database:
Now that the plugin is installed, we can test it out. Since we have defined a custom field, we'll need to generate and run a migration to add the new column to the database.

```bash
npm run migration:generate wishlist-plugin
```
1. **Generate the Migration File**

Run the following command to generate a migration file for the `wishlist-plugin`:

```bash
npx vendure migrate wishlist-plugin
```

When prompted, select the "Generate a new migration" option. This will create a new migration file in the `src/migrations` folder.

2. **Run the Migration**

After generating the migration file, apply the changes to the database by running the same command again:

```bash
npx vendure migrate wishlist-plugin
```

Then start the server:

Expand Down

0 comments on commit 100adb2

Please sign in to comment.