Skip to content

Commit

Permalink
fix(test): remove active column
Browse files Browse the repository at this point in the history
  • Loading branch information
FerranMart committed Jan 15, 2025
1 parent 50dc24d commit 113d0f7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion test/plsql/ud/test_gw_fct_upsertfields.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SELECT is (

SELECT is (
(gw_fct_upsertfields($${"client":{"device":4, "lang":"es_ES", "infoType":1, "epsg":25831}, "form":{}, "feature":{"id":"1",
"tableName":"v_edit_drainzone"}, "data":{"filterFields":{}, "pageInfo":{}, "fields":{"drainzone_id": "1", "active": "false",
"tableName":"v_edit_drainzone"}, "data":{"filterFields":{}, "pageInfo":{}, "fields":{"drainzone_id": "1",
"expl_id": "0", "name": "2"}, "force_action":"UPDATE"}}$$)::JSON)->>'status',
'Accepted',
'Check if gw_fct_upsertfields --> "tableName":"v_edit_drainzone" returns status "Accepted"'
Expand Down
4 changes: 2 additions & 2 deletions test/upsert/ws/test_v_edit_dma.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ SET search_path = "SCHEMA_NAME", public, pg_catalog;
SELECT plan(6);

INSERT INTO v_edit_dma
(dma_id, "name", macrodma_id, muni_id, expl_id, sector_id, dma_type, descript, pattern_id, graphconfig, stylesheet, link, avg_press, effc, active, undelete, tstamp, insert_user, lastupdate, lastupdate_user, the_geom)
VALUES(-901, 'dma1-1d', NULL, NULL::int4[], '{1}', NULL::int4[], NULL, NULL, 'PTN-DMA-01-DEF', '{"use":[{"nodeParent":"113766", "toArc":[113906]}], "ignore":[], "forceClosed":[]}', '{"color":[251,181,174], "featureColor":"251,181,174"}', NULL, 30, NULL, true, NULL, '2024-02-21 12:08:16.880', 'postgres', NULL, NULL, 'SRID=25831;MULTIPOLYGON (((419194.61316627724 4576770.399179328, 419194.6598362386 4576769.953629146, 419194.38973924454 4576767.025545911, 419193.55359138723 4576764.206418283, 419192.18352535996 4576761.604583758, 419190.3321920317 4576759.320029375, 419188.07073710416 4576757.44054928, 419185.48606702185 4576756.038370837, 419182.6775092066 4576755.16737898, 419179.7529949602 4576754.861045434, 419176.82491172495 4576755.131142428, 419174.0057840976 4576755.967290285, 419171.40394957183 4576757.337356313, 419165.9938522016 4576760.90401556, 419163.7879399141 4576762.678242932, 419161.95466072566 4576764.835328746, 419160.5593114111 4576767.298443051, 419159.6515907893 4576769.979855936, 419159.2638295764 4576772.784062247, 419159.4098388475 4576775.6111832345, 419160.0844181212 4576778.360523991, 419161.2635405873 4576780.93415994, 419162.9052088813 4576783.240424669, 419164.9509509244 4576785.197174854, 419201.3464695487 4576813.952624451, 419259.3384593364 4576859.771060414, 419252.8073739664 4576866.130448861, 419252.8073739648 4576866.130448862, 419250.92192793905 4576867.966328044, 419249.02637734904 4576870.2143297745, 419247.60581261356 4576872.788940357, 419246.71482523874 4576875.591218951, 419246.38765536965 4576878.513475561, 419246.636875961 4576881.443409505, 419247.4529096051 4576884.268425064, 419248.8043965867 4576886.879958475, 419250.6394000191 4576889.177649974, 419252.8874017494 4576891.073200564, 419255.46201233176 4576892.493765299, 419258.2642909254 4576893.384752674, 419261.1865475355 4576893.711922543, 419264.1164814794 4576893.462701952, 419266.94149703864 4576892.6466683075, 419269.55303044966 4576891.295181326, 419271.8507219481 4576889.460177894, 419273.73616797384 4576887.624298711, 419273.7361679753 4576887.624298709, 419273.73616797547 4576887.624298709, 419281.88532746094 4576879.689374, 419281.8858570231 4576879.688745973, 419281.88649887784 4576879.6882332545, 419292.5112031606 4576869.340587349, 419294.34347424074 4576867.183350403, 419295.73789366917 4576864.720327259, 419296.64481460734 4576862.039211268, 419297.0319470883 4576859.235460744, 419296.88550766703 4576856.408900282, 419296.2107101651 4576853.660166596, 419295.0315800385 4576851.087125458, 419293.3900989762 4576848.7813872965, 419291.3447101864 4576846.825045493, 419219.94462044636 4576790.413109096, 419194.61316627724 4576770.399179328)))'::public.geometry);
(dma_id, "name", macrodma_id, muni_id, expl_id, sector_id, dma_type, descript, pattern_id, graphconfig, stylesheet, link, avg_press, effc, undelete, tstamp, insert_user, lastupdate, lastupdate_user, the_geom)
VALUES(-901, 'dma1-1d', NULL, NULL::int4[], '{1}', NULL::int4[], NULL, NULL, 'PTN-DMA-01-DEF', '{"use":[{"nodeParent":"113766", "toArc":[113906]}], "ignore":[], "forceClosed":[]}', '{"color":[251,181,174], "featureColor":"251,181,174"}', NULL, 30, NULL, NULL, '2024-02-21 12:08:16.880', 'postgres', NULL, NULL, 'SRID=25831;MULTIPOLYGON (((419194.61316627724 4576770.399179328, 419194.6598362386 4576769.953629146, 419194.38973924454 4576767.025545911, 419193.55359138723 4576764.206418283, 419192.18352535996 4576761.604583758, 419190.3321920317 4576759.320029375, 419188.07073710416 4576757.44054928, 419185.48606702185 4576756.038370837, 419182.6775092066 4576755.16737898, 419179.7529949602 4576754.861045434, 419176.82491172495 4576755.131142428, 419174.0057840976 4576755.967290285, 419171.40394957183 4576757.337356313, 419165.9938522016 4576760.90401556, 419163.7879399141 4576762.678242932, 419161.95466072566 4576764.835328746, 419160.5593114111 4576767.298443051, 419159.6515907893 4576769.979855936, 419159.2638295764 4576772.784062247, 419159.4098388475 4576775.6111832345, 419160.0844181212 4576778.360523991, 419161.2635405873 4576780.93415994, 419162.9052088813 4576783.240424669, 419164.9509509244 4576785.197174854, 419201.3464695487 4576813.952624451, 419259.3384593364 4576859.771060414, 419252.8073739664 4576866.130448861, 419252.8073739648 4576866.130448862, 419250.92192793905 4576867.966328044, 419249.02637734904 4576870.2143297745, 419247.60581261356 4576872.788940357, 419246.71482523874 4576875.591218951, 419246.38765536965 4576878.513475561, 419246.636875961 4576881.443409505, 419247.4529096051 4576884.268425064, 419248.8043965867 4576886.879958475, 419250.6394000191 4576889.177649974, 419252.8874017494 4576891.073200564, 419255.46201233176 4576892.493765299, 419258.2642909254 4576893.384752674, 419261.1865475355 4576893.711922543, 419264.1164814794 4576893.462701952, 419266.94149703864 4576892.6466683075, 419269.55303044966 4576891.295181326, 419271.8507219481 4576889.460177894, 419273.73616797384 4576887.624298711, 419273.7361679753 4576887.624298709, 419273.73616797547 4576887.624298709, 419281.88532746094 4576879.689374, 419281.8858570231 4576879.688745973, 419281.88649887784 4576879.6882332545, 419292.5112031606 4576869.340587349, 419294.34347424074 4576867.183350403, 419295.73789366917 4576864.720327259, 419296.64481460734 4576862.039211268, 419297.0319470883 4576859.235460744, 419296.88550766703 4576856.408900282, 419296.2107101651 4576853.660166596, 419295.0315800385 4576851.087125458, 419293.3900989762 4576848.7813872965, 419291.3447101864 4576846.825045493, 419219.94462044636 4576790.413109096, 419194.61316627724 4576770.399179328)))'::public.geometry);
SELECT is((SELECT count(*)::integer FROM v_edit_dma WHERE dma_id = -901), 1, 'INSERT: v_edit_dma -901 was inserted');
SELECT is((SELECT count(*)::integer FROM dma WHERE dma_id = -901), 1, 'INSERT: dma -901 was inserted');

Expand Down
4 changes: 2 additions & 2 deletions test/upsert/ws/test_v_edit_dqa.sql

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions test/upsert/ws/test_v_edit_presszone .sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ SET search_path = "SCHEMA_NAME", public, pg_catalog;
SELECT plan(6);

INSERT INTO v_edit_presszone
(presszone_id, "name", muni_id, expl_id, sector_id, presszone_type, descript, head, graphconfig, stylesheet, link, avg_press, active, tstamp, insert_user, lastupdate, lastupdate_user, the_geom)
VALUES('-901', 'pzone1-1s', NULL::int4[], '{1}', NULL::int4[], NULL, NULL, 103.85, '{"use":[{"nodeParent":"1105", "toArc":[113881]}], "ignore":[], "forceClosed":[]}', '{"color":[251,181,174], "featureColor":"251,181,174"}', NULL, NULL, true, '2024-02-21 12:08:16.880', 'postgres', '2024-09-20 11:43:42.716', 'postgres', 'SRID=25831;MULTIPOLYGON (((419236.42319 4576873.35927, 419236.45781 4576874.92716, 419236.79765 4576876.45817, 419237.42965 4576877.89347, 419238.32951 4576879.17788, 419239.46267 4576880.26207, 419240.78556 4576881.10435, 419242.24735 4576881.67237, 419257.22297 4576885.85642, 419259.23364 4576886.41818, 419260.77816 4576886.6901, 419262.34605 4576886.65548, 419263.87706 4576886.31564, 419265.31235 4576885.68364, 419266.59677 4576884.78378, 419267.68095 4576883.65063, 419268.52324 4576882.32773, 419269.09125 4576880.86594, 419269.36317 4576879.32142, 419269.32855 4576877.75353, 419268.98871 4576876.22252, 419268.35671 4576874.78723, 419267.45685 4576873.50281, 419266.3237 4576872.41862, 419265.00081 4576871.57634, 419263.53901 4576871.00832, 419261.52835 4576870.44656, 419246.55273 4576866.26251, 419245.00821 4576865.99059, 419243.44031 4576866.02521, 419241.9093 4576866.36505, 419240.47401 4576866.99705, 419239.18959 4576867.89691, 419238.10541 4576869.03007, 419237.26313 4576870.35296, 419236.69511 4576871.81475, 419236.42319 4576873.35927)))'::public.geometry);
(presszone_id, "name", muni_id, expl_id, sector_id, presszone_type, descript, head, graphconfig, stylesheet, link, avg_press, tstamp, insert_user, lastupdate, lastupdate_user, the_geom)
VALUES('-901', 'pzone1-1s', NULL::int4[], '{1}', NULL::int4[], NULL, NULL, 103.85, '{"use":[{"nodeParent":"1105", "toArc":[113881]}], "ignore":[], "forceClosed":[]}', '{"color":[251,181,174], "featureColor":"251,181,174"}', NULL, NULL, '2024-02-21 12:08:16.880', 'postgres', '2024-09-20 11:43:42.716', 'postgres', 'SRID=25831;MULTIPOLYGON (((419236.42319 4576873.35927, 419236.45781 4576874.92716, 419236.79765 4576876.45817, 419237.42965 4576877.89347, 419238.32951 4576879.17788, 419239.46267 4576880.26207, 419240.78556 4576881.10435, 419242.24735 4576881.67237, 419257.22297 4576885.85642, 419259.23364 4576886.41818, 419260.77816 4576886.6901, 419262.34605 4576886.65548, 419263.87706 4576886.31564, 419265.31235 4576885.68364, 419266.59677 4576884.78378, 419267.68095 4576883.65063, 419268.52324 4576882.32773, 419269.09125 4576880.86594, 419269.36317 4576879.32142, 419269.32855 4576877.75353, 419268.98871 4576876.22252, 419268.35671 4576874.78723, 419267.45685 4576873.50281, 419266.3237 4576872.41862, 419265.00081 4576871.57634, 419263.53901 4576871.00832, 419261.52835 4576870.44656, 419246.55273 4576866.26251, 419245.00821 4576865.99059, 419243.44031 4576866.02521, 419241.9093 4576866.36505, 419240.47401 4576866.99705, 419239.18959 4576867.89691, 419238.10541 4576869.03007, 419237.26313 4576870.35296, 419236.69511 4576871.81475, 419236.42319 4576873.35927)))'::public.geometry);
SELECT is((SELECT count(*)::integer FROM v_edit_presszone WHERE presszone_id = '-901'), 1, 'INSERT: v_edit_presszone -901 was inserted');
SELECT is((SELECT count(*)::integer FROM presszone WHERE presszone_id = '-901'), 1, 'INSERT: presszone -901 was inserted');

Expand Down
4 changes: 2 additions & 2 deletions test/upsert/ws/test_v_edit_sector.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ SET search_path = "SCHEMA_NAME", public, pg_catalog;
SELECT plan(6);

INSERT INTO v_edit_sector
(sector_id, "name", muni_id, expl_id, macrosector_id, sector_type, descript, parent_id, pattern_id, graphconfig, stylesheet, link, avg_press, active, undelete, tstamp, insert_user, lastupdate, lastupdate_user, the_geom)
VALUES(-901, 'sector1-1s', NULL::int4[], '{1}', 1, 'SOURCE', NULL, NULL, 'PTN-SECT-01-DEF', '{"use":[{"nodeParent":"1097", "toArc":[2207]}], "ignore":[], "forceClosed":[]}', '{"color":[251,181,174], "featureColor":"251,181,174"}', NULL, NULL, true, NULL, '2024-02-21 12:08:16.880', 'postgres', NULL, NULL, 'SRID=25831;MULTIPOLYGON (((419235.0724363852 4576868.250503188, 419234.4932468037 4576868.148748435, 419233.90533463104 4576868.161934724, 419233.33128971315 4576868.289555386, 419232.79316906276 4576868.526706744, 419232.3116493441 4576868.864276531, 419231.905232396 4576869.289294019, 419231.58953432005 4576869.785428402, 419231.3766854501 4576870.333616289, 419231.27486425795 4576870.912794194, 419231.2879831054 4576871.500707876, 419231.41553791583 4576872.07476743, 419231.65262754296 4576872.612915281, 419231.99014209193 4576873.0944737205, 419232.41511295614 4576873.50093942, 419232.91121112107 4576873.816694408, 419233.45937458816 4576874.02960616, 419260.5794625765 4576881.6027119355, 419261.15864610387 4576881.704600884, 419261.7465784416 4576881.691543992, 419262.32066764176 4576881.564042986, 419262.8588536942 4576881.326997234, 419263.3404562071 4576880.989515477, 419263.7469690731 4576880.564565826, 419264.0627715874 4576880.068477439, 419264.2757286906 4576879.520313058, 419264.3776572712 4576878.941136504, 419264.36464061134 4576878.353203274, 419264.23717889044 4576877.77910535, 419264.00016996555 4576877.240903079, 419263.6627211658 4576876.759277473, 419263.23779933306 4576876.352735529, 419262.74173255695 4576876.036899068, 419262.1935827498 4576875.823904456, 419245.2072961848 4576871.078089832, 419235.0724363852 4576868.250503188)))'::public.geometry);
(sector_id, "name", muni_id, expl_id, macrosector_id, sector_type, descript, parent_id, pattern_id, graphconfig, stylesheet, link, avg_press, undelete, tstamp, insert_user, lastupdate, lastupdate_user, the_geom)
VALUES(-901, 'sector1-1s', NULL::int4[], '{1}', 1, 'SOURCE', NULL, NULL, 'PTN-SECT-01-DEF', '{"use":[{"nodeParent":"1097", "toArc":[2207]}], "ignore":[], "forceClosed":[]}', '{"color":[251,181,174], "featureColor":"251,181,174"}', NULL, NULL, NULL, '2024-02-21 12:08:16.880', 'postgres', NULL, NULL, 'SRID=25831;MULTIPOLYGON (((419235.0724363852 4576868.250503188, 419234.4932468037 4576868.148748435, 419233.90533463104 4576868.161934724, 419233.33128971315 4576868.289555386, 419232.79316906276 4576868.526706744, 419232.3116493441 4576868.864276531, 419231.905232396 4576869.289294019, 419231.58953432005 4576869.785428402, 419231.3766854501 4576870.333616289, 419231.27486425795 4576870.912794194, 419231.2879831054 4576871.500707876, 419231.41553791583 4576872.07476743, 419231.65262754296 4576872.612915281, 419231.99014209193 4576873.0944737205, 419232.41511295614 4576873.50093942, 419232.91121112107 4576873.816694408, 419233.45937458816 4576874.02960616, 419260.5794625765 4576881.6027119355, 419261.15864610387 4576881.704600884, 419261.7465784416 4576881.691543992, 419262.32066764176 4576881.564042986, 419262.8588536942 4576881.326997234, 419263.3404562071 4576880.989515477, 419263.7469690731 4576880.564565826, 419264.0627715874 4576880.068477439, 419264.2757286906 4576879.520313058, 419264.3776572712 4576878.941136504, 419264.36464061134 4576878.353203274, 419264.23717889044 4576877.77910535, 419264.00016996555 4576877.240903079, 419263.6627211658 4576876.759277473, 419263.23779933306 4576876.352735529, 419262.74173255695 4576876.036899068, 419262.1935827498 4576875.823904456, 419245.2072961848 4576871.078089832, 419235.0724363852 4576868.250503188)))'::public.geometry);

SELECT is((SELECT count(*)::integer FROM v_edit_sector WHERE sector_id = -901), 1, 'INSERT: v_edit_sector -901 was inserted');
SELECT is((SELECT count(*)::integer FROM sector WHERE sector_id = -901), 1, 'INSERT: sector -901 was inserted');
Expand Down
4 changes: 3 additions & 1 deletion updates/36/36017/ws/ddlview.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,8 @@ AS SELECT p.presszone_id,
p.tstamp,
p.insert_user,
p.lastupdate,
p.lastupdate_user
p.lastupdate_user,
p.avg_press
FROM selector_expl s,
presszone p
WHERE (p.presszone_id::text <> ALL (ARRAY['0'::character varying::text, '-1'::character varying::text])) AND s.expl_id = p.expl_id AND s.cur_user = CURRENT_USER
Expand All @@ -1028,6 +1029,7 @@ AS SELECT p.presszone_id,
p.insert_user,
p.lastupdate,
p.lastupdate_user,
p.avg_press,
p.the_geom
FROM
selector_expl,
Expand Down

0 comments on commit 113d0f7

Please sign in to comment.