diff options
| author | Rasmus Fuhse <fuhse@data-quest.de> | 2023-02-10 08:22:48 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-02-10 08:22:48 +0000 |
| commit | 74658534080290b03b3d9ccf622b7f8789eb126b (patch) | |
| tree | d0818d8b5bc66b9ebe9311c12f515c38752085fa /db | |
| parent | 218fd2a4452e1214f0254ac6fbf1dca1c6f78118 (diff) | |
Resolve "Fehler bei Migration CreateCwUnitsTable"
Closes #2144
Merge request studip/studip!1386
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/5.3.16_create_cw_units_table.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/db/migrations/5.3.16_create_cw_units_table.php b/db/migrations/5.3.16_create_cw_units_table.php index 7b9fac3..0e46120 100644 --- a/db/migrations/5.3.16_create_cw_units_table.php +++ b/db/migrations/5.3.16_create_cw_units_table.php @@ -20,7 +20,7 @@ class CreateCwUnitsTable extends Migration `public` TINYINT(4) NOT NULL DEFAULT '1', `creator_id` CHAR(32) COLLATE latin1_bin DEFAULT NULL, `release_date` INT(11) UNSIGNED DEFAULT NULL, - `withdraw_date` INT(11) UNSIGNED NOT NULL, + `withdraw_date` INT(11) UNSIGNED DEFAULT NULL, `mkdate` INT(11) UNSIGNED NOT NULL, `chdate` INT(11) UNSIGNED NOT NULL, @@ -36,8 +36,8 @@ class CreateCwUnitsTable extends Migration // create unit for each courseware root node $insert = $db->prepare( - "INSERT INTO `cw_units` (`range_id`, `range_type`, `structural_element_id`, `content_type`, `public`, `creator_id`) - VALUES (?, ?, ?, 'courseware', true, ?)" + "INSERT INTO `cw_units` (`range_id`, `range_type`, `structural_element_id`, `content_type`, `public`, `creator_id`, `mkdate`, `chdate`) + VALUES (?, ?, ?, 'courseware', true, ?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP())" ); foreach ($cw_root_nodes as $courseware) { $insert->execute([$courseware['range_id'], $courseware['range_type'], $courseware['id'], $courseware['owner_id']]); |
