PHP Classes

File: src/SQLTools/Command/AlterTable.php

Recommend this page to a friend!
  Classes of Rafael Lúcio   SQLTools   src/SQLTools/Command/AlterTable.php   Download  
File: src/SQLTools/Command/AlterTable.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: SQLTools
Create and alter databases, tables and indexes
Author: By
Last change: Update of src/SQLTools/Command/AlterTable.php
Date: 9 months ago
Size: 446 bytes
 

Contents

Class file image Download
<?php

namespace SQLTools\Command;


use
SQLTools\Base\AlterTableEnum;
use
SQLTools\Base\ICommand;

abstract class
AlterTable implements ICommand {

    protected
$table;
    protected
$changeType = AlterTableEnum::ADD;

    public function
getSql()
    {
        return
"ALTER TABLE " .
       
$this->table .
       
" {$this->changeType} " .
       
$this->getWhatToAdd() .
       
";";
    }

    abstract protected function
getWhatToAdd();
}