Renamed technology tables and views
* Removed the _v2 suffix from some tables and views.
This commit is contained in:
parent
ab04752169
commit
071257786c
19 changed files with 82 additions and 82 deletions
legacyworlds-server-data/db-structure/parts/050-updates
|
@ -60,7 +60,7 @@ AS $gu_research_get_empires$
|
|||
USING ( updtgt_id , updtype_id , update_id )
|
||||
INNER JOIN emp.empires _empire
|
||||
USING ( name_id )
|
||||
INNER JOIN emp.technologies_v2 _emp_tech
|
||||
INNER JOIN emp.technologies _emp_tech
|
||||
ON _emp_tech.empire_id = _empire.name_id
|
||||
INNER JOIN defs.technologies _tech
|
||||
USING ( technology_name_id )
|
||||
|
@ -121,7 +121,7 @@ BEGIN
|
|||
SELECT _emp_tech.technology_name_id , _emp_tech.emptech_points , _emp_tech.emptech_priority ,
|
||||
_points * _weights.emptech_weight / ( _totals.emptech_total_weight * 1440 ) AS emptech_new_points ,
|
||||
_def.technology_points::DOUBLE PRECISION AS technology_points
|
||||
FROM emp.technologies_v2 _emp_tech
|
||||
FROM emp.technologies _emp_tech
|
||||
INNER JOIN emp.research_weights_view _weights
|
||||
USING ( empire_id , technology_name_id )
|
||||
INNER JOIN emp.research_total_weights_view _totals
|
||||
|
@ -133,7 +133,7 @@ BEGIN
|
|||
LOOP
|
||||
|
||||
IF _record.emptech_points + _record.emptech_new_points >= _record.technology_points THEN
|
||||
UPDATE emp.technologies_v2
|
||||
UPDATE emp.technologies
|
||||
SET emptech_state = 'PENDING' ,
|
||||
emptech_points = NULL ,
|
||||
emptech_priority = NULL
|
||||
|
@ -141,7 +141,7 @@ BEGIN
|
|||
AND empire_id = _empire;
|
||||
|
||||
ELSE
|
||||
UPDATE emp.technologies_v2
|
||||
UPDATE emp.technologies
|
||||
SET emptech_points = emptech_points + _record.emptech_new_points
|
||||
WHERE technology_name_id = _record.technology_name_id
|
||||
AND empire_id = _empire;
|
||||
|
@ -189,4 +189,4 @@ REVOKE EXECUTE
|
|||
SELECT sys.register_update_type( 'Empires' , 'EmpireResearch' ,
|
||||
'Empire research points are being attributed to technologies.' ,
|
||||
'process_empire_research_updates'
|
||||
);
|
||||
);
|
||||
|
|
Reference in a new issue