Skip to content

Instantly share code, notes, and snippets.

@NoelDavies
Created December 6, 2012 17:11
Show Gist options
  • Save NoelDavies/4226191 to your computer and use it in GitHub Desktop.
Save NoelDavies/4226191 to your computer and use it in GitHub Desktop.
<?php
$objSQL->queryBuilder()
->createTable('#__blocks')
->addColumn('id', array(
'type' => 'int',
'length' => 10,
'null' => false,
'auto_inc' => true
))
->addColumn('uniqueid', array(
'type' => 'varchar',
'length' => 10,
'null' => false
))
->addColumn('title', array(
'type' => 'varchar',
'length' => 255,
'null' => false
))
->addColumn('name', array(
'type' => 'varchar',
'length' => 255,
'null' => false,
))
->addColumn('location', array(
'type' => 'varchar',
'length' => 255,
'null' => false
))
->addColumn('order', array(
'type' => 'int',
'length' => 10,
'null' => false
))
->addColumn('enabled', array(
'type' => 'set',
'values' => array('0', '1'),
'null' => false,
'default' => '0'
))
->addColumn('file_location', array(
'type' => 'varchar',
'length' => 255,
'null' => false,
))
->addColumn('extra', array(
'type' => 'varchar',
'length' => 255,
'null' => false,
'default' => '[]'
))
->addPrimaryKey('id')
->setEngine('InnoDB')
->setCharset('')
->setAI('4');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment