Added the necessary database code to convert the contents of event
queues into actual event records. The changes include:
* a new table, events.pending_events, which is automatically filled by
a trigger when events are inserted into queue tables,
* the game.events.batchSize constant which defines the maximal amount
of events to process in a single transaction,
* the events.eq_process() stored procedure, which processes the events.
In addition, the "hstore" extension was added as it is the easiest way
to convert events from the queues' table model to the store's
meta-model.
Added tables allowing event data to be stored on the long term:
* events.events_v2 (which will need to be renamed) contains the events'
main entry
* events.field_values stores field values for all events.
Added functions that allow new event types to be defined. The functions
are:
* events.evdef_start() which starts recording a definition,
* events.evdef_addfld_*(), a set of functions to add fields to
the current definition,
* events.evdef_finalise() which adds the definition records and creates
the event queue table.
It is not possible to modify or delete event definitions at this time.
They will be added if and when they become necessary.
* The main loader script has been updated to generate the list of files
it needs to load automatically. As a consequence, files that contained
manually-maintained lists of scripts have been removed, and definition
directories have been renamed accordingly.
* PostgreSQL extension loading and configuration has been moved to a
separate script to be loaded automatically in the main transaction.
* Data and function definition scripts that had the -data or -functions
suffix have been renamed (the suffix is unnecessary).
* Unit tests have been reorganised to follow the definition's structure.
* Documentation has been improved
2012-01-06 11:19:19 +01:00
Renamed from legacyworlds-server-data/db-structure/parts/data/170-events-data.sql (Browse further)