Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@

``` bash
$ cp .env.dist .env

# Debemos indicar las variables de entorno
root_pwd=my-super-secret
db_name=api_platform
db_user=root
db_password=
```

#### Docker: Levantamos los servicios y comandos de interes
Expand Down
1 change: 0 additions & 1 deletion docker/app/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'bin/console' ]; then
elif [ "$APP_ENV" != 'prod' ]; then
# Always try to reinstall deps when not in prod
composer install --prefer-dist --no-progress --no-suggest --no-interaction
php bin/console make:migration --no-interaction --no-debug --env="${APP_ENV}"
php bin/console doctrine:database:create --if-not-exists --no-interaction --no-debug --env="${APP_ENV}"
php bin/console doctrine:migrations:migrate --allow-no-migration --no-interaction --no-debug --env="${APP_ENV}"
fi
Expand Down
37 changes: 37 additions & 0 deletions src/Migrations/Version20200519181249.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20200519181249 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}

public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('ALTER TABLE tweet CHANGE user_image user_image VARCHAR(100) DEFAULT NULL');
$this->addSql('ALTER TABLE hashtag CHANGE name name VARCHAR(100) DEFAULT NULL, CHANGE last_tweet last_tweet VARCHAR(255) DEFAULT NULL');
}

public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('ALTER TABLE hashtag CHANGE name name VARCHAR(100) CHARACTER SET utf8mb4 DEFAULT \'NULL\' COLLATE `utf8mb4_unicode_ci`, CHANGE last_tweet last_tweet VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT \'NULL\' COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE tweet CHANGE user_image user_image VARCHAR(100) CHARACTER SET utf8mb4 DEFAULT \'NULL\' COLLATE `utf8mb4_unicode_ci`');
}
}