Skip to content

Instantly share code, notes, and snippets.

@jacquesbh
Created April 7, 2017 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacquesbh/63cce35802b45130b5d0eff07026e0db to your computer and use it in GitHub Desktop.
Save jacquesbh/63cce35802b45130b5d0eff07026e0db to your computer and use it in GitHub Desktop.
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