-
Notifications
You must be signed in to change notification settings - Fork 34
HW - Simfony - 3 #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: homework-2019-11-19
Are you sure you want to change the base?
HW - Simfony - 3 #283
Conversation
| // 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'); |
There was a problem hiding this comment.
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ų

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'); |
There was a problem hiding this comment.
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
No description provided.