diff --git a/INSTALL.md b/INSTALL.md index b4c2c82..e6a8277 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -42,8 +42,10 @@ Above shown are the default used parameters. For more information about creating ## Import database tables -This bundle stores used resources in a separate table in the database. Use the following command to add the tables to your database: +This bundle stores used resources in a separate table in the database. Use the following command to update your database: ``` - mysql -u -p -h < vendor/netgen/layouts-remote-media/bundle/Resources/sql/mysql/schema.sql +php bin/console doctrine:schema:update ``` + +**Note:** Use the command with `--dump-sql` first to check that it will do only modifications related to this bundle, and then use it with parameter `--force` to do the actual changes. diff --git a/bundle/Resources/sql/mysql/schema.sql b/bundle/Resources/sql/mysql/schema.sql deleted file mode 100644 index 02dc2e0..0000000 --- a/bundle/Resources/sql/mysql/schema.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE TABLE nglayouts_remote_media_item (id INT AUTO_INCREMENT NOT NULL, remote_resource_location_id INT DEFAULT NULL, value VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL COMMENT '(DC2Type:datetime_immutable)', updated_at DATETIME NOT NULL COMMENT '(DC2Type:datetime_immutable)', UNIQUE INDEX UNIQ_7BAC206E1D775834 (value), UNIQUE INDEX UNIQ_7BAC206EB29166B0 (remote_resource_location_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET UTF8 COLLATE `UTF8_unicode_ci` ENGINE = InnoDB; -ALTER TABLE nglayouts_remote_media_item ADD CONSTRAINT FK_7BAC206EB29166B0 FOREIGN KEY (remote_resource_location_id) REFERENCES ngrm_remote_resource_location (id);