Skip to content

Commit 4187b06

Browse files
[11.x] Remove Database Deprecations (#49810)
* remove schema deprecations * formatting * force re-run tests
1 parent 7dcd191 commit 4187b06

18 files changed

+21
-477
lines changed

src/Illuminate/Database/Query/Processors/MySqlProcessor.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,6 @@
44

55
class MySqlProcessor extends Processor
66
{
7-
/**
8-
* Process the results of a column listing query.
9-
*
10-
* @deprecated Will be removed in a future Laravel version.
11-
*
12-
* @param array $results
13-
* @return array
14-
*/
15-
public function processColumnListing($results)
16-
{
17-
return array_map(function ($result) {
18-
return ((object) $result)->column_name;
19-
}, $results);
20-
}
21-
227
/**
238
* Process the results of a columns query.
249
*

src/Illuminate/Database/Query/Processors/PostgresProcessor.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,6 @@ public function processInsertGetId(Builder $query, $sql, $values, $sequence = nu
3030
return is_numeric($id) ? (int) $id : $id;
3131
}
3232

33-
/**
34-
* Process the results of a column listing query.
35-
*
36-
* @deprecated Will be removed in a future Laravel version.
37-
*
38-
* @param array $results
39-
* @return array
40-
*/
41-
public function processColumnListing($results)
42-
{
43-
return array_map(function ($result) {
44-
return ((object) $result)->column_name;
45-
}, $results);
46-
}
47-
4833
/**
4934
* Process the results of a types query.
5035
*

src/Illuminate/Database/Query/Processors/Processor.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,4 @@ public function processForeignKeys($results)
120120
{
121121
return $results;
122122
}
123-
124-
/**
125-
* Process the results of a column listing query.
126-
*
127-
* @deprecated Will be removed in a future Laravel version.
128-
*
129-
* @param array $results
130-
* @return array
131-
*/
132-
public function processColumnListing($results)
133-
{
134-
return $results;
135-
}
136123
}

src/Illuminate/Database/Query/Processors/SQLiteProcessor.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,6 @@
44

55
class SQLiteProcessor extends Processor
66
{
7-
/**
8-
* Process the results of a column listing query.
9-
*
10-
* @deprecated Will be removed in a future Laravel version.
11-
*
12-
* @param array $results
13-
* @return array
14-
*/
15-
public function processColumnListing($results)
16-
{
17-
return array_map(function ($result) {
18-
return ((object) $result)->name;
19-
}, $results);
20-
}
21-
227
/**
238
* Process the results of a columns query.
249
*

src/Illuminate/Database/Query/Processors/SqlServerProcessor.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,6 @@ protected function processInsertGetIdForOdbc(Connection $connection)
5555
return is_object($row) ? $row->insertid : $row['insertid'];
5656
}
5757

58-
/**
59-
* Process the results of a column listing query.
60-
*
61-
* @deprecated Will be removed in a future Laravel version.
62-
*
63-
* @param array $results
64-
* @return array
65-
*/
66-
public function processColumnListing($results)
67-
{
68-
return array_map(function ($result) {
69-
return ((object) $result)->name;
70-
}, $results);
71-
}
72-
7358
/**
7459
* Process the results of a columns query.
7560
*

src/Illuminate/Database/Schema/Builder.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -206,20 +206,6 @@ public function getTypes()
206206
throw new LogicException('This database driver does not support user-defined types.');
207207
}
208208

209-
/**
210-
* Get all of the table names for the database.
211-
*
212-
* @deprecated Will be removed in a future Laravel version.
213-
*
214-
* @return array
215-
*
216-
* @throws \LogicException
217-
*/
218-
public function getAllTables()
219-
{
220-
throw new LogicException('This database driver does not support getting all tables.');
221-
}
222-
223209
/**
224210
* Determine if the given table has a given column.
225211
*

src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,6 @@ public function compileDropDatabaseIfExists($name)
6666
);
6767
}
6868

69-
/**
70-
* Compile the query to determine the list of tables.
71-
*
72-
* @deprecated Will be removed in a future Laravel version.
73-
*
74-
* @return string
75-
*/
76-
public function compileTableExists()
77-
{
78-
return "select * from information_schema.tables where table_schema = ? and table_name = ? and table_type = 'BASE TABLE'";
79-
}
80-
8169
/**
8270
* Compile the query to determine the tables.
8371
*
@@ -111,42 +99,6 @@ public function compileViews($database)
11199
);
112100
}
113101

114-
/**
115-
* Compile the SQL needed to retrieve all table names.
116-
*
117-
* @deprecated Will be removed in a future Laravel version.
118-
*
119-
* @return string
120-
*/
121-
public function compileGetAllTables()
122-
{
123-
return 'SHOW FULL TABLES WHERE table_type = \'BASE TABLE\'';
124-
}
125-
126-
/**
127-
* Compile the SQL needed to retrieve all view names.
128-
*
129-
* @deprecated Will be removed in a future Laravel version.
130-
*
131-
* @return string
132-
*/
133-
public function compileGetAllViews()
134-
{
135-
return 'SHOW FULL TABLES WHERE table_type = \'VIEW\'';
136-
}
137-
138-
/**
139-
* Compile the query to determine the list of columns.
140-
*
141-
* @deprecated Will be removed in a future Laravel version.
142-
*
143-
* @return string
144-
*/
145-
public function compileColumnListing()
146-
{
147-
return 'select column_name as `column_name` from information_schema.columns where table_schema = ? and table_name = ?';
148-
}
149-
150102
/**
151103
* Compile the query to determine the columns.
152104
*

src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,6 @@ public function compileDropDatabaseIfExists($name)
6868
);
6969
}
7070

71-
/**
72-
* Compile the query to determine if a table exists.
73-
*
74-
* @deprecated Will be removed in a future Laravel version.
75-
*
76-
* @return string
77-
*/
78-
public function compileTableExists()
79-
{
80-
return "select * from information_schema.tables where table_catalog = ? and table_schema = ? and table_name = ? and table_type = 'BASE TABLE'";
81-
}
82-
8371
/**
8472
* Compile the query to determine the tables.
8573
*
@@ -121,44 +109,6 @@ public function compileTypes()
121109
."and n.nspname not in ('pg_catalog', 'information_schema')";
122110
}
123111

124-
/**
125-
* Compile the SQL needed to retrieve all table names.
126-
*
127-
* @deprecated Will be removed in a future Laravel version.
128-
*
129-
* @param string|array $searchPath
130-
* @return string
131-
*/
132-
public function compileGetAllTables($searchPath)
133-
{
134-
return "select tablename, concat('\"', schemaname, '\".\"', tablename, '\"') as qualifiedname from pg_catalog.pg_tables where schemaname in ('".implode("','", (array) $searchPath)."')";
135-
}
136-
137-
/**
138-
* Compile the SQL needed to retrieve all view names.
139-
*
140-
* @deprecated Will be removed in a future Laravel version.
141-
*
142-
* @param string|array $searchPath
143-
* @return string
144-
*/
145-
public function compileGetAllViews($searchPath)
146-
{
147-
return "select viewname, concat('\"', schemaname, '\".\"', viewname, '\"') as qualifiedname from pg_catalog.pg_views where schemaname in ('".implode("','", (array) $searchPath)."')";
148-
}
149-
150-
/**
151-
* Compile the query to determine the list of columns.
152-
*
153-
* @deprecated Will be removed in a future Laravel version.
154-
*
155-
* @return string
156-
*/
157-
public function compileColumnListing()
158-
{
159-
return 'select column_name from information_schema.columns where table_catalog = ? and table_schema = ? and table_name = ?';
160-
}
161-
162112
/**
163113
* Compile the query to determine the columns.
164114
*
@@ -510,18 +460,6 @@ public function compileDropAllDomains($domains)
510460
return 'drop domain '.implode(',', $this->escapeNames($domains)).' cascade';
511461
}
512462

513-
/**
514-
* Compile the SQL needed to retrieve all type names.
515-
*
516-
* @deprecated Will be removed in a future Laravel version.
517-
*
518-
* @return string
519-
*/
520-
public function compileGetAllTypes()
521-
{
522-
return 'select distinct pg_type.typname from pg_type inner join pg_enum on pg_enum.enumtypid = pg_type.oid';
523-
}
524-
525463
/**
526464
* Compile a drop column command.
527465
*

src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,6 @@ class SQLiteGrammar extends Grammar
2828
*/
2929
protected $serials = ['bigInteger', 'integer', 'mediumInteger', 'smallInteger', 'tinyInteger'];
3030

31-
/**
32-
* Compile the query to determine if a table exists.
33-
*
34-
* @deprecated Will be removed in a future Laravel version.
35-
*
36-
* @return string
37-
*/
38-
public function compileTableExists()
39-
{
40-
return "select * from sqlite_master where type = 'table' and name = ?";
41-
}
42-
4331
/**
4432
* Compile the query to determine the SQL text that describes the given object.
4533
*
@@ -92,43 +80,6 @@ public function compileViews()
9280
return "select name, sql as definition from sqlite_master where type = 'view' order by name";
9381
}
9482

95-
/**
96-
* Compile the SQL needed to retrieve all table names.
97-
*
98-
* @deprecated Will be removed in a future Laravel version.
99-
*
100-
* @return string
101-
*/
102-
public function compileGetAllTables()
103-
{
104-
return 'select type, name from sqlite_master where type = \'table\' and name not like \'sqlite_%\'';
105-
}
106-
107-
/**
108-
* Compile the SQL needed to retrieve all view names.
109-
*
110-
* @deprecated Will be removed in a future Laravel version.
111-
*
112-
* @return string
113-
*/
114-
public function compileGetAllViews()
115-
{
116-
return 'select type, name from sqlite_master where type = \'view\'';
117-
}
118-
119-
/**
120-
* Compile the query to determine the list of columns.
121-
*
122-
* @deprecated Will be removed in a future Laravel version.
123-
*
124-
* @param string $table
125-
* @return string
126-
*/
127-
public function compileColumnListing($table)
128-
{
129-
return 'pragma table_info('.$this->wrap(str_replace('.', '__', $table)).')';
130-
}
131-
13283
/**
13384
* Compile the query to determine the columns.
13485
*

src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,6 @@ public function compileDropDatabaseIfExists($name)
6666
);
6767
}
6868

69-
/**
70-
* Compile the query to determine if a table exists.
71-
*
72-
* @deprecated Will be removed in a future Laravel version.
73-
*
74-
* @return string
75-
*/
76-
public function compileTableExists()
77-
{
78-
return "select * from sys.sysobjects where id = object_id(?) and xtype in ('U', 'V')";
79-
}
80-
8169
/**
8270
* Compile the query to determine the tables.
8371
*
@@ -105,43 +93,6 @@ public function compileViews()
10593
.'order by name';
10694
}
10795

108-
/**
109-
* Compile the SQL needed to retrieve all table names.
110-
*
111-
* @deprecated Will be removed in a future Laravel version.
112-
*
113-
* @return string
114-
*/
115-
public function compileGetAllTables()
116-
{
117-
return "select name, type from sys.tables where type = 'U'";
118-
}
119-
120-
/**
121-
* Compile the SQL needed to retrieve all view names.
122-
*
123-
* @deprecated Will be removed in a future Laravel version.
124-
*
125-
* @return string
126-
*/
127-
public function compileGetAllViews()
128-
{
129-
return "select name, type from sys.objects where type = 'V'";
130-
}
131-
132-
/**
133-
* Compile the query to determine the list of columns.
134-
*
135-
* @deprecated Will be removed in a future Laravel version.
136-
*
137-
* @param string $table
138-
* @return string
139-
*/
140-
public function compileColumnListing($table)
141-
{
142-
return "select name from sys.columns where object_id = object_id('$table')";
143-
}
144-
14596
/**
14697
* Compile the query to determine the columns.
14798
*

0 commit comments

Comments
 (0)