public function __construct($tableName)
 {
     parent::__construct();
     $table = $this->createTable($tableName);
     $table->addColumn('seed', 'string', array('length' => 88, 'not_null' => true));
     $table->addColumn('updated_at', 'datetime', array('not_null' => true));
 }
Пример #2
0
 /**
  * Overrides parent constructor
  *
  * @param \Doctrine\DBAL\Schema\Table[]      $tables       The schema tables
  * @param \Doctrine\DBAL\Schema\Sequence[]   $sequences    The schema sequences
  * @param \Doctrine\DBAL\Schema\SchemaConfig $schemaConfig The schema config
  * @param array                              $namespaces   Namespaces for tables
  */
 public function __construct(array $tables = array(), array $sequences = array(), SchemaConfig $schemaConfig = null, array $namespaces = array())
 {
     parent::__construct($tables, $sequences, $schemaConfig, $namespaces);
     $this->_addTable($userTable = new UserTable());
     $this->_addTable($postTable = new PostTable());
     $this->_addTable($todoTable = new TodoTable());
     $this->getTable($postTable->getName())->addColumn('user_id', 'integer', array('unsigned' => true, 'notnull' => true));
     $this->getTable($postTable->getName())->addForeignKeyConstraint('user', array('user_id'), array('id'), array('onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE'));
 }
Пример #3
0
 /**
  * Constructor
  *
  * @param array $options the names for tables
  * @return void
  */
 public function __construct(array $options)
 {
     parent::__construct();
     $this->options = $options;
     $this->addClassTable();
     $this->addSecurityIdentitiesTable();
     $this->addObjectIdentitiesTable();
     $this->addObjectIdentityAncestorsTable();
     $this->addEntryTable();
 }
Пример #4
0
 /**
  * Constructor
  *
  * @param array $options the names for tables
  * @param SchemaConfig $schemaConfig
  */
 public function __construct(array $options, SchemaConfig $schemaConfig = null)
 {
     parent::__construct(array(), array(), $schemaConfig);
     $this->options = $options;
     $this->addClassTable();
     $this->addSecurityIdentitiesTable();
     $this->addObjectIdentitiesTable();
     $this->addObjectIdentityAncestorsTable();
     $this->addEntryTable();
 }
Пример #5
0
 /**
  * Constructor.
  *
  * @param array      $options    the names for tables
  * @param Connection $connection
  */
 public function __construct(array $options, Connection $connection = null)
 {
     $schemaConfig = null === $connection ? null : $connection->getSchemaManager()->createSchemaConfig();
     parent::__construct(array(), array(), $schemaConfig);
     $this->options = $options;
     $this->addClassTable();
     $this->addSecurityIdentitiesTable();
     $this->addObjectIdentitiesTable();
     $this->addObjectIdentityAncestorsTable();
     $this->addEntryTable();
 }
Пример #6
0
 public function __construct()
 {
     parent::__construct();
     $this->createRun();
     $this->createSubject();
     $this->createVariant();
     $this->createParameter();
     $this->createVariantParameter();
     $this->createGroupSubject();
     $this->createEnvironment();
     $this->createIteration();
     $this->createVersion();
 }
Пример #7
0
 /**
  * @param array $options The options could be use to make the table
  *                               names configurable.
  * @param Connection $connection
  */
 public function __construct(array $options = array(), Connection $connection = null)
 {
     $this->connection = $connection;
     $schemaConfig = null === $connection ? null : $connection->getSchemaManager()->createSchemaConfig();
     parent::__construct(array(), array(), $schemaConfig);
     $this->options = $options;
     $this->addNamespacesTable();
     $this->addWorkspacesTable();
     $nodes = $this->addNodesTable();
     $this->addInternalIndexTypesTable();
     $this->addBinaryDataTable();
     $this->addNodesReferencesTable($nodes);
     $this->addNodesWeakreferencesTable($nodes);
     $this->addTypeNodesTable();
     $this->addTypePropsTable();
     $this->addTypeChildsTable();
 }
 public function __construct($tableName = 'sessions')
 {
     parent::__construct();
     $this->tableName = $tableName;
     $this->addSessionTable();
 }
Пример #9
0
 /**
  * constructor
  */
 public function __construct(array $tables = array(), array $sequences = array(), SchemaConfig $schemaConfig = null)
 {
     $this->xPrefix = strtolower(\XoopsBaseConfig::get('db-prefix') . '_');
     $this->xDbName = strtolower(\XoopsBaseConfig::get('db-name'));
     parent::__construct($tables, $sequences, $schemaConfig);
 }