diff --git a/app/Migrations/Schema/V111/Version20170626091800.php b/app/Migrations/Schema/V111/Version20170626091800.php new file mode 100644 index 0000000000..f39d553a7a --- /dev/null +++ b/app/Migrations/Schema/V111/Version20170626091800.php @@ -0,0 +1,41 @@ +addSql(" + INSERT INTO extra_field + (extra_field_type, field_type, variable, display_text, visible_to_self, 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 14df38a6ab..092ea9141d 100644 --- a/main/install/data.sql +++ b/main/install/data.sql @@ -1960,3 +1960,5 @@ INSERT INTO settings_current (variable, type, category, selected_value, title, c VALUES ('allow_download_documents_by_api_key', 'radio', 'WebServices', 'false', 'AllowDownloadDocumentsByApiKeyTitle', 'AllowDownloadDocumentsByApiKeyComment', '', NULL, 1); INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_download_documents_by_api_key', 'true', 'Yes'); INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_download_documents_by_api_key', 'false', 'No'); + +INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, visible_to_self, changeable, created_at) VALUES (12, 13, 'is_mandatory','IsMandatory', 1, 1, NOW());