mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-31 03:48:03 +01:00
@@ -11,7 +11,7 @@ export default class GuestbookMessages extends BaseSchema {
|
|||||||
.unsigned()
|
.unsigned()
|
||||||
.references('users.id')
|
.references('users.id')
|
||||||
.onDelete('CASCADE')
|
.onDelete('CASCADE')
|
||||||
table.string('message')
|
table.text('message')
|
||||||
table.timestamps(true, true)
|
table.timestamps(true, true)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
|
|
||||||
|
|
||||||
export default class GuestbookMessages extends BaseSchema {
|
|
||||||
protected tableName = 'guestbook_messages'
|
|
||||||
|
|
||||||
public async up() {
|
|
||||||
await this.schema.table(this.tableName, (table) => {
|
|
||||||
table.text('message')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
public async down() {
|
|
||||||
await this.schema.table(this.tableName, (table) => {
|
|
||||||
table.dropColumn('message')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user