From 5632f151076618f64fb84a223431fe5edf77a022 Mon Sep 17 00:00:00 2001 From: ahwelp Date: Wed, 15 Apr 2020 23:17:15 +0000 Subject: [PATCH] Update 'src/Schema/Wrapper.php' --- src/Schema/Wrapper.php | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/Schema/Wrapper.php b/src/Schema/Wrapper.php index f4a5d74..1157489 100755 --- a/src/Schema/Wrapper.php +++ b/src/Schema/Wrapper.php @@ -9,6 +9,31 @@ use Schema\Db\Adapter\MysqlAdapter; use Schema\Db\Adapter\SQLiteAdapter; 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{ private static $_instance; @@ -82,4 +107,4 @@ class Wrapper{ $instance->_driver->exec($sql); } -} \ No newline at end of file +}