Doctrine


Doctrine\DBAL\Schema\MsSqlSchemaManager
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 33

Class MsSqlSchemaManager

Class:MsSqlSchemaManager - Superclass: AbstractSchemaManager
AbstractSchemaManager
⌊ MsSqlSchemaManager

public class MsSqlSchemaManager
extends AbstractSchemaManager

xxx

License:
http://www.opensource.org/licenses/lgpl-license.php LGPL
Author:
Konsta Vesterinen
Lukas Smith (PEAR MDB2 library)
Version:
$Revision$
Since:
2.0

Fields inherited from Doctrine\DBAL\Schema\AbstractSchemaManager
_conn, _platform
Method Summary
void

alterTable(string name, array changes, boolean check, TableDiff tableDiff)

alter an existing table

void

createDatabase(string name, string database)

create a new database

void

createSequence(mixed seqName, mixed start, mixed allocationSize, Sequence sequence)

{@inheritdoc}

void

dropDatabase(string name, string database)

drop an existing database

void

dropSequenceSql(string seqName)

This function drops an existing sequence

array

listSequences(string|null database)

lists all database sequences

array

listTableColumns(string table)

lists table constraints

array

listTableIndexes(string table)

lists table constraints

array

listTableTriggers(string table)

lists table triggers

array

listTableViews(string table)

lists table views

array

listTables(string|null database)

lists tables

array

listTriggers(mixed database)

lists all triggers

array

listViews(string|null database)

lists database views

Methods inherited from Doctrine\DBAL\Schema\AbstractSchemaManager
alterTable, createConstraint, createDatabase, createForeignKey, createIndex, createSchema, createSchemaConfig, createSequence, createTable, createView, dropAndCreateConstraint, dropAndCreateDatabase, dropAndCreateForeignKey, dropAndCreateIndex, dropAndCreateSequence, dropAndCreateTable, dropAndCreateView, dropConstraint, dropDatabase, dropForeignKey, dropIndex, dropSequence, dropTable, dropView, getDatabasePlatform, listDatabases, listSequences, listTableColumns, listTableDetails, listTableForeignKeys, listTableIndexes, listTableNames, listTables, listViews, renameTable, tryMethod

Method Detail

/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 151

alterTable

public void alterTable(string name, array changes, boolean check, TableDiff tableDiff)

alter an existing table

Parameters:
name - name of the table that is intended to be changed.
changes - associative array that contains the details of each type of change that is intended to be performed. The types of changes that are currently supported are defined as follows: name New name for the table. add Associative array with the names of fields to be added as indexes of the array. The value of each entry of the array should be set to another associative array with the properties of the fields to be added. The properties of the fields should be the same as defined by the Metabase parser. remove Associative array with the names of fields to be removed as indexes of the array. Currently the values assigned to each entry are ignored. An empty array should be used for future compatibility. rename Associative array with the names of fields to be renamed as indexes of the array. The value of each entry of the array should be set to another associative array with the entry named name with the new field name and the entry named Declaration that is expected to contain the portion of the field declaration already in DBMS specific SQL code as it is used in the CREATE TABLE statement. change Associative array with the names of the fields to be changed as indexes of the array. Keep in mind that if it is intended to change either the name of a field and any other properties, the change array entries should have the new names of the fields as array indexes. The value of each entry of the array should be set to another associative array with the properties of the fields to that are meant to be changed as array entries. These entries should be assigned to the new values of the respective properties. The properties of the fields should be the same as defined by the Metabase parser. Example array( 'name' => 'userlist', 'add' => array( 'quota' => array( 'type' => 'integer', 'unsigned' => 1 ) ), 'remove' => array( 'file_limit' => array(), 'time_limit' => array() ), 'change' => array( 'name' => array( 'length' => '20', 'definition' => array( 'type' => 'text', 'length' => 20, ), ) ), 'rename' => array( 'sex' => array( 'name' => 'gender', 'definition' => array( 'type' => 'text', 'length' => 1, 'default' => 'M', ), ) ) )
check - indicates whether the function should just check if the DBMS driver can perform the requested table alterations if the value is true or actually perform them otherwise.

/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 41

createDatabase

public void createDatabase(string name, string database)

create a new database

Parameters:
name - name of the database that should be created

/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 196

createSequence

public void createSequence(mixed seqName, mixed start, mixed allocationSize, Sequence sequence)

Throws:
if something fails at database level

/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 58

dropDatabase

public void dropDatabase(string name, string database)

drop an existing database

Parameters:
name - name of the database that should be dropped

/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 224

dropSequenceSql

public void dropSequenceSql(string seqName)

This function drops an existing sequence

Parameters:
seqName - name of the sequence to be dropped

/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 235

listSequences

public array listSequences(string|null database)

lists all database sequences


/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 249

listTableColumns

public array listTableColumns(string table)

lists table constraints

Parameters:
table - database table name

/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 297

listTableIndexes

public array listTableIndexes(string table)

lists table constraints

Parameters:
table - database table name

/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 335

listTableTriggers

public array listTableTriggers(string table)

lists table triggers

Parameters:
table - database table name

/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 351

listTableViews

public array listTableViews(string table)

lists table views

Parameters:
table - database table name

/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 308

listTables

public array listTables(string|null database)

lists tables


/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 320

listTriggers

public array listTriggers(mixed database)

lists all triggers


/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 388

listViews

public array listViews(string|null database)

lists database views


Doctrine