Skip to content

Commit cd72b60

Browse files
fix: try for postgres
1 parent 2802d55 commit cd72b60

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/BackupTablesService.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,15 @@ protected function backupTablesForForMysqlAndMariaDb($newTableName, $table): arr
135135

136136
protected function backupTablesForForPostgres($newTableName, $table)
137137
{
138-
dd('postgres');
138+
DB::statement(/**@lang PostgreSQL**/ "CREATE TABLE $newTableName AS SELECT * FROM $table");
139139

140+
$newCreatedTables[] = $newTableName;
141+
$response[] = " Table '$table' cloned successfully.";
142+
143+
return [
144+
'response' => $response,
145+
'newCreatedTables' => $newCreatedTables,
146+
];
140147
}
141148

142149
protected function backupTablesForForSqlServer($newTableName, $table)

0 commit comments

Comments
 (0)