19declare(strict_types=1);
28 protected \ilDBInterface
$db;
38 if ($this->db->supportsTransactions()) {
39 $this->db->beginTransaction();
41 $updateStep($this->db);
43 if ($this->db->supportsTransactions()) {
46 }
catch (\Exception $exception) {
47 if ($this->db->supportsTransactions()) {
48 $this->db->rollback();
62 $etalTableName =
'etal_data';
65 $db->createTable($etalTableName, [
66 'object_id' => [
'type' =>
'integer',
'length' => 8,
'notnull' => true],
67 'series_id' => [
'type' =>
'text',
'length' => 36,
'notnull' => true,
'fixed' => true],
68 'start_date' => [
'type' =>
'integer',
'length' => 8,
'notnull' => true],
69 'end_date' => [
'type' =>
'integer',
'length' => 8,
'notnull' => true],
70 'all_day' => [
'type' =>
'integer',
'length' => 1,
'notnull' => true],
71 'employee' => [
'type' =>
'integer',
'length' => 8,
'notnull' => true],
72 'location' => [
'type' =>
'text',
'length' => 200,
'notnull' => false,
'fixed' => false],
73 'completed' => [
'type' =>
'integer',
'length' => 1,
'notnull' => true]
76 $db->addPrimaryKey($etalTableName, [
'object_id']);
77 $db->addIndex($etalTableName, [
'series_id'],
'ser');
78 $db->addIndex($etalTableName, [
'employee'],
'emp');
86 $etalTableName =
'etal_data';
111 $table_name =
'etal_serie';
114 $db->createTable($table_name, [
115 'id' => [
'type' =>
'integer',
'length' => 8,
'notnull' => true],
116 'editing_locked' => [
'type' =>
'integer',
'length' => 1,
'notnull' => true],
119 $db->addPrimaryKey($table_name, [
'id']);
127 $table_name =
'etal_data';
128 $column_name =
'template_id';
prepare(\ilDBInterface $db)
Prepare the execution of the steps.
useTransaction(callable $updateStep)
tableExists(string $table_name)
tableColumnExists(string $table_name, string $column_name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...