Solar_Sql_Adapter_MysqlReplicated::addColumn()

public mixed Solar_Sql_Adapter_MysqlReplicated::addColumn ( string $table , string $name , array $info )

Adds a portable column to a table in the database.

Inherited from Solar_Sql_Adapter.

Parameters

  • (string) $table: The table name (1-30 chars).

  • (string) $name: The column name to add (1-28 chars).

  • (array) $info: Information about the column.

Returns

  • (mixed)

Description

Adds a portable column to a table in the database.

The $info parameter should be in this format ...

<?php
$info = array(
    'type'    => (string) bool, char, int, ...
    'size'    => (int) total length for char|varchar|numeric
    'scope'   => (int) decimal places for numeric
    'default' => (bool) the default value, if any
    'require' => (bool) is the value required to be NOT NULL?
    'primary' => (bool) is this a primary key column?
    'autoinc' => (bool) is this an auto-increment column?
);


Local