Browse Source

Merge pull request #1150 from franzliedke/patch-40

Get rid of duplicate code for DROP TABLE in schema grammars.
Taylor Otwell 11 years ago
parent
commit
b061b9b21c

+ 12 - 0
laravel/database/schema/grammars/grammar.php

@@ -50,6 +50,18 @@ abstract class Grammar extends \Laravel\Database\Grammar {
 		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.
 	 *

+ 0 - 12
laravel/database/schema/grammars/mysql.php

@@ -224,18 +224,6 @@ class MySQL extends Grammar {
 		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.
 	 *

+ 0 - 12
laravel/database/schema/grammars/postgres.php

@@ -210,18 +210,6 @@ class Postgres extends Grammar {
 		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.
 	 *

+ 0 - 12
laravel/database/schema/grammars/sqlite.php

@@ -213,18 +213,6 @@ class SQLite extends Grammar {
 		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.
 	 *

+ 0 - 12
laravel/database/schema/grammars/sqlserver.php

@@ -224,18 +224,6 @@ class SQLServer extends Grammar {
 		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.
 	 *