Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
e11d13ae
Commit
e11d13ae
authored
Aug 27, 2012
by
Franz Liedke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of duplicate code for DROP TABLE in schema grammars.
parent
bc34498a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
48 deletions
+12
-48
grammar.php
laravel/database/schema/grammars/grammar.php
+12
-0
mysql.php
laravel/database/schema/grammars/mysql.php
+0
-12
postgres.php
laravel/database/schema/grammars/postgres.php
+0
-12
sqlite.php
laravel/database/schema/grammars/sqlite.php
+0
-12
sqlserver.php
laravel/database/schema/grammars/sqlserver.php
+0
-12
No files found.
laravel/database/schema/grammars/grammar.php
View file @
e11d13ae
...
@@ -50,6 +50,18 @@ abstract class Grammar extends \Laravel\Database\Grammar {
...
@@ -50,6 +50,18 @@ abstract class Grammar extends \Laravel\Database\Grammar {
return
$sql
;
return
$sql
;
}
}
/**
* Generate the SQL statement for a drop table command.
*
* @param Table $table
* @param Fluent $command
* @return string
*/
public
function
drop
(
Table
$table
,
Fluent
$command
)
{
return
'DROP TABLE '
.
$this
->
wrap
(
$table
);
}
/**
/**
* Drop a constraint from the table.
* Drop a constraint from the table.
*
*
...
...
laravel/database/schema/grammars/mysql.php
View file @
e11d13ae
...
@@ -224,18 +224,6 @@ class MySQL extends Grammar {
...
@@ -224,18 +224,6 @@ class MySQL extends Grammar {
return
'RENAME TABLE '
.
$this
->
wrap
(
$table
)
.
' TO '
.
$this
->
wrap
(
$command
->
name
);
return
'RENAME TABLE '
.
$this
->
wrap
(
$table
)
.
' TO '
.
$this
->
wrap
(
$command
->
name
);
}
}
/**
* Generate the SQL statement for a drop table command.
*
* @param Table $table
* @param Fluent $command
* @return string
*/
public
function
drop
(
Table
$table
,
Fluent
$command
)
{
return
'DROP TABLE '
.
$this
->
wrap
(
$table
);
}
/**
/**
* Generate the SQL statement for a drop column command.
* Generate the SQL statement for a drop column command.
*
*
...
...
laravel/database/schema/grammars/postgres.php
View file @
e11d13ae
...
@@ -210,18 +210,6 @@ class Postgres extends Grammar {
...
@@ -210,18 +210,6 @@ class Postgres extends Grammar {
return
'ALTER TABLE '
.
$this
->
wrap
(
$table
)
.
' RENAME TO '
.
$this
->
wrap
(
$command
->
name
);
return
'ALTER TABLE '
.
$this
->
wrap
(
$table
)
.
' RENAME TO '
.
$this
->
wrap
(
$command
->
name
);
}
}
/**
* Generate the SQL statement for a drop table command.
*
* @param Table $table
* @param Fluent $command
* @return string
*/
public
function
drop
(
Table
$table
,
Fluent
$command
)
{
return
'DROP TABLE '
.
$this
->
wrap
(
$table
);
}
/**
/**
* Generate the SQL statement for a drop column command.
* Generate the SQL statement for a drop column command.
*
*
...
...
laravel/database/schema/grammars/sqlite.php
View file @
e11d13ae
...
@@ -213,18 +213,6 @@ class SQLite extends Grammar {
...
@@ -213,18 +213,6 @@ class SQLite extends Grammar {
return
'ALTER TABLE '
.
$this
->
wrap
(
$table
)
.
' RENAME TO '
.
$this
->
wrap
(
$command
->
name
);
return
'ALTER TABLE '
.
$this
->
wrap
(
$table
)
.
' RENAME TO '
.
$this
->
wrap
(
$command
->
name
);
}
}
/**
* Generate the SQL statement for a drop table command.
*
* @param Table $table
* @param Fluent $command
* @return string
*/
public
function
drop
(
Table
$table
,
Fluent
$command
)
{
return
'DROP TABLE '
.
$this
->
wrap
(
$table
);
}
/**
/**
* Generate the SQL statement for a drop unique key command.
* Generate the SQL statement for a drop unique key command.
*
*
...
...
laravel/database/schema/grammars/sqlserver.php
View file @
e11d13ae
...
@@ -224,18 +224,6 @@ class SQLServer extends Grammar {
...
@@ -224,18 +224,6 @@ class SQLServer extends Grammar {
return
'ALTER TABLE '
.
$this
->
wrap
(
$table
)
.
' RENAME TO '
.
$this
->
wrap
(
$command
->
name
);
return
'ALTER TABLE '
.
$this
->
wrap
(
$table
)
.
' RENAME TO '
.
$this
->
wrap
(
$command
->
name
);
}
}
/**
* Generate the SQL statement for a drop table command.
*
* @param Table $table
* @param Fluent $command
* @return string
*/
public
function
drop
(
Table
$table
,
Fluent
$command
)
{
return
'DROP TABLE '
.
$this
->
wrap
(
$table
);
}
/**
/**
* Generate the SQL statement for a drop column command.
* Generate the SQL statement for a drop column command.
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment