Database structure
From iDempiere en
See the database structure in
- this SchemaSpy analysis of an iDempiere database generated on 2023-12-24
- this SchemaSpy analysis of an iDempiere database generated on 2019-07-09
- this SchemaSpy analysis of an iDempiere database generated on 2017-12-21. (The generated database structure source code is on GitHub.)
This is made by schemaspy,you can made it by yourself,but it has some different, it is group by idempiere domain knowledge. See Tables by Module
You can fill the comments on postgresql database executing the following code:
DO $$
DECLARE
rec RECORD;
cmd varchar;
BEGIN
FOR rec IN
SELECT t.TableName,
CASE WHEN t.IsView='Y' THEN 'VIEW' ELSE 'TABLE' END AS ObjectType,
COALESCE(t.Description,t.Name) AS Description
FROM AD_Table t
WHERE t.IsActive='Y'
ORDER BY 1
LOOP
cmd := 'COMMENT ON ' || rec.ObjectType || ' ' || rec.TableName || ' IS ''' ||
REPLACE(rec.Description,'''', '''''') || '''';
RAISE NOTICE '%', cmd;
EXECUTE cmd;
END LOOP;
FOR rec IN
SELECT t.TableName,
c.ColumnName,
COALESCE(c.Description,c.Name) AS Description
FROM AD_Table t JOIN AD_Column c ON (c.AD_Table_ID=t.AD_Table_ID)
WHERE t.IsActive='Y' AND c.IsActive='Y' AND c.ColumnSQL IS NULL
ORDER BY 1,2
LOOP
cmd := 'COMMENT ON COLUMN '|| rec.TableName || '.' || rec.ColumnName || ' IS ''' ||
REPLACE(rec.Description,'''', '''''') || '''';
RAISE NOTICE '%', cmd;
EXECUTE cmd;
END LOOP;
END $$;
if SQL Error [42809]: ERROR: "t_spool" is not a view , set it is table. NOTE: this was solved with IDEMPIERE-6592
update ad_table set IsView ='N' where tablename ='T_Spool'
command
java -jar schemaspy-6.2.4.jar -t pgsql -dp postgresql-42.7.6.jar -db idempiere -host localhost -port 5432 -u adempiere -p adempiere -s adempiere -noimplied -o D://output