/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Database/Schema/MySqlBuilder.php
58 строк
1 KB
Md. Al-Mosabbir Rakib
Tighten getCurrentSchemaListing @return in MySQL and SQLite builders (#59942)
30 апр 2026, 14:49
Не верифицирован
30 апр 2026, 14:49
64b3ab9
Код
Авторство
О чём код?
<?php namespace Illuminate\Database\Schema; class MySqlBuilder extends Builder { /** * Drop all tables from the database. * * @return void */ public function dropAllTables() { $tables = $this->getTableListing($this->getCurrentSchemaListing()); if (empty($tables)) { return; } $this->disableForeignKeyConstraints(); try { $this->connection->statement( $this->grammar->compileDropAllTables($tables) ); } finally { $this->enableForeignKeyConstraints(); } } /** * Drop all views from the database. * * @return void */ public function dropAllViews() { $views = array_column($this->getViews($this->getCurrentSchemaListing()), 'schema_qualified_name'); if (empty($views)) { return; } $this->connection->statement( $this->grammar->compileDropAllViews($views) ); } /** * Get the names of current schemas for the connection. * * @return string[] */ public function getCurrentSchemaListing() { return [$this->connection->getDatabaseName()]; } }