Database structure

From iDempiere en

See the database structure in


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

schemaspy github

schemaspy GUI

Image.png
Schema gui step2.png
Cookies help us deliver our services. By using our services, you agree to our use of cookies.