sql/ folder

by Armaghan Saqib, Thursday, December 15, 2022, 01:02 (495 days ago) @ Armaghan Saqib
edited by Armaghan Saqib, Thursday, December 15, 2022, 01:07

'sql/' sub folder within sql-ledger folder 3 type of sql files.

1. SQL-Ledger database tables creation files. These are:

Pg-tables.sql
Pg-indices.sql
Pg-functions.sql
Pg-custom_tables.sql

2. Chart of accounts

These file names end with '-chart.sql' and contain country/industry specific chart of accounts. When you create a new data set using admin.pl, chart of accounts selection shown there is generated from filenames in this folder (by removing '-chart.sql' from the file name)

You can also add your own chart of accounts in this folder with name like 'MyIndustryChart-chart.sql' and it will appear in admin.pl as 'MyIndustryChart' for you to select when creating a new dataset.

3. Database upgrade files

These files are used to upgrade existing sql-ledger databases whenever a new enhancement is made which adds new tables or table columns.

These are named as 'Pg-upgrade-oldversion-newversion.sql

These are executed automatically whenever you login to sql-ledger first time with upgraded code.

Exercises:

1. Browser sql/ folder and view some of the files there to get a clear idea of what is happening there.


Complete thread:

 RSS Feed of thread