PHP Classes

File: phptricksORM/Command/Templates/alter.template

Recommend this page to a friend!
  Classes of mohammad anzawi   PHP PDO database class   phptricksORM/Command/Templates/alter.template   Download  
File: phptricksORM/Command/Templates/alter.template
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP PDO database class
Access databases using PDO
Author: By
Last change:
Date: 3 years ago
Size: 534 bytes
 

Contents

Class file image Download
<?php

require_once 'vendor/autoload.php';

use
PHPtricks\Orm\Builder;
class {%
CLASS_NAME%} extends Builder
{
    protected
$_table = '{%TABLE_NAME%}';

    public function
run()
    {
        return
$this->alterSchema(['add', 'column_name', 'column_name'])->alter();
       
// return $this->alterSchema(['rename', 'column_name', 'new_column_name' ,'type'])->alter();
        // return $this->alterSchema(['modify', 'column_name', 'new_type'])->alter();
        // return $this->alterSchema(['drop', 'column_name'])->alter();
   
}
}