-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: debounced <[email protected]>
- Loading branch information
1 parent
b3240c0
commit 4e43b06
Showing
28 changed files
with
343 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20240614120443 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Add columns for remote likes, dislikes and shares'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$this->addSql('ALTER TABLE entry ADD ap_like_count INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE entry ADD ap_dislike_count INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE entry ADD ap_share_count INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE entry_comment ADD ap_like_count INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE entry_comment ADD ap_dislike_count INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE entry_comment ADD ap_share_count INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE post ADD ap_like_count INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE post ADD ap_dislike_count INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE post ADD ap_share_count INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE post_comment ADD ap_like_count INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE post_comment ADD ap_dislike_count INT DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE post_comment ADD ap_share_count INT DEFAULT NULL'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->addSql('ALTER TABLE entry_comment DROP ap_like_count'); | ||
$this->addSql('ALTER TABLE entry_comment DROP ap_dislike_count'); | ||
$this->addSql('ALTER TABLE entry_comment DROP ap_share_count'); | ||
$this->addSql('ALTER TABLE post_comment DROP ap_like_count'); | ||
$this->addSql('ALTER TABLE post_comment DROP ap_dislike_count'); | ||
$this->addSql('ALTER TABLE post_comment DROP ap_share_count'); | ||
$this->addSql('ALTER TABLE post DROP ap_like_count'); | ||
$this->addSql('ALTER TABLE post DROP ap_dislike_count'); | ||
$this->addSql('ALTER TABLE post DROP ap_share_count'); | ||
$this->addSql('ALTER TABLE entry DROP ap_like_count'); | ||
$this->addSql('ALTER TABLE entry DROP ap_dislike_count'); | ||
$this->addSql('ALTER TABLE entry DROP ap_share_count'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.