Event definitions - missing I18N properties

Added the display name and template I18N properties to event
definitions. Modified events.evdef_start() accordingly.
This commit is contained in:
Emmanuel BENOîT 2012-06-29 17:31:14 +02:00
parent 8f2fd29c71
commit a6562052d3
2 changed files with 53 additions and 7 deletions
legacyworlds-server-data/db-structure/parts/030-data

View file

@ -24,7 +24,17 @@ CREATE TABLE events.event_definitions(
CHECK( evdef_priority BETWEEN 0 AND 4 ) ,
/* Whether the priority for this type of event may be adjusted */
evdef_adjustable BOOLEAN NOT NULL
evdef_adjustable BOOLEAN NOT NULL ,
/* Internationalised string that contains the name of the event type;
* used when displaying priority settings.
*/
evdef_name_id INT NOT NULL ,
/* Internationalised string that contains the template to use when
* generating the output for a single event.
*/
evdef_template_id INT NOT NULL
);
/* Unique index allowing the custom priorities table to reference only
@ -32,6 +42,17 @@ CREATE TABLE events.event_definitions(
*/
CREATE UNIQUE INDEX idx_evdef_adjustables
ON events.event_definitions( evdef_id , evdef_adjustable );
/* Foreign key indexes */
CREATE UNIQUE INDEX idx_evdef_name
ON events.event_definitions( evdef_name_id );
CREATE UNIQUE INDEX idx_evdef_template
ON events.event_definitions( evdef_template_id );
ALTER TABLE events.event_definitions
ADD CONSTRAINT fk_evdef_name
FOREIGN KEY ( evdef_name_id ) REFERENCES defs.strings ,
ADD CONSTRAINT fk_evdef_template
FOREIGN KEY ( evdef_template_id ) REFERENCES defs.strings;
GRANT SELECT ON events.event_definitions TO :dbuser;