aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrations/6.1.11_create_block_type_states.php30
-rw-r--r--db/migrations/6.1.12_create_container_type_states.php30
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`');
+ }
+}