Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
IESA Install Setup
<?php
try {
$installer = $this;
$installer->startSetup();
// Create quote table
$tableName = $installer->getTable('iesa_quote/quote');
if (!$installer->tableExists($tableName)) {
$table = $conn->newTable($tableName);
$table
->addColumn('quote_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, [
'identity' => true,
'unsigned' => true,
'nullable' => false,
'primary' => true,
], 'quote ID')
->addColumn('content', Varien_Db_Ddl_Table::TYPE_VARCHAR, 1000, [
'nullable' => true,
], 'quote content')
->addColumn('author', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, [
'nullable' => true,
], 'quote author')
->addColumn('created_at', Varien_Db_Ddl_Table::TYPE_DATETIME, null, [
'nullable' => false,
], 'Creation date')
;
$conn->createTable($table);
}
$installer->endSetup();
} catch (Exception $e) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment