Connect Athena to Spotify

This commit is contained in:
2022-01-15 19:35:43 +01:00
parent f6070b20ee
commit 240fcbac90
23 changed files with 684 additions and 99 deletions

View File

@@ -0,0 +1,22 @@
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
export default class SpotifySongsHistory extends BaseSchema {
protected tableName = 'spotify_songs_history'
public async up() {
this.schema.alterTable(this.tableName, (table) => {
table.timestamp('date').primary()
table.string('device_name').notNullable()
table.string('device_type').notNullable()
table.string('item_name').notNullable()
table.string('item_type').notNullable()
table.string('author').notNullable()
table.string('image').notNullable()
table.bigInteger('duration').notNullable()
})
}
public async down() {
this.schema.dropTable(this.tableName)
}
}