This commit is contained in:
2021-08-12 12:09:56 +02:00
parent 97ee726d04
commit 4ed8b644a9
2 changed files with 4 additions and 4 deletions

View File

@@ -5,13 +5,13 @@ export default class Projects extends BaseSchema {
public async up () {
this.schema.table(this.tableName, (table) => {
table.integer('cover_id').unsigned().references('files.id').onDelete('CASCADE')
table.integer('file_id').unsigned().references('files.id').onDelete('CASCADE')
})
}
public async down () {
this.schema.table(this.tableName, (table) => {
table.dropColumn('cover_id')
table.dropColumn('file_id')
})
}
}

View File

@@ -9,12 +9,12 @@ export default class Announces extends BaseSchema {
table.string('color')
table.string('hover_color')
table
.integer('message_id')
.integer('translation_id')
.unsigned()
.references('translations.id')
.onDelete('CASCADE')
table
.integer('cover_id')
.integer('file_id')
.unsigned()
.references('files.id')
.onDelete('CASCADE')