modules/core/dbutils/pom.xml
| 2 -
modules/core/dbutils/src/main/scripts/dbsetup/config-schema.xml
| 2 -
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
| 11 ++++++++++
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyOptionsSource.java
| 4 +--
4 files changed, 15 insertions(+), 4 deletions(-)
New commits:
commit 0f87b3b856ff91b6d9559defa12d01b9f6c9d089
Merge: 1a7ea86 c57ee65
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jun 27 10:13:05 2011 -0400
Merge commit 'origin/master' into drift
Conflicts:
modules/core/dbutils/pom.xml
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
diff --cc modules/core/dbutils/pom.xml
index e2a599d,39f0798..d79b738
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@@ -22,7 -22,7 +22,7 @@@
<properties>
<scm.module.path>modules/core/dbutils/</scm.module.path>
- <db.schema.version>2.112</db.schema.version>
- <db.schema.version>2.111</db.schema.version>
++ <db.schema.version>2.113</db.schema.version>
</properties>
<dependencies>
diff --cc modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
index 143ea85,9950e58..8e276a1
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@@ -3443,132 -3444,17 +3443,143 @@@
</schema-directSQL>
<schema-createSequence
name="rhq_config_prop_def_opt_src_id_seq" initial="10001" />
</schemaSpec>
+
<schemaSpec version="2.111">
<schema-directSQL>
+ <statement desc="Creating global drift configuration
definition">
+ INSERT INTO rhq_config_def (id, name, description)
+ VALUES (1, 'GLOBAL_DRIFT_CONFIG_DEF', 'The drift
configuration definition')
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, required, simple_type,
+ order_index, dtype, config_def_id)
+ VALUES (1, 'name', 'Drift Configuration Name',
'The drift configuration name', true, 'string',
+ 0, 'property', 1)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, required, simple_type,
+ default_value, order_index, dtype, config_def_id)
+ VALUES (2, 'enabled', 'Enabled', 'Enables or
disables drift detection for this configuration', true, 'boolean',
+ 'false', 1, 'property', 1)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, required, simple_type,
+ order_index, dtype, config_def_id)
+ VALUES (3, 'basedir', 'Base Directory', 'The
base directory from which files will be monitored for drift.',
+ true, 'string', 2, 'property', 1)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, required, simple_type,
+ order_index, dtype, default_value, config_def_id)
+ VALUES (4, 'interval', 'Interval', 'The
interval, in seconds, between drift detection scans for this configuration. Default is
thirty minutes.',
+ false, 'long', 3, 'property',
'1800', 1)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name, dtype,
description, order_index,
+ config_def_id)
+ VALUES (5, 'includes', 'Includes',
'list', 'A set of patterns that specify files and/or directories to
include.',
+ 4, 1)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name, dtype,
parent_list_definition_id)
+ VALUES (6, 'include', 'Include', 'map',
4)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, simple_type,
+ order_index, dtype, parent_map_definition_id)
+ VALUES (7, 'path', 'Path', 'A file system
path that can be a directory or a file. The path is assumed to be relative to the base
directory of the drift configuration.',
+ 'string', 0, 'property', 5)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, simple_type,
+ order_index, dtype, parent_map_definition_id)
+ VALUES (8, 'pattern', 'Pattern', 'TBD',
'string', 1, 'property', 5)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name, dtype,
description, order_index,
+ config_def_id)
+ VALUES (9, 'excludes', 'Excludes',
'list', 'A set of patterns that specify files and/or directories to
exclude.',
+ 5, 1)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name, dtype,
parent_list_definition_id)
+ VALUES (10, 'exclude', 'Exclude', 'map',
8)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, simple_type,
+ order_index, dtype, parent_map_definition_id)
+ VALUES (11, 'path', 'Path', 'A file system
path that can be a directory or a file. The path is assumed to be relative to the base
directory of the drift configuration.',
+ 'string', 0, 'property', 9)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, simple_type,
+ order_index, dtype, parent_map_definition_id)
+ VALUES (12, 'pattern', 'Pattern', 'TBD',
'string', 1, 'property', 9)
+ </statement>
+ </schema-directSQL>
+ </schemaSpec>
+
+ <schemaSpec version="2.112">
+ <schema-directSQL>
+ <statement desc="Creating table
RHQ_DRIFT_TEMPLATE">
+ CREATE TABLE RHQ_DRIFT_TEMPLATE (
+ RESOURCE_TYPE_ID INTEGER,
+ CONFIG_TEMPLATE_ID INTEGER)
+ </statement>
+ </schema-directSQL>
+ <schema-alterColumn table="RHQ_DRIFT_TEMPLATE"
column="RESOURCE_TYPE_ID" nullable="false"/>
+ <schema-alterColumn table="RHQ_DRIFT_TEMPLATE"
column="CONFIG_TEMPLATE_ID" nullable="false"/>
+ <schema-directSQL>
+ <statement desc="Creating RHQ_DRIFT_TEMPLATE foreign key to
RHQ_RESOURCE_TYPE">
+ ALTER TABLE RHQ_DRIFT_TEMPLATE
+ ADD CONSTRAINT RESOURCE_TYPE_ID_FK
+ FOREIGN KEY (RESOURCE_TYPE_ID)
+ REFERENCES RHQ_RESOURCE_TYPE (ID)
+ </statement>
+ <statement desc="Creating RHQ_DRIFT_TEMPLATE foreign key to
RHQ_CONFIG_TEMPLATE">
+ ALTER TABLE RHQ_DRIFT_TEMPLATE
+ ADD CONSTRAINT CONFIG_TEMPLATE_ID_FK
+ FOREIGN KEY (CONFIG_TEMPLATE_ID)
+ REFERENCES RHQ_CONFIG_TEMPLATE (ID)
+ </statement>
+ </schema-directSQL>
+
+ <schema-directSQL>
+ <statement desc="Creating table RHQ_DRIFT_CONFIG">
+ CREATE TABLE RHQ_DRIFT_CONFIG (
+ RESOURCE_ID INTEGER,
+ CONFIG_ID INTEGER)
+ </statement>
+ </schema-directSQL>
+ <schema-alterColumn table="RHQ_DRIFT_CONFIG"
column="RESOURCE_ID" nullable="false"/>
+ <schema-alterColumn table="RHQ_DRIFT_CONFIG"
column="CONFIG_ID" nullable="false"/>
+ <schema-directSQL>
+ <statement desc="Creating RHQ_DRIFT_CONFIG foreign key to
RHQ_RESOURCE">
+ ALTER TABLE RHQ_DRIFT_CONFIG
+ ADD CONSTRAINT RESOURCE_ID_FK
+ FOREIGN KEY (RESOURCE_ID)
+ REFERENCES RHQ_RESOURCE (ID)
+ </statement>
+ <statement desc="Creating RHQ_DRIFT_CONFIG foreign key to
RHQ_CONFIG">
+ ALTER TABLE RHQ_DRIFT_CONFIG
+ ADD CONSTRAINT CONFIG_ID_FK
+ FOREIGN KEY (CONFIG_ID)
+ REFERENCES RHQ_CONFIG (ID)
+ </statement>
+ </schema-directSQL>
+ </schemaSpec>
+
++ <schemaSpec version="2.113">
++ <schema-directSQL>
+ <statement desc="rename to correct name">
+ ALTER TABLE RHQ_PROP_DEF_OPT_SRC
+ RENAME TO RHQ_CONFIG_PD_OSRC
+ </statement>
+ <statement desc="rename sequence">
+ ALTER TABLE rhq_config_prop_def_opt_src_id_seq RENAME TO
rhq_config_pd_osrc_id_seq
+ </statement>
+ </schema-directSQL>
+ </schemaSpec>
</dbupgrade>
</target>
</project>
commit c57ee650b5c77aeb10df19ed3da12c6ad0c20ef5
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Jun 27 10:59:47 2011 +0200
Fix table and sequence names for dependent values
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index a368986..39f0798 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -22,7 +22,7 @@
<properties>
<scm.module.path>modules/core/dbutils/</scm.module.path>
- <db.schema.version>2.110</db.schema.version>
+ <db.schema.version>2.111</db.schema.version>
</properties>
<dependencies>
diff --git a/modules/core/dbutils/src/main/scripts/dbsetup/config-schema.xml
b/modules/core/dbutils/src/main/scripts/dbsetup/config-schema.xml
index c5155ab..07f101d 100644
--- a/modules/core/dbutils/src/main/scripts/dbsetup/config-schema.xml
+++ b/modules/core/dbutils/src/main/scripts/dbsetup/config-schema.xml
@@ -58,7 +58,7 @@
<column name="PROPERTY_DEF_ID" type="INTEGER"
required="false" references="RHQ_CONFIG_PROP_DEF"/>
</table>
- <table name="RHQ_PROP_DEF_OPT_SRC">
+ <table name="RHQ_CONFIG_PD_OSRC">
<column name="ID" type="INTEGER" required="true"
default="sequence-only" initial="10001"
primarykey="true"/>
<column name="LINK_TO_TARGET" type="BOOLEAN"
required="false"/>
<column name="FILTER" type="VARCHAR2"
required="false" size="40"/>
diff --git a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
index 4d66b02..9950e58 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -3444,6 +3444,17 @@
</schema-directSQL>
<schema-createSequence
name="rhq_config_prop_def_opt_src_id_seq" initial="10001" />
</schemaSpec>
+ <schemaSpec version="2.111">
+ <schema-directSQL>
+ <statement desc="rename to correct name">
+ ALTER TABLE RHQ_PROP_DEF_OPT_SRC
+ RENAME TO RHQ_CONFIG_PD_OSRC
+ </statement>
+ <statement desc="rename sequence">
+ ALTER TABLE rhq_config_prop_def_opt_src_id_seq RENAME TO
rhq_config_pd_osrc_id_seq
+ </statement>
+ </schema-directSQL>
+ </schemaSpec>
</dbupgrade>
</target>
</project>
diff --git
a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyOptionsSource.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyOptionsSource.java
index 1af0bf4..9755bdd 100644
---
a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyOptionsSource.java
+++
b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyOptionsSource.java
@@ -45,8 +45,8 @@ import javax.xml.bind.annotation.XmlAccessorType;
* @author Heiko W. Rupp
*/
@Entity
-@Table(name="RHQ_PROP_DEF_OPT_SRC")
-@SequenceGenerator(name = "SEQ", sequenceName =
"RHQ_CONFIG_PROP_DEF_OPT_SRC_ID_SEQ")
+@Table(name="RHQ_CONFIG_PD_OSRC")
+@SequenceGenerator(name = "SEQ", sequenceName =
"RHQ_CONFIG_PD_OSRC_ID_SEQ")
@XmlAccessorType(XmlAccessType.FIELD)
public class PropertyOptionsSource implements Serializable{