diff --git a/plugins/tps/tps/updates/builder_table_create_tps_tps_test_categories.php b/plugins/tps/tps/updates/builder_table_create_tps_tps_test_categories.php new file mode 100644 index 000000000..0827e5b05 --- /dev/null +++ b/plugins/tps/tps/updates/builder_table_create_tps_tps_test_categories.php @@ -0,0 +1,23 @@ +engine = 'InnoDB'; + $table->increments('id')->unsigned(); + $table->string('title'); + $table->text('description'); + }); + } + + public function down() + { + Schema::dropIfExists('tps_tps_test_categories'); + } +} diff --git a/plugins/tps/tps/updates/builder_table_create_tps_tps_test_questions.php b/plugins/tps/tps/updates/builder_table_create_tps_tps_test_questions.php new file mode 100644 index 000000000..6bbe3a880 --- /dev/null +++ b/plugins/tps/tps/updates/builder_table_create_tps_tps_test_questions.php @@ -0,0 +1,23 @@ +engine = 'InnoDB'; + $table->increments('id')->unsigned(); + $table->string('title'); + $table->text('description')->nullable(); + }); + } + + public function down() + { + Schema::dropIfExists('tps_tps_test_questions'); + } +} diff --git a/plugins/tps/tps/updates/builder_table_update_tps_tps_test_questions.php b/plugins/tps/tps/updates/builder_table_update_tps_tps_test_questions.php new file mode 100644 index 000000000..40b74d9ea --- /dev/null +++ b/plugins/tps/tps/updates/builder_table_update_tps_tps_test_questions.php @@ -0,0 +1,29 @@ +integer('test_id'); + $table->string('question'); + $table->text('answers'); + $table->dropColumn('title'); + }); + } + + public function down() + { + Schema::table('tps_tps_test_questions', function($table) + { + $table->dropColumn('test_id'); + $table->dropColumn('question'); + $table->dropColumn('answers'); + $table->string('title', 191); + }); + } +} diff --git a/plugins/tps/tps/updates/builder_table_update_tps_tps_tests.php b/plugins/tps/tps/updates/builder_table_update_tps_tps_tests.php new file mode 100644 index 000000000..56c290f0f --- /dev/null +++ b/plugins/tps/tps/updates/builder_table_update_tps_tps_tests.php @@ -0,0 +1,17 @@ +