From 91020eacfadf8fc162ed5f247f3d61e7c7add005 Mon Sep 17 00:00:00 2001 From: Lucas Marcouiller <45882981+Hystepik@users.noreply.github.com> Date: Wed, 12 Jul 2023 16:13:32 +0200 Subject: [PATCH] Fix : bookcal database structure (#25326) * Fix : bookcal database structure * fix status --------- Co-authored-by: Hystepik --- htdocs/bookcal/class/booking.class.php | 2 ++ htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/bookcal/class/booking.class.php b/htdocs/bookcal/class/booking.class.php index fab4cd6ba95..897936f995b 100644 --- a/htdocs/bookcal/class/booking.class.php +++ b/htdocs/bookcal/class/booking.class.php @@ -122,6 +122,7 @@ class Booking extends CommonObject 'email' => array('type'=>'varchar(128)', 'label'=>'email', 'enabled'=>'1', 'position'=>4, 'notnull'=>1, 'visible'=>-1,), 'start' => array('type'=>'datetime', 'label'=>'Start Hour', 'enabled'=>'1', 'position'=>5, 'notnull'=>1, 'visible'=>-1,), 'duration' => array('type'=>'integer', 'label'=>'Duration', 'enabled'=>'1', 'position'=>6, 'notnull'=>1, 'visible'=>-1,), + 'fk_bookcal_availability' => array('type'=>'integer:Availabilities:bookcal/class/availabilities.class.php', 'label'=>'AvailabilityId', 'enabled'=>'1', 'position'=>49, 'notnull'=>1, 'visible'=>-1,), ); public $rowid; public $ref; @@ -143,6 +144,7 @@ class Booking extends CommonObject public $email; public $start; public $duration; + public $fk_bookcal_availability; // END MODULEBUILDER PROPERTIES diff --git a/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql b/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql index df3f6384d23..d327bd56183 100644 --- a/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql +++ b/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql @@ -35,6 +35,7 @@ CREATE TABLE llx_bookcal_booking( lastname varchar(128) NOT NULL, email varchar(128) NOT NULL, start datetime NOT NULL, - duration integer NOT NULL + duration integer NOT NULL, + fk_bookcal_availability integer NOT NULL -- END MODULEBUILDER FIELDS ) ENGINE=innodb;