Skip to content

Conversation

@gyts123
Copy link

@gyts123 gyts123 commented Nov 26, 2019

No description provided.

@gyts123 gyts123 changed the title Testas HW - Simfony - 3 Nov 26, 2019
// 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('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, password_changed DATETIME DEFAULT NULL, homepage VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migracijų esmė: pridėti pakeitmus, o ne viską daryti iš naujo.

Veiksmų seka:

  • Paimamas kitų kodas: lokali duomenų bazė atnaujinama pagal kodą
  • Atliekami pakeitimai: sugeneruojamas migracijos failas(-ai) – kurie tik prideda prie jau esančių failų
  • Pas kolegą (ar serveryje) įvykdomi visi migracijos failai iš eilės

Ir dėl šios priežasties – neveikia testai ir negaliu pilnai įvertinti visų projekto funkcijų
image

Plačiau:

// 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 user ADD linked_in VARCHAR(255) DEFAULT NULL, CHANGE roles roles JSON NOT NULL, CHANGE homepage homepage VARCHAR(255) DEFAULT NULL, CHANGE password_changed password_changed DATETIME DEFAULT NULL');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P.S. savo testuose (scripts/insert-test-user.sh) darau prielaidą, kad laukelis bus linkedin

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