Delete lines that duplicate removing the 'id' column from the migrating data query.

This commit is contained in:
Pavel Mironchik 2020-12-29 16:10:06 +06:00
parent 8eb020211f
commit ef5cb6475f

View File

@ -309,13 +309,6 @@ class Version210 extends Listener
return $column;
});
// Remove only primary keys
if (!in_array($new_table, ['document_items', 'documents'])) {
$selectColumns = $selectColumns->reject(function ($value) {
return $value === 'id';
});
}
$builder = DB::table($table)->selectRaw($selectColumns->implode(','))->limit($limit)->offset($offset);
while ($builder->cursor()->count()) {