-- pridanie tarif regiotv do databazy globis

\encoding UTF8

INSERT INTO tarif (name, supplier, root_tarif) VALUES ('RegioTV (root)', 2, NULL);
INSERT INTO tarif (name, supplier, root_tarif) SELECT 'Medzevnet TV+R analog' AS name, 2 AS supplier, id AS root_tarif FROM tarif WHERE name='RegioTV (root)';
INSERT INTO tarif (name, supplier, root_tarif) SELECT 'RegioTV základný maďarský balík' AS name, 2 AS supplier, id AS root_tarif FROM tarif WHERE name='RegioTV (root)';
INSERT INTO tarif (name, supplier, root_tarif) SELECT 'RegioTV rozšírený maďarský balík' AS name, 2 AS supplier, id AS root_tarif FROM tarif WHERE name='RegioTV (root)';
INSERT INTO tarif (name, supplier, root_tarif) SELECT 'RegioTV minimum' AS name, 2 AS supplier, id AS root_tarif FROM tarif WHERE name='RegioTV (root)';

INSERT INTO tarifaccess (tarif, pid) SELECT id AS tarif, NULL AS pid FROM tarif WHERE name='Medzevnet TV+R analog';
INSERT INTO tarifaccess (tarif, pid) SELECT id AS tarif, NULL AS pid FROM tarif WHERE name='RegioTV základný maďarský balík';
INSERT INTO tarifaccess (tarif, pid) SELECT id AS tarif, NULL AS pid FROM tarif WHERE name='RegioTV rozšírený maďarský balík';
INSERT INTO tarifaccess (tarif, pid) SELECT id AS tarif, NULL AS pid FROM tarif WHERE name='RegioTV minimum';
