Linux · April 27, 2016 0

Magento database table column types

const TYPE_BOOLEAN          = 'boolean';
const TYPE_SMALLINT         = 'smallint';
const TYPE_INTEGER          = 'integer';
const TYPE_BIGINT           = 'bigint';
const TYPE_FLOAT            = 'float';
const TYPE_NUMERIC          = 'numeric';
const TYPE_DECIMAL          = 'decimal';
const TYPE_DATE             = 'date';
const TYPE_TIMESTAMP        = 'timestamp'; // Capable to support date-time from 1970 + auto-triggers in some RDBMS
const TYPE_DATETIME         = 'datetime'; // Capable to support long date-time before 1970
const TYPE_TEXT             = 'text';
const TYPE_BLOB             = 'blob'; // Used for back compatibility, when query param can't use statement options
const TYPE_VARBINARY        = 'varbinary'; // A real blob, stored as binary inside DB

// Deprecated column types, support is left only in MySQL adapter.
const TYPE_TINYINT          = 'tinyint';        // Internally converted to TYPE_SMALLINT
const TYPE_CHAR             = 'char';           // Internally converted to TYPE_TEXT
const TYPE_VARCHAR          = 'varchar';        // Internally converted to TYPE_TEXT
const TYPE_LONGVARCHAR      = 'longvarchar';    // Internally converted to TYPE_TEXT
const TYPE_CLOB             = 'cblob';          // Internally converted to TYPE_TEXT
const TYPE_DOUBLE           = 'double';         // Internally converted to TYPE_FLOAT
const TYPE_REAL             = 'real';           // Internally converted to TYPE_FLOAT
const TYPE_TIME             = 'time';           // Internally converted to TYPE_TIMESTAMP
const TYPE_BINARY           = 'binary';         // Internally converted to TYPE_BLOB
const TYPE_LONGVARBINARY    = 'longvarbinary';  // Internally converted to TYPE_BLOB