AnsweredAssumed Answered

update 3.2 to 4.0 tab alf_node col order

Question asked by halehm on Sep 26, 2016
Latest reply on Sep 27, 2016 by lulrich

Hallo,

 

i am running 3.2 CE and would upgrade to next step (4.0.d).

But after restart tab alf_node has wrong order on columns.

 

Details:

To debug i run following script:

----

while [ 1 -eq 1 ]; do
date;echo \\\d alf_node| $psql $opt | grep -n _id
sleep 120;
done

---

 

1. After create table alf_node col locale_id not exist:

---

Mon Sep 26 19:13:07 UTC 2016
3: store_id | bigint | not null
5: transaction_id | bigint | not null
7: type_qname_id | bigint | not null
8: acl_id | bigint |

---

 

2. After first start alfresco running schema-update. Result:

--

Mon Sep 26 20:25:09 UTC 2016
3: store_id | bigint | not null
5: transaction_id | bigint | not null
7: type_qname_id | bigint | not null
8: acl_id | bigint |
14: locale_id | bigint | not null default 1

---

But this is wrong.

According to org.hibernate.dialect.PostgreSQLDialect/AlfrescoCreate-RepoTables.sql

should be:  col8=locale_id

----

# more AlfrescoCreate-RepoTables.sql

...

CREATE TABLE alf_node
(
id INT8 NOT NULL,
version INT8 NOT NULL,
store_id INT8 NOT NULL,
uuid VARCHAR(36) NOT NULL,
transaction_id INT8 NOT NULL,
node_deleted BOOL NOT NULL,
type_qname_id INT8 NOT NULL,
locale_id INT8 NOT NULL,
acl_id INT8,
audit_creator VARCHAR(255),
audit_created VARCHAR(30),
audit_modifier VARCHAR(255),
audit_modified VARCHAR(30),
audit_accessed VARCHAR(30),
PRIMARY KEY (id),

---

 

3. so i received following error:

 

 

---

2016-09-26 17:55:58,056 WARN [domain.schema.SchemaBootstrap] [main] Schema validation found 15 potential problems, results written to: /opt/alfresco-4.0.d/tomcat/temp/Alfresco/Alfresco-PostgreSQLDialect-Validation-Pre-Upgrade-5348831433842333714.txt

 

# more /opt/alfresco-4.0.d/tomcat/temp/Alfresco/Alfresco-PostgreSQLDialect-Validation-Pre-Upgrade-5348831433842333714.txt | head -5
Difference: expected column .alf_node.locale_id.order="8", but was .alf_node.locale_id.order="14"
Difference: expected column .alf_node.acl_id.order="9", but was .alf_node.acl_id.order="8"
Difference: expected column .alf_node.audit_creator.order="10", but was .alf_node.audit_creator.order="9"
Difference: expected column .alf_node.audit_created.order="11", but was .alf_node.audit_created.order="10"
Difference: expected column .alf_node.audit_modifier.order="12", but was .alf_node.audit_modifier.order="11"

---

 

Whats going wrong?

Howto fix this?

 

 

regards Harry

 

(der mit dem neuen Portal so seine Probleme hat...)

 

 

[1] Alfresco Community 4.0.d Release Notes 

   Table 'alf_node': Locale in which node was last edited is recorded. 'locale_id' column added and foreign key referencing 'alf_locale.id'.

Outcomes