Skip to content

Commit

Permalink
New Backend Integration for Adonis JS (#546)
Browse files Browse the repository at this point in the history
Adding [Adonis JS](https://github.com/adonisjs) integration under
backends.

A Framework by [Harminder Virk](https://github.com/thetutlage)
  • Loading branch information
hackerrahul authored Oct 11, 2023
1 parent 0ef13aa commit 3c949bc
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/integrations/backend/adonis.md
Original file line number Diff line number Diff line change
@@ -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")
}

}

```

0 comments on commit 3c949bc

Please sign in to comment.