Skip to content

Commit 100adb2

Browse files
authored
docs: clarify migration commands for testing plugins (#3336)
1 parent 34cf27a commit 100adb2

File tree

1 file changed

+19
-5
lines changed
  • docs/docs/guides/developer-guide/plugins

1 file changed

+19
-5
lines changed

docs/docs/guides/developer-guide/plugins/index.mdx

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -621,13 +621,27 @@ export const config: VendureConfig = {
621621
};
622622
```
623623

624-
### Test the plugin
624+
### Test the Plugin
625625

626-
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:
626+
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.
627627

628-
```bash
629-
npm run migration:generate wishlist-plugin
630-
```
628+
1. **Generate the Migration File**
629+
630+
Run the following command to generate a migration file for the `wishlist-plugin`:
631+
632+
```bash
633+
npx vendure migrate wishlist-plugin
634+
```
635+
636+
When prompted, select the "Generate a new migration" option. This will create a new migration file in the `src/migrations` folder.
637+
638+
2. **Run the Migration**
639+
640+
After generating the migration file, apply the changes to the database by running the same command again:
641+
642+
```bash
643+
npx vendure migrate wishlist-plugin
644+
```
631645

632646
Then start the server:
633647

0 commit comments

Comments
 (0)