mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-27 10:00:27 +01:00
24 lines
574 B
TypeScript
24 lines
574 B
TypeScript
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
|
|
|
|
export default class DeezerSongs extends BaseSchema {
|
|
protected tableName = 'deezer_songs'
|
|
|
|
public async up () {
|
|
this.schema.createTable(this.tableName, (table) => {
|
|
table.increments('id')
|
|
table.string('author')
|
|
table.string('title')
|
|
table.string('album')
|
|
table.string('type')
|
|
table.string('device')
|
|
table.integer('duration')
|
|
table.date('release_date')
|
|
table.timestamps(true)
|
|
})
|
|
}
|
|
|
|
public async down () {
|
|
this.schema.dropTable(this.tableName)
|
|
}
|
|
}
|