Naughty Programmer's Madness

    midas-estimator-common

    1.6.0 • Public • Published

    Midas Estimator Common

    Cambios en materiales

    1. Ejecutar los siguientes scripts
    ALTER TABLE public.materials_metallurgies DROP CONSTRAINT materials_metallurgies_material_metallurgy_key;
    ALTER TABLE public.materials_metallurgies DROP CONSTRAINT materials_metallurgies_material_fkey;
    ALTER TABLE public.pump_size_items DROP CONSTRAINT pump_size_items_material_name_fkey;
    ALTER TABLE public.materials DROP CONSTRAINT materials_pkey;
    DROP TABLE public.materials_metallurgies;
    DROP TABLE public.materials;
    1. npm start de estimator o estimatorbackoffice
    2. Ejecutar los siguientes scripts
    ALTER TABLE public.pump_size_items ADD COLUMN material_id integer;
    ALTER TABLE public.pump_size_items ADD CONSTRAINT pump_size_items_materials_id_fkey FOREIGN KEY (material_id) REFERENCES public.materials(id) ON DELETE SET NULL ON UPDATE CASCADE;
    INSERT INTO public.materials ("name",description,"type","cost",factor_importation,cost_kg,created_at,updated_at) VALUES
    	 ('CA6NM','CA6NM','IMPELLERS',1.0,1.5,NULL,'2019-08-26 18:45:31.937158-03','2019-08-26 18:45:31.937158-03'),
    	 ('AISI 410','AISI 410','LAMINADOS',6.0,1.0,NULL,'2019-08-26 18:45:31.937158-03','2019-08-26 18:45:31.937158-03'),
    	 ('OTHER PARTS','AISI 410','OTHER PARTS',1.3,1.0,NULL,'2019-08-26 18:45:31.937158-03','2019-08-26 18:45:31.937158-03'),
    	 ('410 E9','410 E9','SHAFT',25.0,1.35,NULL,'2019-08-26 18:45:31.937158-03','2019-08-26 18:45:31.937158-03'),
    	 ('CF3M','CF3M','LAMINADOS',25.0,1.0,NULL,'2019-10-18 18:09:29.131636-03','2019-10-18 18:09:29.131636-03'),
    	 ('DUPLEX 3A','DUPLEX 3A','LAMINADOS',26.0,1.05,NULL,'2019-10-22 16:02:54.028891-03','2019-10-22 16:02:54.028891-03'),
    	 ('DUPLEX 5A','DUPLEX 5A','LAMINADOS',26.0,1.05,NULL,'2019-10-22 16:02:54.028891-03','2019-10-22 16:02:54.028891-03'),
    	 ('DUPLEX 5A+WC','DUPLEX 5A+WC','LAMINADOS',26.0,1.05,NULL,'2019-10-22 16:02:54.028891-03','2019-10-22 16:02:54.028891-03'),
    	 ('DUPLEX 3A+WC','DUPLEX 3A+WC','LAMINADOS',26.0,1.05,NULL,'2019-10-22 16:07:10.145754-03','2019-10-22 16:07:10.145754-03'),
    	 ('AISI 1045','AISI 1045','LAMINADOS',6.0,1.0,NULL,'2019-08-26 18:45:31.937158-03','2019-08-26 18:45:31.937158-03'),
    	 ('AISI 316','AISI 316','LAMINADOS',25.0,1.0,NULL,'2019-08-26 18:45:31.937158-03','2019-08-26 18:45:31.937158-03'),
    	 ('NITRONIC','NITRONIC','LAMINADOS',45.0,1.35,NULL,'2019-08-26 18:45:31.937158-03','2019-08-26 18:45:31.937158-03'),
    	 ('STELLITE','STELLITE','STELLITE',175.0,NULL,175.0,'2019-08-26 18:45:31.937158-03','2019-08-26 18:45:31.937158-03'),
    	 ('NITRONIC 50','NITRONIC 50','LAMINADOS',35.5,1.0,NULL,'2019-10-18 18:06:16.543014-03','2019-10-18 18:06:16.543014-03'),
    	 ('NITRONIC 60','NITRONIC 60','LAMINADOS',35.5,1.0,NULL,'2019-10-18 18:06:30.006227-03','2019-10-18 18:06:30.006227-03'),
    	 ('WC-Ni 60-40','WC-Ni 60-40','APORTE',250.0,NULL,NULL,'2019-10-23 16:00:47.303857-03','2019-10-23 16:00:47.303857-03'),
    	 ('CHANNEL RING','NITRONIC 60','CHANNEL RING',1.3,1.0,NULL,'2019-11-15 15:24:42.712847-03','2019-11-15 15:24:42.712847-03');
    UPDATE public.pump_size_items
    	SET material_id = (select id from public.materials where name = public.pump_size_items.material_name) ;

    Changelog

    1.0.0 starting

    Keywords

    none

    Install

    npm i midas-estimator-common

    DownloadsWeekly Downloads

    10

    Version

    1.6.0

    License

    ISC

    Unpacked Size

    137 kB

    Total Files

    70

    Last publish

    Collaborators

    • rperezmidas