Hi @litvinovg,
That part of the upgrade process is scripted with SQL; the upgrade process overall is described by dbscripts/xml/upgrade.xml
, which will show you the sequence the scripts run in. The publications
table is described in dbscripts/xml/ojs_schema.xml
:
<table name="publications">
<field name="publication_id" type="I8">
<KEY />
<AUTOINCREMENT />
</field>
...
</table>
That schema descriptor is applied to the database in dbscripts/xml/upgrade.xml
:
<schema file="dbscripts/xml/ojs_schema.xml" />
You can see some of the other upgrade scripts work with the publications
table’s content, populating it from other contents. For example, the main query to populate that table is in dbscripts/xml/upgrade/3.2.0_versioning.xml
:
<query>
INSERT INTO publications (access_status, date_published, last_modified, locale, section_id, seq, submission_id, status, version)
SELECT COALESCE(ps.access_status, 0), COALESCE(ps.date_published, NULL), s.last_modified, s.locale, s.section_id, COALESCE(ps.seq, 0), s.submission_id, s.status, 1
FROM temp_submissions as s
LEFT JOIN temp_published_submissions as ps
ON (s.submission_id = ps.submission_id)
GROUP BY s.submission_id, ps.access_status, ps.date_published, s.last_modified, s.section_id, ps.seq, s.locale, s.status;
</query>
Regards,
Alec Smecher
Public Knowledge Project Team