Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wmfs/tymly-pg-plugin
https://github.com/wmfs/tymly-pg-plugin
plugin tymly
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wmfs/tymly-pg-plugin
- Owner: wmfs
- License: mit
- Created: 2018-06-12T09:59:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-27T21:06:44.000Z (4 months ago)
- Last Synced: 2024-10-13T14:54:55.052Z (4 months ago)
- Topics: plugin, tymly
- Language: JavaScript
- Size: 1.42 MB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# tymly-pg-plugin
[![Tymly Package](https://img.shields.io/badge/tymly-package-blue.svg)](https://tymly.io/)
[![npm (scoped)](https://img.shields.io/npm/v/@wmfs/tymly-pg-plugin.svg)](https://www.npmjs.com/package/@wmfs/tymly-pg-plugin)
[![CircleCI](https://circleci.com/gh/wmfs/tymly-pg-plugin.svg?style=svg)](https://circleci.com/gh/wmfs/tymly-pg-plugin)
[![codecov](https://codecov.io/gh/wmfs/tymly-pg-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/wmfs/tymly-pg-plugin)
[![CodeFactor](https://www.codefactor.io/repository/github/wmfs/tymly-pg-plugin/badge)](https://www.codefactor.io/repository/github/wmfs/tymly-pg-plugin)
[![Dependabot badge](https://img.shields.io/badge/Dependabot-active-brightgreen.svg)](https://dependabot.com/)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/wmfs/tymly-pg-plugin/blob/master/LICENSE)> Plugin for [TymlyJS](http://www.tymlyjs.io) that provides PostgreSQL persistence
## Install
```bash
$ npm install pg-info --save
```## Services
### Audit
The audit service allows Tymly to keep a history of change in records.If you do not want a model to keep a history of changes then add the flag ```"audit": false``` to it's json definition. Tymly will store this history in the 'rewind' model.
This service will pick up any file in the /pg-scripts directory of a blueprint with the following file naming convention:
```audit-{function-name}.sql``` where {function-name} is the name of your function.This function will then be applied to all models by default unless they have ```"audit":false```.
### Storage
Keeps storage of relevant blueprint objects and creates them in the database provided at PG_CONNECTION_STRING.Before running these tests, you'll need a test PostgreSQL database available and set a `PG_CONNECTION_STRING` environment variable to point to it, for example:
```PG_CONNECTION_STRING=postgres://postgres:postgres@localhost:5432/my_test_db```
```bash
$ npm test
```MIT