Grammars
2 years ago
Blueprint.php
2 years ago
Builder.php
2 years ago
ColumnDefinition.php
2 years ago
ForeignIdColumnDefinition.php
2 years ago
ForeignKeyDefinition.php
2 years ago
MySqlBuilder.php
2 years ago
MySqlSchemaState.php
2 years ago
PostgresBuilder.php
2 years ago
PostgresSchemaState.php
2 years ago
SQLiteBuilder.php
2 years ago
SchemaState.php
2 years ago
SqlServerBuilder.php
2 years ago
SqliteSchemaState.php
2 years ago
SqlServerBuilder.php
48 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP_SCOPED\Illuminate\Database\Schema; |
| 4 | |
| 5 | /** @internal */ |
| 6 | class SqlServerBuilder extends Builder |
| 7 | { |
| 8 | /** |
| 9 | * Create a database in the schema. |
| 10 | * |
| 11 | * @param string $name |
| 12 | * @return bool |
| 13 | */ |
| 14 | public function createDatabase($name) |
| 15 | { |
| 16 | return $this->connection->statement($this->grammar->compileCreateDatabase($name, $this->connection)); |
| 17 | } |
| 18 | /** |
| 19 | * Drop a database from the schema if the database exists. |
| 20 | * |
| 21 | * @param string $name |
| 22 | * @return bool |
| 23 | */ |
| 24 | public function dropDatabaseIfExists($name) |
| 25 | { |
| 26 | return $this->connection->statement($this->grammar->compileDropDatabaseIfExists($name)); |
| 27 | } |
| 28 | /** |
| 29 | * Drop all tables from the database. |
| 30 | * |
| 31 | * @return void |
| 32 | */ |
| 33 | public function dropAllTables() |
| 34 | { |
| 35 | $this->connection->statement($this->grammar->compileDropAllForeignKeys()); |
| 36 | $this->connection->statement($this->grammar->compileDropAllTables()); |
| 37 | } |
| 38 | /** |
| 39 | * Drop all views from the database. |
| 40 | * |
| 41 | * @return void |
| 42 | */ |
| 43 | public function dropAllViews() |
| 44 | { |
| 45 | $this->connection->statement($this->grammar->compileDropAllViews()); |
| 46 | } |
| 47 | } |
| 48 |