Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-mlc
kohinos
Commits
1fd79394
Commit
1fd79394
authored
May 21, 2019
by
Sgelberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete Version20190109171819.php
parent
19381705
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
84 deletions
+0
-84
Version20190109171819.php
src/Migrations/Version20190109171819.php
+0
-84
No files found.
src/Migrations/Version20190109171819.php
deleted
100644 → 0
View file @
19381705
<?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
Version20190109171819
extends
AbstractMigration
{
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 charte DROP FOREIGN KEY FK_3484E5A63DA5256D'
);
$this
->
addSql
(
'ALTER TABLE charte DROP FOREIGN KEY FK_3484E5A6F915CFE'
);
$this
->
addSql
(
'ALTER TABLE comptoir DROP FOREIGN KEY FK_A6E2C35EF915CFE'
);
$this
->
addSql
(
'ALTER TABLE faq DROP FOREIGN KEY FK_E8FF75CCF915CFE'
);
$this
->
addSql
(
'ALTER TABLE news DROP FOREIGN KEY FK_1DD39950F915CFE'
);
$this
->
addSql
(
'ALTER TABLE prestataire DROP FOREIGN KEY FK_60A264803DA5256D'
);
$this
->
addSql
(
'DROP TABLE fichier'
);
$this
->
addSql
(
'DROP INDEX UNIQ_1DD39950F915CFE ON news'
);
$this
->
addSql
(
'ALTER TABLE news CHANGE fichier_id media_id INT DEFAULT NULL'
);
$this
->
addSql
(
'ALTER TABLE news ADD CONSTRAINT FK_1DD39950EA9FDD75 FOREIGN KEY (media_id) REFERENCES media__media (id)'
);
$this
->
addSql
(
'CREATE INDEX IDX_1DD39950EA9FDD75 ON news (media_id)'
);
$this
->
addSql
(
'DROP INDEX UNIQ_A6E2C35EF915CFE ON comptoir'
);
$this
->
addSql
(
'ALTER TABLE comptoir CHANGE fichier_id media_id INT DEFAULT NULL'
);
$this
->
addSql
(
'ALTER TABLE comptoir ADD CONSTRAINT FK_A6E2C35EEA9FDD75 FOREIGN KEY (media_id) REFERENCES media__media (id)'
);
$this
->
addSql
(
'CREATE INDEX IDX_A6E2C35EEA9FDD75 ON comptoir (media_id)'
);
$this
->
addSql
(
'DROP INDEX UNIQ_3484E5A6F915CFE ON charte'
);
$this
->
addSql
(
'DROP INDEX UNIQ_3484E5A63DA5256D ON charte'
);
$this
->
addSql
(
'ALTER TABLE charte ADD media_id INT DEFAULT NULL, ADD text LONGTEXT DEFAULT NULL, DROP image_id, DROP fichier_id'
);
$this
->
addSql
(
'ALTER TABLE charte ADD CONSTRAINT FK_3484E5A6EA9FDD75 FOREIGN KEY (media_id) REFERENCES media__media (id)'
);
$this
->
addSql
(
'CREATE INDEX IDX_3484E5A6EA9FDD75 ON charte (media_id)'
);
$this
->
addSql
(
'DROP INDEX UNIQ_60A264803DA5256D ON prestataire'
);
$this
->
addSql
(
'ALTER TABLE prestataire CHANGE image_id media_id INT DEFAULT NULL'
);
$this
->
addSql
(
'ALTER TABLE prestataire ADD CONSTRAINT FK_60A26480EA9FDD75 FOREIGN KEY (media_id) REFERENCES media__media (id)'
);
$this
->
addSql
(
'CREATE INDEX IDX_60A26480EA9FDD75 ON prestataire (media_id)'
);
$this
->
addSql
(
'DROP INDEX UNIQ_E8FF75CCF915CFE ON faq'
);
$this
->
addSql
(
'ALTER TABLE faq ADD text LONGTEXT DEFAULT NULL, ADD name VARCHAR(150) NOT NULL, ADD slug VARCHAR(150) NOT NULL, ADD content LONGTEXT DEFAULT NULL, CHANGE fichier_id media_id INT DEFAULT NULL'
);
$this
->
addSql
(
'ALTER TABLE faq ADD CONSTRAINT FK_E8FF75CCEA9FDD75 FOREIGN KEY (media_id) REFERENCES media__media (id)'
);
$this
->
addSql
(
'CREATE UNIQUE INDEX UNIQ_E8FF75CC989D9B62 ON faq (slug)'
);
$this
->
addSql
(
'CREATE INDEX IDX_E8FF75CCEA9FDD75 ON faq (media_id)'
);
}
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
(
'CREATE TABLE fichier (id INT AUTO_INCREMENT NOT NULL, path LONGTEXT DEFAULT NULL COLLATE utf8mb4_unicode_ci, discr VARCHAR(255) NOT NULL COLLATE utf8mb4_unicode_ci, width INT DEFAULT NULL, height INT DEFAULT NULL, enabled TINYINT(1) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB COMMENT = \'\' '
);
$this
->
addSql
(
'ALTER TABLE charte DROP FOREIGN KEY FK_3484E5A6EA9FDD75'
);
$this
->
addSql
(
'DROP INDEX IDX_3484E5A6EA9FDD75 ON charte'
);
$this
->
addSql
(
'ALTER TABLE charte ADD fichier_id INT DEFAULT NULL, DROP text, CHANGE media_id image_id INT DEFAULT NULL'
);
$this
->
addSql
(
'ALTER TABLE charte ADD CONSTRAINT FK_3484E5A63DA5256D FOREIGN KEY (image_id) REFERENCES fichier (id)'
);
$this
->
addSql
(
'ALTER TABLE charte ADD CONSTRAINT FK_3484E5A6F915CFE FOREIGN KEY (fichier_id) REFERENCES fichier (id)'
);
$this
->
addSql
(
'CREATE UNIQUE INDEX UNIQ_3484E5A6F915CFE ON charte (fichier_id)'
);
$this
->
addSql
(
'CREATE UNIQUE INDEX UNIQ_3484E5A63DA5256D ON charte (image_id)'
);
$this
->
addSql
(
'ALTER TABLE comptoir DROP FOREIGN KEY FK_A6E2C35EEA9FDD75'
);
$this
->
addSql
(
'DROP INDEX IDX_A6E2C35EEA9FDD75 ON comptoir'
);
$this
->
addSql
(
'ALTER TABLE comptoir CHANGE media_id fichier_id INT DEFAULT NULL'
);
$this
->
addSql
(
'ALTER TABLE comptoir ADD CONSTRAINT FK_A6E2C35EF915CFE FOREIGN KEY (fichier_id) REFERENCES fichier (id)'
);
$this
->
addSql
(
'CREATE UNIQUE INDEX UNIQ_A6E2C35EF915CFE ON comptoir (fichier_id)'
);
$this
->
addSql
(
'ALTER TABLE faq DROP FOREIGN KEY FK_E8FF75CCEA9FDD75'
);
$this
->
addSql
(
'DROP INDEX UNIQ_E8FF75CC989D9B62 ON faq'
);
$this
->
addSql
(
'DROP INDEX IDX_E8FF75CCEA9FDD75 ON faq'
);
$this
->
addSql
(
'ALTER TABLE faq DROP text, DROP name, DROP slug, DROP content, CHANGE media_id fichier_id INT DEFAULT NULL'
);
$this
->
addSql
(
'ALTER TABLE faq ADD CONSTRAINT FK_E8FF75CCF915CFE FOREIGN KEY (fichier_id) REFERENCES fichier (id)'
);
$this
->
addSql
(
'CREATE UNIQUE INDEX UNIQ_E8FF75CCF915CFE ON faq (fichier_id)'
);
$this
->
addSql
(
'ALTER TABLE news DROP FOREIGN KEY FK_1DD39950EA9FDD75'
);
$this
->
addSql
(
'DROP INDEX IDX_1DD39950EA9FDD75 ON news'
);
$this
->
addSql
(
'ALTER TABLE news CHANGE media_id fichier_id INT DEFAULT NULL'
);
$this
->
addSql
(
'ALTER TABLE news ADD CONSTRAINT FK_1DD39950F915CFE FOREIGN KEY (fichier_id) REFERENCES fichier (id)'
);
$this
->
addSql
(
'CREATE UNIQUE INDEX UNIQ_1DD39950F915CFE ON news (fichier_id)'
);
$this
->
addSql
(
'ALTER TABLE prestataire DROP FOREIGN KEY FK_60A26480EA9FDD75'
);
$this
->
addSql
(
'DROP INDEX IDX_60A26480EA9FDD75 ON prestataire'
);
$this
->
addSql
(
'ALTER TABLE prestataire CHANGE media_id image_id INT DEFAULT NULL'
);
$this
->
addSql
(
'ALTER TABLE prestataire ADD CONSTRAINT FK_60A264803DA5256D FOREIGN KEY (image_id) REFERENCES fichier (id)'
);
$this
->
addSql
(
'CREATE UNIQUE INDEX UNIQ_60A264803DA5256D ON prestataire (image_id)'
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment