Index: openacs-4/packages/acs-subsite/tcl/attribute-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/attribute-procs-oracle.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-subsite/tcl/attribute-procs-oracle.xql 7 Aug 2017 23:47:58 -0000 1.4 +++ openacs-4/packages/acs-subsite/tcl/attribute-procs-oracle.xql 22 Nov 2017 14:50:28 -0000 1.5 @@ -2,25 +2,10 @@ oracle8.1.6 - - + - select a.object_type, a.attribute_name, - case when a.storage = 'type_specific' then t.table_name else a.table_name end as table_name, - nvl(a.column_name, a.attribute_name) as column_name - from acs_attributes a, acs_object_types t - where a.attribute_id = :attribute_id - and t.object_type = a.object_type - - - - - - - - select nvl(a.column_name, a.attribute_name) as name, a.pretty_name, a.attribute_id, a.datatype, v.enum_value, v.pretty_name as value_pretty_name @@ -65,28 +50,10 @@ - - -alter table $table_name drop column $attribute_name - - - - - -alter table $table_name add $attribute_name $sql_type - - - begin acs_attribute.drop_attribute(:object_type, :attribute_name); end; - - -alter table $table_name drop column $column_name - - - Index: openacs-4/packages/acs-subsite/tcl/attribute-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/attribute-procs-postgresql.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-subsite/tcl/attribute-procs-postgresql.xql 7 Aug 2017 23:47:58 -0000 1.5 +++ openacs-4/packages/acs-subsite/tcl/attribute-procs-postgresql.xql 22 Nov 2017 14:50:28 -0000 1.6 @@ -3,7 +3,7 @@ postgresql7.1 - + select coalesce(a.column_name, a.attribute_name) as name, @@ -60,30 +60,10 @@ - - -alter table $table_name drop column $attribute_name - - - - - -alter table $table_name add $attribute_name $sql_type - - - - -select acs_attribute__drop_attribute(:object_type, :attribute_name) - + + select acs_attribute__drop_attribute(:object_type, :attribute_name) + - - - - -alter table $table_name rename column $column_name to __DELETED__$column_name - - - Index: openacs-4/packages/acs-subsite/tcl/attribute-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/attribute-procs.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-subsite/tcl/attribute-procs.xql 20 Aug 2001 05:15:28 -0000 1.4 +++ openacs-4/packages/acs-subsite/tcl/attribute-procs.xql 22 Nov 2017 14:50:28 -0000 1.5 @@ -106,16 +106,37 @@ - - insert into acs_enum_values - (attribute_id, sort_order, enum_value, pretty_name) - select :attribute_id, :sort_order, :enum_value, :enum_value - from dual - where not exists (select 1 - from acs_enum_values v2 - where v2.pretty_name = :enum_value - and v2.attribute_id = :attribute_id) - + + insert into acs_enum_values + (attribute_id, sort_order, enum_value, pretty_name) + select :attribute_id, :sort_order, :enum_value, :enum_value + from dual + where not exists (select 1 + from acs_enum_values v2 + where v2.pretty_name = :enum_value + and v2.attribute_id = :attribute_id) + - + + + + + alter table $table_name drop column $attribute_name + + + + + + + alter table $table_name add $attribute_name $sql_type + + + + + + + alter table $table_name drop column $column_name + + +