From c9dda7c3da9d948cd167fd9e6fac02c9b3ee3756 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Mon, 26 Jun 2017 11:04:57 -0500 Subject: [PATCH] Add is_mandatory extrafield for surveys - refs BT#12915 --- .../Schema/V110/Version20170626091800.php | 41 +++++++++++++++++++ main/install/data.sql | 2 + 2 files changed, 43 insertions(+) create mode 100644 app/Migrations/Schema/V110/Version20170626091800.php diff --git a/app/Migrations/Schema/V110/Version20170626091800.php b/app/Migrations/Schema/V110/Version20170626091800.php new file mode 100644 index 0000000000..426b407277 --- /dev/null +++ b/app/Migrations/Schema/V110/Version20170626091800.php @@ -0,0 +1,41 @@ +addSql(" + INSERT INTO extra_field + (extra_field_type, field_type, variable, display_text, visible, changeable, created_at) + VALUES (12, 13, 'is_mandatory', 'IsMandatory', 1, 1, NOW()); + "); + } + + /** + * @param \Doctrine\DBAL\Schema\Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql(" + DELETE FROM extra_field + WHERE extra_field_type = 12 AND field_type = 13 AND variable = 'is_mandatory'; + "); + } +} diff --git a/main/install/data.sql b/main/install/data.sql index ec179463e6..0e20e423bd 100644 --- a/main/install/data.sql +++ b/main/install/data.sql @@ -1800,3 +1800,5 @@ VALUES ('show_full_skill_name_on_skill_wheel', 'false', 'No'); UPDATE settings_current SET selected_value = '1.10.0.51' WHERE variable = 'chamilo_database_version'; + +INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, visible, changeable, created_at) VALUES (12, 13, 'is_mandatory','IsMandatory', 1, 1, NOW());