Open
Conversation
aurelijusb
reviewed
Dec 15, 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'); |
Owner
There was a problem hiding this comment.
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ų

Plačiau:
aurelijusb
reviewed
Dec 15, 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('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'); |
Owner
There was a problem hiding this comment.
P.S. savo testuose (scripts/insert-test-user.sh) darau prielaidą, kad laukelis bus linkedin
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.