From 66dda542b793d4c55a586f9f5e4616997efbf465 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Wed, 26 Sep 2018 00:07:41 -0400 Subject: [PATCH] Fix syntax errors and invalid SQL --- inc/followers.php | 8 ++++---- inc/migrations.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/inc/followers.php b/inc/followers.php index e0857ab..9456433 100644 --- a/inc/followers.php +++ b/inc/followers.php @@ -30,8 +30,8 @@ function add_follower( $actor_slug, $follower ) { 'pterotype_followers', array( 'actor_id' => $actor_id, - 'object_id' = $object_id, - ); + 'object_id' => $object_id, + ) ); } @@ -64,8 +64,8 @@ function remove_follower( $actor_slug, $follower ) { 'pterotype_followers', array( 'actor_id' => $actor_id, - 'object_id' = $object_id, - ); + 'object_id' => $object_id, + ) ); } diff --git a/inc/migrations.php b/inc/migrations.php index 32ba251..484ffc1 100644 --- a/inc/migrations.php +++ b/inc/migrations.php @@ -170,9 +170,9 @@ function migration_0_0_3() { actor_id INT UNSIGNED NOT NULL, object_id INT UNSIGNED NOT NULL, PRIMARY KEY (actor_id, object_id), - FOREIGN KEY following_actor_fk(actor_id) + FOREIGN KEY followers_actor_fk(actor_id) REFERENCES pterotype_actors(id), - FOREIGN KEY following_object_fk(object_id) + FOREIGN KEY followers_object_fk(object_id) REFERENCES pterotype_objects(id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -183,7 +183,7 @@ function migration_0_0_3() { CREATE TABLE pterotype_shares( object_id INT UNSIGNED NOT NULL, announce_id INT UNSIGNED NOT NULL, - PRIMARY KEY (object_id, shared_by), + PRIMARY KEY (object_id, announce_id), FOREIGN KEY shares_object_fk(object_id) REFERENCES pterotype_objects(id), FOREIGN KEY shares_activity_fk(announce_id)