mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 20:19:26 +01:00
19 lines
446 B
TypeScript
19 lines
446 B
TypeScript
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
|
|
|
|
export default class Subscribers extends BaseSchema {
|
|
protected tableName = 'subscribers'
|
|
|
|
public async up () {
|
|
this.schema.createTable(this.tableName, (table) => {
|
|
table.increments('id').primary()
|
|
table.string('name')
|
|
table.string('email').notNullable()
|
|
table.timestamps(true)
|
|
})
|
|
}
|
|
|
|
public async down () {
|
|
this.schema.dropTable(this.tableName)
|
|
}
|
|
}
|