https://github.com/pyramation/detect-indexes-example-test
https://github.com/pyramation/detect-indexes-example-test
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/pyramation/detect-indexes-example-test
- Owner: pyramation
- Created: 2018-09-29T17:14:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-29T20:41:16.000Z (over 7 years ago)
- Last Synced: 2025-03-13T02:03:51.200Z (about 1 year ago)
- Language: JavaScript
- Size: 78.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# start the postgres db process
First you'll want to create the postgres-plv8 docker (you can also just use `docker-compose up -d`):
```sh
make up
```
# install modules
If you can, do `skitch install`, otherwise:
```sh
yarn install
```
# install the Postgres extensions
Now that the postgres process is running, install the extensions:
```sh
make install
```
This basically `ssh`s into the postgres instance with the `packages/` folder mounted as a volume, and installs the bundled sql code as pgxn extensions.
# testing
Testing will load all your latest sql changes and create fresh, populated databases for each sqitch module in `packages/`.
```sh
yarn test:watch
```
# deploy code as extensions
`cd` into `packages/`, and run `skitch package`. This will make an sql file in `packages//sql/` used for `CREATE EXTENSION` calls to install your sqitch module as an extension.
# recursive deploy
You can also deploy all modules utilizing versioning as sqtich modules. Remove `--createdb` if you already created your db:
```sh
skitch deploy awesome-db --yes --recursive --createdb
```
# building new modules
Create a new folder in `packages/`
```sh
skitch init
```
Then, run a generator:
```sh
skitch generate
```
You can also add arguments if you already know what you want to do:
```sh
skitch generate schema --schema myschema
skitch generate table --schema myschema --table mytable
```