Skip to content

Instantly share code, notes, and snippets.

@edrdesigner
Created July 7, 2017 18:37
Show Gist options
  • Save edrdesigner/964793e959ff95eb3691d9ef3537acaa to your computer and use it in GitHub Desktop.
Save edrdesigner/964793e959ff95eb3691d9ef3537acaa to your computer and use it in GitHub Desktop.
Magento Varien 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment