1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Updated activities table format

Renamed some columns to be more generic and applicable.
Removed now redundant book_id column.
Allowed nullable entity morph columns for non-entity activity.

Ran tests and made required changes.
This commit is contained in:
Dan Brown
2020-11-08 00:03:19 +00:00
parent ee7e1122d3
commit 712ccd23c4
12 changed files with 106 additions and 50 deletions

View File

@ -136,7 +136,7 @@ class RecycleBinTest extends TestCase
$deletion = $page->deletions()->firstOrFail();
$this->assertDatabaseHas('activities', [
'key' => 'page_delete',
'type' => 'page_delete',
'entity_id' => $page->id,
'entity_type' => $page->getMorphClass(),
]);
@ -144,16 +144,16 @@ class RecycleBinTest extends TestCase
$this->asAdmin()->delete("/settings/recycle-bin/{$deletion->id}");
$this->assertDatabaseMissing('activities', [
'key' => 'page_delete',
'type' => 'page_delete',
'entity_id' => $page->id,
'entity_type' => $page->getMorphClass(),
]);
$this->assertDatabaseHas('activities', [
'key' => 'page_delete',
'entity_id' => 0,
'entity_type' => '',
'extra' => $page->name,
'type' => 'page_delete',
'entity_id' => null,
'entity_type' => null,
'detail' => $page->name,
]);
}