Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Commit

Permalink
Update civix.md
Browse files Browse the repository at this point in the history
Removed $ from bash commond, "$" makes problem while copying the command.
  • Loading branch information
PratikDevlekar authored May 29, 2020
1 parent 0ef3435 commit bb8a41f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/extensions/civix.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ If you want your extension to store data in the database, then you will need to
1. Generate the skeletal files

```bash
$ civix generate:entity MyEntity
civix generate:entity MyEntity
```

Make sure to use CamelCase here.
Expand All @@ -139,24 +139,25 @@ If you want your extension to store data in the database, then you will need to


```bash
$ civix generate:entity-boilerplate
civix generate:entity-boilerplate
```

You can safely re-run this command after you make changes to your XML schema definition. But if your schema changes require database migrations for existing installations, then you'll need to write a migration manually in addition to re-generating your boilerplate.

1. Generate a database upgrader.
1. Generate a da
tabase upgrader.

```bash
$ civix generate:upgrader
civix generate:upgrader
```

Even though you're not yet creating any upgrades for your extension, you need to do this step now so that CiviCRM will pick up `auto_install.sql` and `auto_uninstall.sql` later on.
1. Re-install your extension.
```bash
$ cv ext:uninstall myextension
$ cv ext:enable myextension
cv ext:uninstall myextension
cv ext:enable myextension
```
Now your entity should be ready to use. Try it out with `cv api MyEntity.create` and `cv api MyEntity.get`. Then [add some tests](#generate-test).
Expand Down

0 comments on commit bb8a41f

Please sign in to comment.