Update spotify connection

This commit is contained in:
2022-01-17 16:51:49 +01:00
parent 9e822ba674
commit f02635b83c
13 changed files with 130 additions and 88 deletions

View File

@@ -4,10 +4,11 @@ export default class SpotifySongsHistory extends BaseSchema {
protected tableName = 'spotify_songs_history'
public async up() {
this.schema.alterTable(this.tableName, (table) => {
table.timestamp('date').primary()
this.schema.createTable(this.tableName, (table) => {
table.timestamp('date').primary().unique().defaultTo(this.now())
table.string('device_name').notNullable()
table.string('device_type').notNullable()
table.string('item_id').notNullable()
table.string('item_name').notNullable()
table.string('item_type').notNullable()
table.string('author').notNullable()