diff options
| author | Marcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de> | 2025-07-10 09:14:44 +0000 |
|---|---|---|
| committer | Ron Lucke <lucke@elan-ev.de> | 2025-07-10 11:14:44 +0200 |
| commit | 1f5b6ce81987ed5a03279265ca881ecb4bac0832 (patch) | |
| tree | aff162afb291f206a490c0eb2d4ec98d29e3e140 /db | |
| parent | 7f557a0d69924597be5ca6b3aa8495ed26460429 (diff) | |
STEP 3263: Block- und Abschnittstypen standortspezifisch deaktivieren. (zweite Version)
Closes #3263
Merge request studip/studip!4206
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/6.1.11_create_block_type_states.php | 30 | ||||
| -rw-r--r-- | db/migrations/6.1.12_create_container_type_states.php | 30 |
2 files changed, 60 insertions, 0 deletions
diff --git a/db/migrations/6.1.11_create_block_type_states.php b/db/migrations/6.1.11_create_block_type_states.php new file mode 100644 index 0000000..51eea92 --- /dev/null +++ b/db/migrations/6.1.11_create_block_type_states.php @@ -0,0 +1,30 @@ +<?php + +class CreateBlockTypeStates extends Migration +{ + public function description() + { + return 'create table for block type states'; + } + + public function up() + { + $db = DBManager::get(); + $query = + "CREATE TABLE IF NOT EXISTS `cw_block_type_states` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `block_type` VARCHAR(255) NOT NULL, + `activated` TINYINT(1) NOT NULL DEFAULT 0, + `mkdate` int(11) UNSIGNED NOT NULL, + `chdate` int(11) UNSIGNED NOT NULL, + PRIMARY KEY (`id`), + KEY `block_type` (`block_type`))"; + $db->exec($query); + } + + public function down() + { + $db = DBManager::get(); + $db->exec('DROP TABLE IF EXISTS `cw_block_type_states`'); + } +} diff --git a/db/migrations/6.1.12_create_container_type_states.php b/db/migrations/6.1.12_create_container_type_states.php new file mode 100644 index 0000000..2b05aec --- /dev/null +++ b/db/migrations/6.1.12_create_container_type_states.php @@ -0,0 +1,30 @@ +<?php + +class CreateContainerTypeStates extends Migration +{ + public function description() + { + return 'create table for container type states'; + } + + public function up() + { + $db = DBManager::get(); + $query = + "CREATE TABLE IF NOT EXISTS `cw_container_type_states` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `container_type` VARCHAR(255) NOT NULL, + `activated` TINYINT(1) NOT NULL DEFAULT 0, + `mkdate` int(11) UNSIGNED NOT NULL, + `chdate` int(11) UNSIGNED NOT NULL, + PRIMARY KEY (`id`), + KEY `container_type` (`container_type`))"; + $db->exec($query); + } + + public function down() + { + $db = DBManager::get(); + $db->exec('DROP TABLE IF EXISTS `cw_container_type_states`'); + } +} |
