Skip to content

Commit

Permalink
To 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gibchikafa committed Oct 17, 2021
1 parent e6ed705 commit 6d24897
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 167 deletions.
20 changes: 0 additions & 20 deletions files/default/sql/ddl/2.5.0__initial_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1049,22 +1049,6 @@ CREATE TABLE `roles_audit` (
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rstudio_interpreter`
--

/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rstudio_interpreter` (
`port` int(11) NOT NULL,
`name` varchar(255) COLLATE latin1_general_cs NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`last_accessed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`port`,`name`),
CONSTRAINT `FK_575_582` FOREIGN KEY (`port`) REFERENCES `rstudio_project` (`port`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rstudio_project`
--
Expand Down Expand Up @@ -1126,10 +1110,6 @@ CREATE TABLE `rstudio_settings` (
CONSTRAINT `RS_FK_USERS` FOREIGN KEY (`team_member`) REFERENCES `users` (`email`) ON DELETE CASCADE ON UPDATE NO ACTION,
CONSTRAINT `RS_FK_PROJS` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs;
/*!40101 SET character_set_client = @saved_cs_client */;

/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `serving`
Expand Down
22 changes: 22 additions & 0 deletions files/default/sql/ddl/updates/2.5.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ALTER TABLE `hopsworks`.`rstudio_settings` DROP `num_tf_ps`, DROP `num_tf_gpus`, DROP `num_mpi_np`,
DROP `appmaster_cores`, DROP `appmaster_memory`, DROP `num_executors`, DROP `num_executor_cores`,
DROP `executor_memory`, DROP `dynamic_initial_executors`,DROP `dynamic_min_executors`, DROP `dynamic_max_executors`,
DROP `log_level`, DROP `mode`, DROP `umask`, DROP `archives`, DROP `jars`, DROP `files`,DROP `py_files`, DROP `spark_params`;

ALTER TABLE `hopsworks`.`rstudio_project` DROP `host_ip`, DROP `token`;

ALTER TABLE `hopsworks`.`rstudio_project` ADD COLUMN `expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;

ALTER TABLE `hopsworks`.`rstudio_project` ADD COLUMN `login_username` varchar(255) COLLATE latin1_general_cs DEFAULT
NULL;

ALTER TABLE `hopsworks`.`rstudio_project` ADD COLUMN `login_password` varchar(255) COLLATE latin1_general_cs DEFAULT
NULL;

ALTER TABLE `hopsworks`.`rstudio_project` MODIFY COLUMN `pid` varchar(255) COLLATE latin1_general_cs NOT NULL;

ALTER TABLE `hopsworks`.`rstudio_settings` ADD COLUMN `job_config` varchar(11000) COLLATE latin1_general_cs DEFAULT
NULL;

ALTER TABLE `hopsworks`.`rstudio_settings` ADD COLUMN `docker_config` varchar(11000) COLLATE latin1_general_cs DEFAULT
NULL;
95 changes: 0 additions & 95 deletions files/default/sql/ddl/updates/3.0.0.sql

This file was deleted.

12 changes: 12 additions & 0 deletions templates/default/sql/dml/2.5.0.sql.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
REPLACE INTO `hopsworks`.`variables`(`id`, `value`) VALUES ("rstudio_host", "<%= node['hopsworks']['rstudio_host'] %>");
REPLACE INTO `hopsworks`.`variables`(`id`, `value`) VALUES ("rstudio_origin_scheme", "<%= node['hopsworks']['rstudio_origin_scheme'] %>");
REPLACE INTO `hopsworks`.`variables`(`id`, `value`) VALUES ("rstudio_www_address", "<%= node['hopsworks']['rstudio_www_address'] %>");
REPLACE INTO `hopsworks`.`variables`(`id`, `value`) VALUES ("rstudio_session_timeout_minutes", "<%= node['hopsworks']['rstudio_session_timeout_minutes'] %>");
REPLACE INTO `hopsworks`.`variables`(`id`, `value`) VALUES ("rstudio_logging_level", "<%= node['hopsworks']['rstudio_logging_level'] %>");
REPLACE INTO `hopsworks`.`variables`(`id`, `value`) VALUES ("rstudio_logger_type", "<%= node['hopsworks']['rstudio_logger_type'] %>");
REPLACE INTO `hopsworks`.`variables`(`id`, `value`) VALUES ("rstudio_log_file_max_size", "<%= node['hopsworks']['rstudio_log_file_max_size'] %>");
REPLACE INTO `hopsworks`.`variables`(`id`, `value`) VALUES ("rstudio_dir", "<%= node['hopsworks']['rstudio_dir'] %>");
REPLACE INTO `hopsworks`.`variables`(`id`, `value`) VALUES ("rstudio_user", "<%= node['hops']['yarnapp']['user'] %>");
REPLACE INTO `hopsworks`.`variables`(`id`, `value`) VALUES ("rstudio_group", "<%= node['hops']['group'] %>");
REPLACE INTO `hopsworks`.`variables`(`id`, `value`) VALUES ("rstudio_cran_repo", "<%= node['hopsworks']['rstudio_cran_repo'] %>");
REPLACE INTO `hopsworks`.`variables`(`id`, `value`) VALUES ("rstudio_shutdown_timer_interval", "<%= node['rstudio']['shutdown_timer_interval'] %>");
27 changes: 0 additions & 27 deletions templates/default/sql/dml/3.0.0.sql.erb

This file was deleted.

12 changes: 12 additions & 0 deletions templates/default/sql/dml/undo/2.5.0__undo.sql.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
DELETE FROM `hopsworks`.`variables` WHERE `id`='rstudio_host';
DELETE FROM `hopsworks`.`variables` WHERE `id`='rstudio_origin_scheme';
DELETE FROM `hopsworks`.`variables` WHERE `id`='rstudio_www_address';
DELETE FROM `hopsworks`.`variables` WHERE `id`='rstudio_session_timeout_minutes';
DELETE FROM `hopsworks`.`variables` WHERE `id`='rstudio_logging_level';
DELETE FROM `hopsworks`.`variables` WHERE `id`='rstudio_logger_type';
DELETE FROM `hopsworks`.`variables` WHERE `id`='rstudio_log_file_max_size';
DELETE FROM `hopsworks`.`variables` WHERE `id`='rstudio_dir';
DELETE FROM `hopsworks`.`variables` WHERE `id`='rstudio_user';
DELETE FROM `hopsworks`.`variables` WHERE `id`='rstudio_group';
DELETE FROM `hopsworks`.`variables` WHERE `id`='rstudio_cran_repo';
DELETE FROM `hopsworks`.`variables` WHERE `id`='rstudio_shutdown_timer_interval';
25 changes: 0 additions & 25 deletions templates/default/sql/dml/undo/3.0.0__undo.sql.erb

This file was deleted.

0 comments on commit 6d24897

Please sign in to comment.