diff --git a/docs/integrations/backend/adonis.md b/docs/integrations/backend/adonis.md new file mode 100644 index 0000000000..84fea6d7a0 --- /dev/null +++ b/docs/integrations/backend/adonis.md @@ -0,0 +1,31 @@ +--- +title: AdonisJS +description: >- + A fully featured web framework for Node.js +sidebar_position: 71 +--- + +## Migrations + +Use the [`raw` method on the `Schema Builder`](https://docs.adonisjs.com/reference/database/schema-builder#raw). + +First, create a migration: + +```shell +node ace make:migration electrify_items +``` + +Then use `this.schema.raw` in the `up` function: + +```javascript +import BaseSchema from '@ioc:Adonis/Lucid/Schema' + +export default class extends BaseSchema { + + public async up () { + this.schema.raw("ALTER TABLE items ENABLE ELECTRIC") + } + +} + +```