Merge "Issue #1869 Remove DataURI column from GFE. Change-Id: I3a91208af35ba1ba66b215e5da2b2b7147ac5488" into development

Former-commit-id: 9bf35d621a [formerly 2f4b1d54a1] [formerly b76d402c98 [formerly f7d2c39ca0c70b627b2e72f5982fba11a6a683bd]]
Former-commit-id: b76d402c98
Former-commit-id: 17407e863a
This commit is contained in:
Richard Peter 2013-05-14 09:37:18 -05:00 committed by Gerrit Code Review
commit 824407f930
2 changed files with 28 additions and 16 deletions

View file

@ -0,0 +1,19 @@
#!/bin/bash
# DR #1869 - this update script will drop the dataURI column from all tables
# where it is no longer needed.
PSQL="/awips2/psql/bin/psql"
echo "INFO: Dropping dataURI columns."
# TODO this script will need to be extended for unique constraint.
for table in gfe;
do
echo "INFO: Dropping DataURI column from $table"
${PSQL} -U awips -d metadata -c "ALTER TABLE $table DROP COLUMN IF EXISTS datauri;"
if [ $? -ne 0 ]; then
echo "ERROR: Failed to drop dataURI column for $table"
echo "FATAL: The update has failed."
exit 1
fi
done

View file

@ -28,9 +28,6 @@ import java.util.Calendar;
import java.util.List; import java.util.List;
import java.util.TimeZone; import java.util.TimeZone;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.FetchType; import javax.persistence.FetchType;
import javax.persistence.ManyToOne; import javax.persistence.ManyToOne;
@ -67,16 +64,19 @@ import com.raytheon.uf.common.time.TimeRange;
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* -------- --- randerso Initial creation * randerso Initial creation
* 20070914 379 jkorman Added populateDataStore() and * Sep 14, 2007 379 jkorman Added populateDataStore() and
* getPersistenceTime() from new IPersistable * getPersistenceTime() from new
* 20071129 472 jkorman Added IDecoderGettable interface. * IPersistable
* 06/17/08 940 bphillip Implemented GFE Locking * Nov 29, 2007 472 jkorman Added IDecoderGettable interface.
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime * Jun 17, 2008 940 bphillip Implemented GFE Locking
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Apr 23, 2013 1949 rjpeter Normalized database structure. * Apr 23, 2013 1949 rjpeter Normalized database structure.
* May 07, 2013 1869 bsteffen Remove dataURI column from * May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject. * PluginDataObject.
* May 13, 2013 1869 bsteffen Remove DataURI column from GFE.
* *
* </pre> * </pre>
* *
@ -280,11 +280,4 @@ public class GFERecord extends PluginDataObject {
} }
} }
} }
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
} }