Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The second step will be to make a script that nulls the EXTMANINTERF_ID column of the products table. (Attached scriptActivateV2.sql is an example for reference)

Code Block
languagesql
titleSecond step: product update
update product set EXTMANINTERF_ID=null where INSTIT_CODE=:institCode and product_id in (select product_id from product where instit_code = :institCode);

Third step is to make another script to change the ticket kind to 'SECUTIX' of all tickets linked to a product in the current season. (Attached  updateKindToSecutixWBA.sql is an example for reference)

Code Block
languagesql
titleThird step: ticket update
UPDATE ticket set kind='SECUTIX' where INSTIT_CODE=:institCode AND ticket_id in (
select t.ticket_id
from ticket t
join item it on it.item_id=t.dn_item_id and it.instit_code = t.instit_code
join product p on p.PRODUCT_ID = it.PRODUCT_ID and p.instit_code = it.instit_code
where  p.code in (select p2.code from product p2 where p2.instit_code = :institCode) and t.state = 'NOT_PRINTED' AND t.INSTIT_CODE=:institCode );

Fourth step, to be able to print season ticket from the plugin it is necessary to leave active only the card type of fortress. Script CardType.sql is an example of how to do it.

Code Block
languagesql
titleFourth step: card_type update
update card_type set active='F' where  cardtype_id in (select cardtype_id from card_type ct2 where ct2.code != 'Fortress' and ct2.instit_code = :instit_code) and instit_code = :instit_code; 

The last step will be to change the Access control type to Fortress:

...

View file
namescriptActivateV2.sql
height250
view-file
View file
nameupdateKindToSecutixWba.sql
height250

Code Block

...

language

...

sql

...

titleFourth step: General update
update card_type set active='F' where  cardtype_id in (select cardtype_id from card_type ct2 where ct2.code != 'Fortress' and ct2.instit_code = :instit_code) and instit_code = :instit_code;