# Platformatic v0.17.0 - Config file changes, a Schema Store, and a new upgrade command

Hi Folks,

We are shipping Platformatic v0.17.0 this week with a significant update: we are streamlining our configuration files to better support custom plugins.

**Full Changelog**: https://github.com/platformatic/platformatic/releases/tag/v0.17.0

## New `plugins` configuration option

We have greatly streamlined the `plugin` option and reduced the number of possible variations. Before this could be a string, an array or an object:

```json
{
  "plugin": {
    "path": "plugin.ts",
    "typescript": {
      "outDir": "dist"
    }
  }
}
```

The new `plugins` option only supports an object, like so:

```json
{
  "plugins": {
    "paths": ["plugin.ts"],
    "typescript": true
  }
}
```

`paths` could also be an array if you need to specify options for the plugin:

```json
{
  "plugins": {
    "paths": [{
      "path": "plugin.ts"
      "options": { "foo": "bar" }
    }],
    "typescript": true
  }
}
```

Note that the output directory is loaded from `tsconfig.json` directly.

This feature was implemented in [#727](https://github.com/platformatic/platformatic/pull/727).

## Schema Store

If you ever used the `create-platformatic` utility to start a new project, it would have added a `$schema` property at the top of the JSON file to be used for autocompletion:

```json
{
  "$schema": "./platformatic.db.schema.json",
 ...
}
```

Then, you could have run a local command to generate that file (and to keep it up-to-date). Now, this is not needed anymore as all configuration schemas are available online at:

```json
{
  "$schema": "https://platformatic.dev/schemas/v0.17.0/db"
 ...
}
```

This file is automatically published to the web by our GitHub actions automation.

This change was implemented in [#742](https://github.com/platformatic/platformatic/pull/742) and [#744](https://github.com/platformatic/platformatic/pull/744).

## `plt upgrade`

We have added a new command: `platformatic upgrade` (or `plt upgrade` with the shortcut). This new command automatically brings the configuration of your project to the latest version.

Use this command to upgrade from Platformatic v0.16.0 to v0.17.0.

This change was implemented on [#753](https://github.com/platformatic/platformatic/pull/753).

## New Guide: how to use Prisma and Platformatic together

[@ruheni](https://github.com/ruheni) contributed a guide on how to combine Prisma with Platformatic in [#682](https://github.com/platformatic/platformatic/pull/682). In fact, it's possible to use Prisma to create custom routes too:

```javascript
const prismaPlugin = requrie("@sabinthedev/fastify-prisma")
module.exports = async (app) => {
  app.log.info('plugin loaded')
  
  app.register(prismaPlugin)
  
  /** 
   * Plugin logic
   */
  app.put('/post/:id/views', async (req, reply) => {
    const { id } = req.params
    
    const post = await app.prisma.post.update({
      where: {
        id: Number(id)
      },
      data: {
        viewCount: {
          increment: 1
        }
      }
    })
    
    return post
  })
}
```

## License check

One of the most crucial things in an Open Source project is licensing. Platformatic is released licensed as Apache-2.0. However what about its dependencies? We can now guarantee that all its production dependencies are licensed as [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html), [MIT](https://spdx.org/licenses/MIT.html), [ISC](https://spdx.org/licenses/MIT.html), or [BSD-2-Clause](https://spdx.org/licenses/BSD-2-Clause.html).

Ths automation was added in [#750](https://github.com/platformatic/platformatic/pull/750) via the old-but-faithful [`license-checker`](https://npm.im/license-checker) module.

## Under pressure

* Expose the all options from `@fastify/under-pressure` in the Platformatic configuration by [@salesh](https://github.com/salesh) in [#725](https://github.com/platformatic/platformatic/pull/725)

## Bug fixes

* Update platformatic package and project READMEs by [@simonplend](https://github.com/simonplend) in https://github.com/platformatic/platformatic/pull/730
* Feat/types/generate better get schema return by [@marccremer](https://github.com/marccreme) in https://github.com/platformatic/platformatic/pull/728
* doc: add removing welcome page guide on deployment by [@RafaelGSS](https://github.com/RafaelGSS) in https://github.com/platformatic/platformatic/pull/745
* Update CONTRIBUTING instructions by [@rozzilla](https://github.com/rozzilla) in https://github.com/platformatic/platformatic/pull/751
* Fix GraphQL subscriptions on save and delete by [@rozzilla](https://github.com/rozzilla) in https://github.com/platformatic/platformatic/pull/756




