v0.0.0 Initial Commit
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Schema;
|
||||
|
||||
class SqlServerBuilder extends Builder
|
||||
{
|
||||
/**
|
||||
* Create a database in the schema.
|
||||
*
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function createDatabase($name)
|
||||
{
|
||||
return $this->connection->statement(
|
||||
$this->grammar->compileCreateDatabase($name, $this->connection)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop a database from the schema if the database exists.
|
||||
*
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function dropDatabaseIfExists($name)
|
||||
{
|
||||
return $this->connection->statement(
|
||||
$this->grammar->compileDropDatabaseIfExists($name)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop all tables from the database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function dropAllTables()
|
||||
{
|
||||
$this->connection->statement($this->grammar->compileDropAllForeignKeys());
|
||||
|
||||
$this->connection->statement($this->grammar->compileDropAllTables());
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop all views from the database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function dropAllViews()
|
||||
{
|
||||
$this->connection->statement($this->grammar->compileDropAllViews());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user