From 81364575f8f80971215a553f7735406d2b161f1f Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Wed, 24 Jun 2015 16:51:56 -0500 Subject: [PATCH] Create session extra field for add a image to session - refs BT#9885 #TMI --- main/install/data.sql | 4 ++- main/install/database.sql | 2 +- .../Schema/V110/Version20150624164100.php | 35 +++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 src/Chamilo/CoreBundle/Migrations/Schema/V110/Version20150624164100.php diff --git a/main/install/data.sql b/main/install/data.sql index 59b3316d18..e36460a87f 100644 --- a/main/install/data.sql +++ b/main/install/data.sql @@ -759,6 +759,8 @@ INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, v INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, visible, changeable) VALUES (2, 10, 'tags', 'Tags', 1, 1); INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, visible, changeable) VALUES (2, 19, 'video_url', 'VideoUrl', 1, 1); +INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, visible, changeable) VALUES (3, 16, 'image', 'Image', 1, 1); + INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES (8, '1', 'AtOnce',1); INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES (8, '8', 'Daily',2); INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES (8, '0', 'No',3); @@ -1786,4 +1788,4 @@ VALUES ('gamification_mode', '1', 'Yes'), ('gamification_mode', '0', 'No'); -UPDATE settings_current SET selected_value = '1.10.0.41' WHERE variable = 'chamilo_database_version'; +UPDATE settings_current SET selected_value = '1.10.0.42' WHERE variable = 'chamilo_database_version'; diff --git a/main/install/database.sql b/main/install/database.sql index de73bf6646..64904bb06b 100644 --- a/main/install/database.sql +++ b/main/install/database.sql @@ -4603,5 +4603,5 @@ CREATE TABLE c_attendance_calendar_rel_group ( -- Version LOCK TABLES settings_current WRITE; -UPDATE settings_current SET selected_value = '1.10.0.41' WHERE variable = 'chamilo_database_version'; +UPDATE settings_current SET selected_value = '1.10.0.42' WHERE variable = 'chamilo_database_version'; UNLOCK TABLES; diff --git a/src/Chamilo/CoreBundle/Migrations/Schema/V110/Version20150624164100.php b/src/Chamilo/CoreBundle/Migrations/Schema/V110/Version20150624164100.php new file mode 100644 index 0000000000..893fb1527d --- /dev/null +++ b/src/Chamilo/CoreBundle/Migrations/Schema/V110/Version20150624164100.php @@ -0,0 +1,35 @@ +addSql("INSERT INTO extra_field + (extra_field_type, field_type, variable, display_text, visible, changeable) + VALUES (3, 16, 'image', 'Image', 1, 1)"); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql("DELETE FROM extra_field + WHERE variable = 'image' AND + extra_field_type = 3 AND + field_type = 16"); + } + +}