Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Create index for #1575 #1769

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

Conversation

datengraben
Copy link
Contributor

Based on #1575

hansmorb and others added 22 commits February 11, 2025 21:52
diff --git a/tests/php/Wordpress/CustomPostTypeTest.php b/tests/php/Wordpress/CustomPostTypeTest.php
index d5e2e5d2..6f62caf4 100644
--- a/tests/php/Wordpress/CustomPostTypeTest.php
+++ b/tests/php/Wordpress/CustomPostTypeTest.php
@@ -4,6 +4,7 @@ namespace CommonsBooking\Tests\Wordpress;

 use CommonsBooking\Plugin;
 use CommonsBooking\Repository\BookingCodes;
+use CommonsBooking\Repository\TimeframeRelations;
 use CommonsBooking\Tests\BaseTestCase;
 use CommonsBooking\Wordpress\CustomPostType\Booking;
 use CommonsBooking\Wordpress\CustomPostType\Item;
@@ -550,7 +551,8 @@ abstract class CustomPostTypeTest extends BaseTestCase {

 		$this->dateFormatted = date( 'Y-m-d', strtotime( self::CURRENT_DATE ) );

-		$this->setUpBookingCodesTable();
+	  $this->setUpBookingCodesTable();
+	  TimeframeRelations::initTable();

 		// Create location
 		$this->locationId = self::createLocation( 'Testlocation', 'publish' );
@@ -569,7 +571,7 @@ abstract class CustomPostTypeTest extends BaseTestCase {
             location bigint(20) unsigned NOT NULL,
             item bigint(20) unsigned NOT NULL,
             code varchar(100) NOT NULL,
-            PRIMARY KEY (date, timeframe, location, item, code)
+            PRIMARY KEY (date, timeframe, location, item, code)
         ) $charset_collate;";

 		$wpdb->query( $sql );
@datengraben datengraben force-pushed the experiment/tfrelationstable branch from b09953b to be3cedc Compare February 11, 2025 21:03
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants