Skip to content

Commit

Permalink
Fixed Skipper startup
Browse files Browse the repository at this point in the history
  • Loading branch information
corneil committed Sep 20, 2023
1 parent a137494 commit 8545e30
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
import org.flywaydb.core.api.migration.Context;

import org.springframework.cloud.dataflow.common.flyway.AbstractMigration;

import static org.springframework.cloud.dataflow.server.db.migration.PostgreSQLTextToOID.convertColumnFromOID;
import org.springframework.cloud.dataflow.server.db.migration.PostgreSQLTextToOID;

public class V10__ChangeTextTypes extends AbstractMigration {

Expand All @@ -30,10 +29,10 @@ public V10__ChangeTextTypes() {

@Override
public void migrate(Context context) throws Exception {
convertColumnFromOID("app_registration", "id", "uri", context.getConfiguration().getDataSource());
convertColumnFromOID("app_registration", "id", "metadata_uri", context.getConfiguration().getDataSource());
convertColumnFromOID("stream_definitions", "definition_name", "definition", context.getConfiguration().getDataSource());
convertColumnFromOID("stream_definitions", "definition_name", "original_definition", context.getConfiguration().getDataSource());
convertColumnFromOID("task_definitions", "definition_name", "definition", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("app_registration", "id", "uri", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("app_registration", "id", "metadata_uri", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("stream_definitions", "definition_name", "definition", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("stream_definitions", "definition_name", "original_definition", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("task_definitions", "definition_name", "definition", context.getConfiguration().getDataSource());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@
import org.flywaydb.core.api.migration.Context;

import org.springframework.cloud.dataflow.common.flyway.AbstractMigration;
import org.springframework.cloud.skipper.server.db.migration.PostgreSQLTextToOID;

import static org.springframework.cloud.skipper.server.db.migration.PostgreSQLTextToOID.convertColumnFromOID;
public class V3__ChangeTextTypes extends AbstractMigration {
public V3__ChangeTextTypes() {
super(null);
}

@Override
public void migrate(Context context) {
convertColumnFromOID("skipper_app_deployer_data", "id", "deployment_data", context.getConfiguration().getDataSource());
convertColumnFromOID("skipper_package_metadata", "id", "description", context.getConfiguration().getDataSource());
convertColumnFromOID("skipper_package_metadata", "id", "icon_url", context.getConfiguration().getDataSource());
convertColumnFromOID("skipper_package_metadata", "id", "package_home_url", context.getConfiguration().getDataSource());
convertColumnFromOID("skipper_package_metadata", "id", "package_source_url", context.getConfiguration().getDataSource());
convertColumnFromOID("skipper_package_metadata", "id", "tags", context.getConfiguration().getDataSource());
convertColumnFromOID("skipper_release", "id", "config_values_string", context.getConfiguration().getDataSource());
convertColumnFromOID("skipper_release", "id", "pkg_json_string", context.getConfiguration().getDataSource());
convertColumnFromOID("skipper_repository", "id", "source_url", context.getConfiguration().getDataSource());
convertColumnFromOID("skipper_repository", "id", "url", context.getConfiguration().getDataSource());
convertColumnFromOID("skipper_status", "id", "platform_status", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("skipper_app_deployer_data", "id", "deployment_data", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("skipper_package_metadata", "id", "description", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("skipper_package_metadata", "id", "icon_url", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("skipper_package_metadata", "id", "package_home_url", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("skipper_package_metadata", "id", "package_source_url", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("skipper_package_metadata", "id", "tags", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("skipper_release", "id", "config_values_string", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("skipper_release", "id", "pkg_json_string", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("skipper_repository", "id", "source_url", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("skipper_repository", "id", "url", context.getConfiguration().getDataSource());
PostgreSQLTextToOID.convertColumnFromOID("skipper_status", "id", "platform_status", context.getConfiguration().getDataSource());
}
}

0 comments on commit 8545e30

Please sign in to comment.