From 7e852705665db34c528b9bb80ff215ae75a6c9fe Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Wed, 24 Jan 2024 01:01:22 +0100 Subject: [PATCH] Add pet icon --- deploy/available_icons.sql | 2 ++ deploy/available_icons@v1.sql | 37 +++++++++++++++++++++++++++++++++++ revert/available_icons.sql | 8 ++++++-- revert/available_icons@v1.sql | 7 +++++++ sqitch.plan | 1 + verify/available_icons.sql | 1 + verify/available_icons@v1.sql | 35 +++++++++++++++++++++++++++++++++ 7 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 deploy/available_icons@v1.sql create mode 100644 revert/available_icons@v1.sql create mode 100644 verify/available_icons@v1.sql diff --git a/deploy/available_icons.sql b/deploy/available_icons.sql index 04a9ae2..0b31eef 100644 --- a/deploy/available_icons.sql +++ b/deploy/available_icons.sql @@ -20,6 +20,7 @@ values ('area') , ('nopet') , ('outing') , ('person') + , ('pet') , ('plot') , ('pool') , ('puzzle') @@ -32,6 +33,7 @@ values ('area') , ('washer') , ('wheelchair') , ('wifi') +on conflict (icon_name) do nothing ; commit; diff --git a/deploy/available_icons@v1.sql b/deploy/available_icons@v1.sql new file mode 100644 index 0000000..04a9ae2 --- /dev/null +++ b/deploy/available_icons@v1.sql @@ -0,0 +1,37 @@ +-- Deploy camper:available_icons to pg +-- requires: schema_camper +-- requires: icon + +begin; + +insert into camper.icon (icon_name) +values ('area') + , ('baby') + , ('ball') + , ('bicycle') + , ('campfire') + , ('castle') + , ('ecofriendly') + , ('electricity') + , ('fridge') + , ('hvac') + , ('information') + , ('kayak') + , ('nopet') + , ('outing') + , ('person') + , ('plot') + , ('pool') + , ('puzzle') + , ('restaurant') + , ('route') + , ('rv') + , ('shower') + , ('store') + , ('toilet') + , ('washer') + , ('wheelchair') + , ('wifi') +; + +commit; diff --git a/revert/available_icons.sql b/revert/available_icons.sql index 5dc0667..6bf0a72 100644 --- a/revert/available_icons.sql +++ b/revert/available_icons.sql @@ -1,7 +1,11 @@ --- Revert camper:available_icons from pg +-- Deploy camper:available_icons to pg +-- requires: schema_camper +-- requires: icon begin; -delete from camper.icon; +delete from camper.icon +where icon_name = 'pet' +; commit; diff --git a/revert/available_icons@v1.sql b/revert/available_icons@v1.sql new file mode 100644 index 0000000..5dc0667 --- /dev/null +++ b/revert/available_icons@v1.sql @@ -0,0 +1,7 @@ +-- Revert camper:available_icons from pg + +begin; + +delete from camper.icon; + +commit; diff --git a/sqitch.plan b/sqitch.plan index bc390ab..7b536fe 100644 --- a/sqitch.plan +++ b/sqitch.plan @@ -177,3 +177,4 @@ setup_surroundings_ad [roles schema_camper surroundings_ad] 2024-01-23T11:32:26Z surroundings_ad_i18n [roles schema_camper surroundings_ad language] 2024-01-23T11:44:44Z jordi fita mas # Add relation for the translation of the surrounding ad remove_surroundings_ad [roles schema_camper surroundings_ad surroundings_ad_i18n] 2024-01-23T11:41:47Z jordi fita mas # Add function to remove surroundings ad translate_surroundings_ad [roles schema_camper surroundings_ad_i18n] 2024-01-23T12:06:32Z jordi fita mas # Add function to translate surroundings ad +available_icons [available_icons@v1] 2024-01-23T23:56:34Z jordi fita mas # Add pet icon diff --git a/verify/available_icons.sql b/verify/available_icons.sql index 0d02e66..3d0b0c7 100644 --- a/verify/available_icons.sql +++ b/verify/available_icons.sql @@ -19,6 +19,7 @@ select 1 / count(*) from icon where icon_name = 'kayak'; select 1 / count(*) from icon where icon_name = 'nopet'; select 1 / count(*) from icon where icon_name = 'outing'; select 1 / count(*) from icon where icon_name = 'person'; +select 1 / count(*) from icon where icon_name = 'pet'; select 1 / count(*) from icon where icon_name = 'plot'; select 1 / count(*) from icon where icon_name = 'pool'; select 1 / count(*) from icon where icon_name = 'puzzle'; diff --git a/verify/available_icons@v1.sql b/verify/available_icons@v1.sql new file mode 100644 index 0000000..0d02e66 --- /dev/null +++ b/verify/available_icons@v1.sql @@ -0,0 +1,35 @@ +-- Verify camper:available_icons on pg + +begin; + +set search_path to camper; + +select 1 / count(*) from icon where icon_name = 'area'; +select 1 / count(*) from icon where icon_name = 'baby'; +select 1 / count(*) from icon where icon_name = 'ball'; +select 1 / count(*) from icon where icon_name = 'bicycle'; +select 1 / count(*) from icon where icon_name = 'campfire'; +select 1 / count(*) from icon where icon_name = 'castle'; +select 1 / count(*) from icon where icon_name = 'ecofriendly'; +select 1 / count(*) from icon where icon_name = 'electricity'; +select 1 / count(*) from icon where icon_name = 'fridge'; +select 1 / count(*) from icon where icon_name = 'hvac'; +select 1 / count(*) from icon where icon_name = 'information'; +select 1 / count(*) from icon where icon_name = 'kayak'; +select 1 / count(*) from icon where icon_name = 'nopet'; +select 1 / count(*) from icon where icon_name = 'outing'; +select 1 / count(*) from icon where icon_name = 'person'; +select 1 / count(*) from icon where icon_name = 'plot'; +select 1 / count(*) from icon where icon_name = 'pool'; +select 1 / count(*) from icon where icon_name = 'puzzle'; +select 1 / count(*) from icon where icon_name = 'restaurant'; +select 1 / count(*) from icon where icon_name = 'route'; +select 1 / count(*) from icon where icon_name = 'rv'; +select 1 / count(*) from icon where icon_name = 'shower'; +select 1 / count(*) from icon where icon_name = 'store'; +select 1 / count(*) from icon where icon_name = 'toilet'; +select 1 / count(*) from icon where icon_name = 'washer'; +select 1 / count(*) from icon where icon_name = 'wheelchair'; +select 1 / count(*) from icon where icon_name = 'wifi'; + +rollback;