diff --git a/deltaScripts/14.4.1/DR3702/copyTextPluginInfo.sh b/deltaScripts/14.4.1/DR3702/copyTextPluginInfo.sh new file mode 100644 index 0000000000..4a33091e95 --- /dev/null +++ b/deltaScripts/14.4.1/DR3702/copyTextPluginInfo.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# DR #3702 Copy text plugin_info to the fxatext database. + +PSQL="/awips2/psql/bin/psql" + +echo "INFO: Copying text plugin_info to fxatext database." + +initialized=`$PSQL -t -U awips -d metadata -c "SELECT initialized FROM plugin_info WHERE name = 'text';"` +if [ -n "$initialized" ]; then + $PSQL -U awips -d fxatext -c "CREATE TABLE IF NOT EXISTS plugin_info(name character varying(255) NOT NULL, initialized boolean,tablename character varying(255),CONSTRAINT plugin_info_pkey PRIMARY KEY (name)); ALTER TABLE plugin_info OWNER TO awips;" + if [ $? -ne 0 ]; then + echo "ERROR: Failed to create plugin_info table in fxatext database" + echo "FATAL: The update has failed." + exit 1 + fi + $PSQL -U awips -d fxatext -c "INSERT INTO plugin_info (name,initialized) VALUES ('text','$initialized');" + if [ $? -ne 0 ]; then + echo "ERROR: Failed to register text plugin in fxatext database." + echo "FATAL: The update has failed." + exit 1 + fi + $PSQL -t -U awips -d metadata -c "DELETE FROM plugin_info WHERE name = 'text';" + +else + echo "INFO: Nothing to do." +fi + +${PSQL} -U awips -d metadata -c "ALTER TABLE plugin_info DROP COLUMN IF EXISTS database;" + +echo "INFO: Done copying text plugin_info to fxatext database." \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.text/res/spring/text-common.xml b/edexOsgi/com.raytheon.uf.edex.plugin.text/res/spring/text-common.xml index 981310f2a8..f04099eadb 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.text/res/spring/text-common.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/res/spring/text-common.xml @@ -3,6 +3,17 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> + + + + + + + + + + + @@ -12,7 +23,7 @@ + depends-on="fxaTxManager,fxaCommonDbRegistered"> @@ -22,6 +33,7 @@ com.raytheon.uf.common.dataplugin.text + com.raytheon.uf.edex.database