mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Handle Versioned implementations that do not have stages
This commit is contained in:
parent
2d1d2aea79
commit
9559cb2eda
@ -331,8 +331,11 @@ class DatabaseAdmin extends Controller
|
||||
$updateQueries = [sprintf($updateQuery, '')];
|
||||
|
||||
// Remap versioned table ClassName values as well
|
||||
if (singleton($newClassName)->has_extension(Versioned::class)) {
|
||||
$class = singleton($newClassName);
|
||||
if ($class->has_extension(Versioned::class)) {
|
||||
if ($class->hasStages()) {
|
||||
$updateQueries[] = sprintf($updateQuery, '_Live');
|
||||
}
|
||||
$updateQueries[] = sprintf($updateQuery, '_Versions');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user