Update 'src/Schema/Wrapper.php'
This commit is contained in:
+26
-1
@@ -9,6 +9,31 @@ use Schema\Db\Adapter\MysqlAdapter;
|
|||||||
use Schema\Db\Adapter\SQLiteAdapter;
|
use Schema\Db\Adapter\SQLiteAdapter;
|
||||||
use Schema\Db\Adapter\SqlServerAdapter;
|
use Schema\Db\Adapter\SqlServerAdapter;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @gt Wrapper::get_table('table');
|
||||||
|
* @gt Wrapper::exec('table');
|
||||||
|
*
|
||||||
|
* @gt $table->addColumn('column', 'type', $options = array());
|
||||||
|
* @gt $table->addColumn('column', 'string', $options = array( 'null' => true, 'default' => '' ) );
|
||||||
|
* @gt $table->addColumn('column', 'integer', $options = array( 'null' => true, 'default' => 0 ) );
|
||||||
|
* @gt $table->addColumn('column', 'text', $options = array( 'null' => true, 'default'=> '' ) );
|
||||||
|
* @gt $table->hasColumn('column');
|
||||||
|
*
|
||||||
|
* @gt $table->addTimestamps();
|
||||||
|
* @gt $table->addTimestamps('created_at', 'updated_at');
|
||||||
|
* @gt $table->addSoftDelete();
|
||||||
|
* @gt $table->addSoftDelete($deletedAtColumnName = 'deleted_at');
|
||||||
|
*
|
||||||
|
* @gt $table->addSoftDelete();
|
||||||
|
* @gt $table->removeColumn('column');
|
||||||
|
* @gt $table->renameColumn('column', 'newName');
|
||||||
|
* @gt $table->changeColumn('column', 'type', $options = array());
|
||||||
|
*
|
||||||
|
* @gt $table->addForeignKey(Array('column'), 'remoteTable', Array('remoteColumn'), $options = array());
|
||||||
|
* @gt $table->addIndex($columns, $options = array());
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
class Wrapper{
|
class Wrapper{
|
||||||
|
|
||||||
private static $_instance;
|
private static $_instance;
|
||||||
@@ -82,4 +107,4 @@ class Wrapper{
|
|||||||
$instance->_driver->exec($sql);
|
$instance->_driver->exec($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user