
/*
CALL `add_part_group`('krypton', 'Kryptoner', 'En krypton är typiskt dålig för stålmannen');
CALL `add_part_group`('visp', 'Vispar', 'Med en visp kan man göra smör');
CALL `add_part_group`('talisman', 'Tasmanska jävlar', 'Det är hittepå');
CALL `add_part_group`('Oloong', 'Semi-grönt/svart & Te', 'Mellantinget i fermenteringen av teet, brukar förekomma i rullade bollar. Bryggs i 85 grader, 4 minuter.');




CALL add_internal_part('Kinesiskt Oloong', 'Oloong', 'Kinesiskt Oloong som smakar mycket te', @fick_internal_pn); 
SELECT @fick_internal_pn;

SELECT * 
FROM internal_parts ip
JOIN part_groups pg ON ip.part_group_id = pg.part_group_id
JOIN group_details_oloong gdo ON ip.internal_pn = gdo.internal_pn 
WHERE ip.internal_pn = 4;


SET @part_display_name := 'Token item nr.1';
SET @part_group_id := 'krypton';
SET @part_description := 'This token will make thing great again';
CALL add_internal_part(@part_display_name, @part_group_id, @part_description, @mymandude);
SELECT @mymandude;

SET @part_display_name := 'Token item nr.2';
SET @part_group_id := 'krypton';
CALL add_internal_part(@part_display_name, @part_group_id, @part_description, @mymandude);
SELECT @mymandude;

SET @part_display_name := 'Token item nr.3';
SET @part_group_id := 'visp';
CALL add_internal_part(@part_display_name, @part_group_id, @part_description, @mymandude);
SELECT @mymandude;

DELETE FROM `internal_parts` WHERE `internal_pn` = 1;

SELECT * 
FROM `internal_parts` ip
JOIN `group_details_krypton` gdk ON ip.internal_pn = gdk.internal_pn; 
*/

CALL `add_part_group`('car', 'Cars', 'Automotive vehicles for transporting people');

ALTER TABLE jegatroncomponents.group_details_car ADD(
  `series` varchar(100) DEFAULT NULL,
  `color` varchar(50) NOT NULL,
  `release_date` timestamp NOT NULL
);

INSERT INTO manufacturers (mfr) VALUES ('volvo');


INSERT INTO manufacturer_parts (mpn, mfr, part_group_id, part_description, lifecycle_status)
VALUES ('S60', 'volvo', 'car', 'A good car', 'Obsolete'),
('S80', 'volvo', 'car', 'A bigger good car', 'Obsolete');