forked from lamsfoundation/lams
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LDEV-4180: Make DB patches produce up-to-date structure during build …
…instead of applying multiple patches. Get rid of unnecessary tables and keys. Modify boolean columns to tinyint(1) Simplify patches where possible.
- Loading branch information
1 parent
91ec1f0
commit 5df0d44
Showing
223 changed files
with
3,658 additions
and
5,837 deletions.
There are no files selected for viewing
18 changes: 8 additions & 10 deletions
18
lams_build/librarypackages/chatscribe/libraryActivity1_insert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
insert into lams_learning_activity | ||
(activity_id,activity_ui_id,description,title,xcoord,ycoord,parent_activity_id,help_text, | ||
learning_activity_type_id,grouping_id,order_id,define_later_flag, | ||
learning_design_id,learning_library_id,create_date_time,run_offline_flag, | ||
max_number_of_options,min_number_of_options,tool_id,tool_content_id, | ||
gate_activity_level_id,gate_start_time_offset,gate_end_time_offset,library_activity_ui_image, | ||
(description,title,help_text, | ||
learning_activity_type_id, | ||
learning_library_id,create_date_time, | ||
library_activity_ui_image, | ||
grouping_support_type_id, apply_grouping_flag,activity_category_id, language_file) | ||
values | ||
(null,null,'Combined Chat and Scribe','Prepare Group Report',null,null,null, | ||
('Combined Chat and Scribe','Prepare Group Report', | ||
'Learners to prepare group report, discussing report in chat', | ||
6,null,null,0, | ||
null,${learning_library_id},now(),0, | ||
null,null,null,null, | ||
null,null,null,'images/icon_groupreporting.svg', | ||
6, | ||
${learning_library_id},now(), | ||
'images/icon_groupreporting.svg', | ||
2,0,5, | ||
'org.lamsfoundation.lams.library.chatscribe.ApplicationResources'); |
20 changes: 10 additions & 10 deletions
20
lams_build/librarypackages/chatscribe/toolActivity1_insert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
insert into lams_learning_activity | ||
(activity_id,activity_ui_id,description,title,xcoord,ycoord,parent_activity_id,help_text, | ||
learning_activity_type_id,grouping_id,order_id,define_later_flag, | ||
learning_design_id,learning_library_id,create_date_time,run_offline_flag, | ||
max_number_of_options,min_number_of_options,tool_id,tool_content_id, | ||
gate_activity_level_id,gate_start_time_offset,gate_end_time_offset,library_activity_ui_image, | ||
(description,title,parent_activity_id,help_text, | ||
learning_activity_type_id, | ||
create_date_time, | ||
tool_id, | ||
library_activity_ui_image, | ||
grouping_support_type_id, apply_grouping_flag,activity_category_id, | ||
language_file) | ||
values | ||
(null,null,'Chat Tool','Chat Tool',null,null,${parent_activity_id},'Chat', | ||
1,null,null,0, | ||
null,null,now(),0, | ||
null,null,${tool_id},null, | ||
null,null,null,'tool/lachat11/images/icon_chat.svg', | ||
('Chat Tool','Chat Tool',${parent_activity_id},'Chat', | ||
1, | ||
now(), | ||
${tool_id}, | ||
'tool/lachat11/images/icon_chat.svg', | ||
2,0,2, | ||
'org.lamsfoundation.lams.tool.chat.ApplicationResources'); |
20 changes: 10 additions & 10 deletions
20
lams_build/librarypackages/chatscribe/toolActivity2_insert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
insert into lams_learning_activity | ||
(activity_id,activity_ui_id,description,title,xcoord,ycoord,parent_activity_id,help_text, | ||
learning_activity_type_id,grouping_id,order_id,define_later_flag, | ||
learning_design_id,learning_library_id,create_date_time,run_offline_flag, | ||
max_number_of_options,min_number_of_options,tool_id,tool_content_id, | ||
gate_activity_level_id,gate_start_time_offset,gate_end_time_offset,library_activity_ui_image, | ||
(description,title,parent_activity_id,help_text, | ||
learning_activity_type_id, | ||
create_date_time, | ||
tool_id, | ||
library_activity_ui_image, | ||
grouping_support_type_id, apply_grouping_flag,activity_category_id, | ||
language_file) | ||
values | ||
(null,null,'Scribe Tool','Scribe Tool',null,null,${parent_activity_id},'Scribe', | ||
1,null,null,0, | ||
null,null,now(),0, | ||
null,null,${tool_id},null, | ||
null,null,null,'tool/lascrb11/images/icon_scribe.svg', | ||
('Scribe Tool','Scribe Tool',${parent_activity_id},'Scribe', | ||
1, | ||
now(), | ||
${tool_id}, | ||
'tool/lascrb11/images/icon_scribe.svg', | ||
2,0,2, | ||
'org.lamsfoundation.lams.tool.scribe.ApplicationResources'); |
18 changes: 8 additions & 10 deletions
18
lams_build/librarypackages/forumscribe/libraryActivity1_insert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
insert into lams_learning_activity | ||
(activity_id,activity_ui_id,description,title,xcoord,ycoord,parent_activity_id,help_text, | ||
learning_activity_type_id,grouping_id,order_id,define_later_flag, | ||
learning_design_id,learning_library_id,create_date_time,run_offline_flag, | ||
max_number_of_options,min_number_of_options,tool_id,tool_content_id, | ||
gate_activity_level_id,gate_start_time_offset,gate_end_time_offset,library_activity_ui_image, | ||
(description,title,help_text, | ||
learning_activity_type_id, | ||
learning_library_id,create_date_time, | ||
library_activity_ui_image, | ||
grouping_support_type_id, apply_grouping_flag,activity_category_id, language_file) | ||
values | ||
(null,null,'Combined Chat and Scribe','Prepare Group Report',null,null,null, | ||
('Combined Chat and Scribe','Prepare Group Report', | ||
'Learners to prepare group report, discussing report in chat', | ||
6,null,null,0, | ||
null,${learning_library_id},now(),0, | ||
null,null,null,null, | ||
null,null,null,'images/icon_forum_and_scribe.svg', | ||
6, | ||
${learning_library_id},now(), | ||
'images/icon_forum_and_scribe.svg', | ||
2,0,5, | ||
'org.lamsfoundation.lams.library.forumscribe.ApplicationResources'); |
22 changes: 11 additions & 11 deletions
22
lams_build/librarypackages/forumscribe/toolActivity1_insert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
insert into lams_learning_activity | ||
(activity_id,activity_ui_id,description,title,xcoord,ycoord,parent_activity_id,help_text, | ||
learning_activity_type_id,grouping_id,order_id,define_later_flag, | ||
learning_design_id,learning_library_id,create_date_time,run_offline_flag, | ||
max_number_of_options,min_number_of_options,tool_id,tool_content_id, | ||
gate_activity_level_id,gate_start_time_offset,gate_end_time_offset,library_activity_ui_image, | ||
(description,title,parent_activity_id,help_text, | ||
learning_activity_type_id, | ||
create_date_time, | ||
tool_id, | ||
library_activity_ui_image, | ||
grouping_support_type_id, apply_grouping_flag,activity_category_id, | ||
language_file) | ||
values | ||
(null,null,'Forum/Message Board','Forum',null,null,${parent_activity_id},'Forum/Message Board', | ||
1,null,null,0, | ||
null,null,now(),0, | ||
null,null,${tool_id},null, | ||
null,null,null,'tool/lafrum11/images/icon_forum.svg', | ||
('Forum/Message Board','Forum',${parent_activity_id},'Forum/Message Board', | ||
1, | ||
now(), | ||
${tool_id}, | ||
'tool/lafrum11/images/icon_forum.svg', | ||
2,0,2, | ||
'org.lamsfoundation.lams.tool.forum.ApplicationResources'); | ||
'org.lamsfoundation.lams.tool.forum.ApplicationResources'); |
20 changes: 10 additions & 10 deletions
20
lams_build/librarypackages/forumscribe/toolActivity2_insert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
insert into lams_learning_activity | ||
(activity_id,activity_ui_id,description,title,xcoord,ycoord,parent_activity_id,help_text, | ||
learning_activity_type_id,grouping_id,order_id,define_later_flag, | ||
learning_design_id,learning_library_id,create_date_time,run_offline_flag, | ||
max_number_of_options,min_number_of_options,tool_id,tool_content_id, | ||
gate_activity_level_id,gate_start_time_offset,gate_end_time_offset,library_activity_ui_image, | ||
(description,title,parent_activity_id,help_text, | ||
learning_activity_type_id, | ||
create_date_time, | ||
tool_id, | ||
library_activity_ui_image, | ||
grouping_support_type_id, apply_grouping_flag,activity_category_id, | ||
language_file) | ||
values | ||
(null,null,'Scribe Tool','Scribe Tool',null,null,${parent_activity_id},'Scribe', | ||
1,null,null,0, | ||
null,null,now(),0, | ||
null,null,${tool_id},null, | ||
null,null,null,'tool/lascrb11/images/icon_scribe.svg', | ||
('Scribe Tool','Scribe Tool',${parent_activity_id},'Scribe', | ||
1, | ||
now(), | ||
${tool_id}, | ||
'tool/lascrb11/images/icon_scribe.svg', | ||
2,0,2, | ||
'org.lamsfoundation.lams.tool.scribe.ApplicationResources'); |
18 changes: 8 additions & 10 deletions
18
lams_build/librarypackages/shareresourcesforum/libraryActivity1_insert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
insert into lams_learning_activity | ||
(activity_id,activity_ui_id,description,title,xcoord,ycoord,parent_activity_id,help_text, | ||
learning_activity_type_id,grouping_id,order_id,define_later_flag, | ||
learning_design_id,learning_library_id,create_date_time,run_offline_flag, | ||
max_number_of_options,min_number_of_options,tool_id,tool_content_id, | ||
gate_activity_level_id,gate_start_time_offset,gate_end_time_offset,library_activity_ui_image, | ||
(description,title,help_text, | ||
learning_activity_type_id, | ||
learning_library_id,create_date_time, | ||
library_activity_ui_image, | ||
grouping_support_type_id, apply_grouping_flag,activity_category_id, language_file) | ||
values | ||
(null,null,'Combined Share Resources and Forum','Discuss Shared Resources',null,null,null, | ||
('Combined Share Resources and Forum','Discuss Shared Resources', | ||
'Learners to discuss items they have viewed via Share Resources.', | ||
6,null,null,0, | ||
null,${learning_library_id},now(),0, | ||
null,null,null,null, | ||
null,null,null,'images/icon_urlcontentmessageboard.svg', | ||
6, | ||
${learning_library_id},now(), | ||
'images/icon_urlcontentmessageboard.svg', | ||
2,0,5, | ||
'org.lamsfoundation.lams.library.shareresourcesforum.ApplicationResources'); |
20 changes: 10 additions & 10 deletions
20
lams_build/librarypackages/shareresourcesforum/toolActivity1_insert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
insert into lams_learning_activity | ||
(activity_id,activity_ui_id,description,title,xcoord,ycoord,parent_activity_id,help_text, | ||
learning_activity_type_id,grouping_id,order_id,define_later_flag, | ||
learning_design_id,learning_library_id,create_date_time,run_offline_flag, | ||
max_number_of_options,min_number_of_options,tool_id,tool_content_id, | ||
gate_activity_level_id,gate_start_time_offset,gate_end_time_offset,library_activity_ui_image, | ||
(description,title,parent_activity_id,help_text, | ||
learning_activity_type_id, | ||
create_date_time, | ||
tool_id, | ||
library_activity_ui_image, | ||
grouping_support_type_id, apply_grouping_flag,activity_category_id, | ||
language_file) | ||
values | ||
(null,null,'Share Resources','Share Resources',null,null,${parent_activity_id},'Share Resources', | ||
1,null,null,0, | ||
null,null,now(),0, | ||
null,null,${tool_id},null, | ||
null,null,null,'tool/larsrc11/images/icon_rsrc.svg', | ||
('Share Resources','Share Resources',${parent_activity_id},'Share Resources', | ||
1, | ||
now(), | ||
${tool_id}, | ||
'tool/larsrc11/images/icon_rsrc.svg', | ||
2,0,4, | ||
'org.lamsfoundation.lams.tool.rsrc.ApplicationResources'); |
20 changes: 10 additions & 10 deletions
20
lams_build/librarypackages/shareresourcesforum/toolActivity2_insert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
insert into lams_learning_activity | ||
(activity_id,activity_ui_id,description,title,xcoord,ycoord,parent_activity_id,help_text, | ||
learning_activity_type_id,grouping_id,order_id,define_later_flag, | ||
learning_design_id,learning_library_id,create_date_time,run_offline_flag, | ||
max_number_of_options,min_number_of_options,tool_id,tool_content_id, | ||
gate_activity_level_id,gate_start_time_offset,gate_end_time_offset,library_activity_ui_image, | ||
(description,title,parent_activity_id,help_text, | ||
learning_activity_type_id, | ||
create_date_time, | ||
tool_id, | ||
library_activity_ui_image, | ||
grouping_support_type_id, apply_grouping_flag,activity_category_id, | ||
language_file) | ||
values | ||
(null,null,'Forum/Message Board','Forum',null,null,${parent_activity_id},'Forum/Message Board', | ||
1,null,null,0, | ||
null,null,now(),0, | ||
null,null,${tool_id},null, | ||
null,null,null,'tool/lafrum11/images/icon_forum.svg', | ||
('Forum/Message Board','Forum',${parent_activity_id},'Forum/Message Board', | ||
1, | ||
now(), | ||
${tool_id}, | ||
'tool/lafrum11/images/icon_forum.svg', | ||
2,0,2, | ||
'org.lamsfoundation.lams.tool.forum.ApplicationResources'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,8 @@ | ||
|
||
|
||
SET FOREIGN_KEY_CHECKS=0; | ||
DROP DATABASE IF EXISTS @dbname@; | ||
CREATE DATABASE @dbname@ DEFAULT CHARACTER SET utf8; | ||
CREATE DATABASE @dbname@ DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
SET FOREIGN_KEY_CHECKS=1; | ||
|
||
--USE mysql; | ||
|
||
--DELETE FROM user WHERE user=''; | ||
-- DELETE FROM user WHERE user IS NULL; | ||
|
||
--DELETE FROM db WHERE user=''; | ||
-- DELETE FROM db WHERE user IS NULL; | ||
|
||
--GRANT ALL PRIVILEGES ON *.* TO lams@localhost IDENTIFIED BY 'lamsdemo'; | ||
--REVOKE PROCESS,SUPER ON *.* from lams@localhost; | ||
|
||
--The hostname below should be replaced with the actual host name | ||
--GRANT ALL PRIVILEGES ON *.* TO lams@'hostname' IDENTIFIED BY 'lamsdemo'; | ||
--REVOKE PROCESS,SUPER ON *.* from lams@'hostname'; | ||
|
||
--GRANT ALL PRIVILEGES ON *.* TO lams@'%' IDENTIFIED BY 'lamsdemo'; | ||
--REVOKE PROCESS,SUPER ON *.* from lams@'%'; | ||
|
||
--FLUSH PRIVILEGES; | ||
|
||
--GRANT ALL PRIVILEGES ON lams.* TO lams@localhost IDENTIFIED BY 'lamsdemo' WITH GRANT OPTION; | ||
--The hostname below should be replaced with the actual host name | ||
--GRANT ALL PRIVILEGES ON lams.* TO lams@'hostname' IDENTIFIED BY 'lamsdemo' WITH GRANT OPTION; | ||
--GRANT ALL PRIVILEGES ON lams.* TO lams@'%' IDENTIFIED BY 'lamsdemo' WITH GRANT OPTION; | ||
|
||
--FLUSH PRIVILEGES; | ||
|
||
USE @dbname@; | ||
|
||
SET FOREIGN_KEY_CHECKS=1; |
Oops, something went wrong.